How are instructions encoded? - Instruction and addressing formats
- 3-address instruction format: opcode | Dest | Src1 | Scr2; typically used by register-register (also called load/store) machines.
- 2-address instruction format: opcode | Dest/Src1 | Src2 ; often supported register-memory machines.
- 1-address instruction format: opcode | Src;supported by the accumulator machine.
- 0-address instruction format: only opcode;supported by the stack machine.
Most RISC ISAs use a 3-address instruction format where all instructions have a fixed length of 32 bits.
CISC ISAs often use register-memory with variable instruction lengths.
Accumulator machines are today mostly found in microcontrollers.
Also stack machines use variable instruction lengths, today exemplified in JAVA processors.