A 16-bit hexadecimal Reverse Polish Notation calculator.
This calculator uses Reverse Polish Notation, which means that you enter operands before the operator that uses them. For example, if you wanted to add 4 and 8, you would first input the number 4, then input the number 8, then the operator +.
Once you've input one number, you can input another by pressing A on the keypad (Z on a QWERTY keyboard), or delete it with 0 (X on QWERTY). The 4x4 operator grid on screen corresponds directly to the layout of the keypad. Numeric input is always a 16-bit hexadecimal integer. You can store up to four values at a time. Try to add another one beyond that, and the program crashes and runs the buzzer until you restart the emulator.
- +: Adds the bottom two values of the stack
- -: Subtracts the bottom value from the value above
- ×: Multiplies the bottom two values of the stack*
- ÷: Divides the second-from-bottom value by the bottom value*
- S: Computes the sine of the bottom value of the stack*
- C: Computes the cosine of the bottom value of the stack*
- T: Computes the tangent of the bottom value of the stack*
- √: Computes the square root of the bottom value of the stack
- S⁻¹: Computes the inverse sine of the bottom value of the stack
- C⁻¹: Computes the inverse cosine of the bottom value of the stack
- T⁻¹: Computes the inverse tangent of the bottom value of the stack
- 🗘: Swaps the bottom two values of the stack
- #: Add a value to the bottom of the stack
- ⌫: Remove a value from the bottom of the stack
- <<: Shift the bottom value of the stack one bit to the left
- >>: Shift the bottom value of the stack one bit to the right
*These functions require one or more inputs to be only 8 bits, so if the input value is >0xFF it gets shifted 8 bits to the right
Leave a comment
Log in with itch.io to leave a comment.