ScratchData LogoScratchData
Back to scratcher-6537's profile

Programmable scientific calculator

SCscratcher-6537•Created July 7, 2023
Programmable scientific calculator
7
6
101 views
View on Scratch

Instructions

DON'T press the "?" key. YOU WILL REGRET YOUR DECISION.IT IS MARKED WITH THE QUESTION MARK FOR GOOD REASON.JUST DONT, K?

Description

press the red key with the big x to reset everything except the program. the % key works like a standard pocket calculation is my country Vietnam works. THIS MIGHT BE TURING COMPLETE! Extendable, too. Example program: Square root (there is a sqrt button but this is more interesting) #What;#Am;#I;#Doing;#This is a sqrt rpogram;#Using the newton-raphson method.;#ENJOY!;D2;NL;"square root program;NL;"input a number;A;NL;M=;D1;C;1;M=;LOOP:;MR;^2;-;D2;MR;D1;=;JFYES;/;2;=;/;MR;=;M-;J!LOOP;YES:;"it's square root is ;'1; the M= is memory set and MS is memory select btw the LD key is load and the SV key is save unless a command is marked special, it presses the corresponding key. k? the special commands include: "[string]: Prints a string. '[n] shows the number at memory address [n]. #cmt marks a comment, the sqrt key is the letter "v". the percent key is kind of weird but it's how my country's calculators works. D[n] set the selected memory to address n M[n] Read the value from address N. the LD key loads from savecode and SV saves it. control flow: there are 5 kinds of jumps. they can jump to labels. J! - unconditional jump JF - jump if almost zero JT - jump if nonzero J> - jump if positive J< - jump if negative changing that J to an S makes it a subroutine call. Returning is done with the command "R". Helpful formulas: log base n of m= log m/ log n cos x = sin (x+90) tan x= sin x / cos x Other formulas: max(x,n)=(((x-n)+|x-n|)/2)+n

Project Details

Project ID872664193
CreatedJuly 7, 2023
Last ModifiedJune 4, 2024
SharedJuly 8, 2023
Visibilityvisible
CommentsAllowed