The Delta Radix is a desktop calculator designed specifically to be useful for binary and hexadecimal calculations.
Notable features:
- Mixed binary, hexadecimal, and decimal calculations
- Customisable bit width of arithmetic type (not limited to powers of 2!)
- Support for signed and unsigned data types
- Accurate simulation of overflow
- Mechanical keyswitches for input
This repository is a Cargo workspace comprising a handful of crates. These are:
delta-radix-os
- The user-facing calculator software, 100% hardware-agnosticdelta-radix-hal
- Traits which the OS uses to interact with hardware (keypad, display, etc)delta-radix-hal-pico
- Implementation of HAL traits for the Raspberry Pi Picodelta-radix-hal-sim
- Implementation of HAL traits for a simulator which runs in the terminaldelta-radix-hal-web
- Implementation of HAL traits for a browser-based simulator with WebAssembly (build withwasm-pack build --target web
, then visitindex.html
)flex-int
- Arbitrary-precision arithmetic library used by the OS
The HAL implementations are the executable targets which should be flashed/run.
Elsewhere, you'll also find:
delta-radix-numworks
- Implementation of HAL traits for an app on the NumWorks graphing calculator.- This is a separate repository because it's not a pure-Cargo project, rather a Rust static library linked against a supporting C binary.
hardware/
contains a KiCad schematic and PCB design.
cad/
contains a 3D-printable case which the PCB can be mounted into, and keycaps for the switches.
Note: Arithmetic parsing is incomplete! While they are implemented in the arithmetic library, there's no way to input operations other than addition yet.
Base specifiers can appear on either site of a number (xCAFE
or CAFEx
), whichever you prefer. A
number without a base specifier is always interpreted as a decimal.
To change the result base, press the Format Select (->
) key and then the base you'd like. Press
the Format Select key twice to return to decimal.
To change the arithmetic data type, use the Menu key. Enter a number of bits, and use the +
/-
keys to choose signed or unsigned respectively.
Shift > Menu shows a menu of meta options, such as entering the bootloader.
- Faster parsing mode for constant overflow warnings
- Parsing is slow, largely because of
FlexInt::from_unsigned_decimal_string
- Wouldn't be a problem for evaluation, but is annoying during editing (key-press lag)
- Either add a faster overall parsing mode just for constant overflow warnings, or versions of number parsing which aren't suitable for evaluation but are fine for warnings (e.g. just use built-in Rust parsing, don't calculate overflow)
- Parsing is slow, largely because of
- "Clear" key (shift + del?)
- Variables
- Parentheses
- Scrolling expression input
- Show result as if unsigned
- Sleep after inactivity