ALU

Opcode Format Mnemonic Description
1000FFFF ALU The ALU mnemonic is used to execute one of 16 possible ALU instructions.

 

Bits Description
FFFF The 4-bit long ALU function code:

  • 0000: XOR
  • 0001: OR
  • 0010: AND
  • 0011: ADD
  • 0100: NOT
  • 0101: SHL
  • 0110: ADC
  • 0111: SUB
  • 1000: NEG
  • 1001: SBB
  • 1010: RCL
  • 1011: SHR
  • 1100: SAR
  • 1101: RCR
  • 1110: MOV8
  • 1111: NOP

 
The logic of the individual ALU function codes are described here. The following animation shows how the ALU opcode is executed physically on the CPU.

Downloads (licensed under CC BY-NC 3.0):