The first basic format is used for instructions which contain immediate data. The fields are defined as:
In addition to the op-code field, this format contains two 5 bit register fields and a 16 bit field for an immediate constant.
For example, the op-code for the addi instruction is 0010 00. The machine code for the instruction:
addi $13, $7, 50
is:
Note that the order of the fields for and
is reversed.
The second instruction format is used for instructions which contain only register operands. The opcode for all instructions in this format is 0000 00. The general format is:
The 11 bit op-code extension which appears in bits 0-10 uniquely identifies the instruction using this format.
For example, the register addition instruction instruction:
add $13, $7, $8
is encoded as:
Note that the register fields appear in a different order than the operands in the TAL instruction.