The instruction word

You will learn

How the TRI-27 emulator packs an instruction into 32 bits.

The TRI-27 machine computes with trits, but its instructions are 32-bit binary words, decoded by the pinned Trinity emulator. The opcode sits in bits 7..0, the destination register in 12..8, the sources above it; the immediate form gives the top 15 bits to a signed number. The widget calls the spec's encode() and reads every field back with opcode_of(), dst_of() and the rest.

Open the interactive lesson →