ALU: Difference between revisions

From Rice Wiki
No edit summary
No edit summary
 
Line 10: Line 10:
* AND
* AND
* OR
* OR
= Circuit =
Arrangement of instruction opcodes may ease circuit construction. By experience, arithmetic and logic instructions should be separated.


[[Category:Computer Architecture]]
[[Category:Computer Architecture]]

Latest revision as of 15:29, 26 April 2024

The arithmetic logic unit handles arithmetic operations in the CPU.

Operators

The main operators include

  • ADD
    • SUB: A - B = A + (-B)
    • MUL2: 2*A = A + A
  • XOR
    • NOT: ~A = A XOR 1
  • AND
  • OR

Circuit

Arrangement of instruction opcodes may ease circuit construction. By experience, arithmetic and logic instructions should be separated.