A ternary ALU
You will learn
How add, subtract, negate and compare work on 9-trit registers.
The ALU of this widget is built from the course so far: ADD is the ripple adder, SUB adds b with every trit flipped, NEG is the flip alone, CMP answers one trit. Nine-trit registers hold -9841 to 9841, and a result beyond that is flagged as overflow. The lesson spec, tri27_machine.t27, states the TRI-27 machine as the Trinity emulator executes it.