ALU: Difference between revisions

From Rice Wiki
(Created page with "= Suboperator = Sometimes, free bits in an instruction allows for suboperator. This involves additional parsing on the circuit, such as another MUX under NOT.")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
= Suboperator =
The '''arithmetic logic unit''' handles arithmetic operations in the CPU.
Sometimes, [[Instructions (Computer Science)|free bits]] in an instruction allows for suboperator. This involves additional parsing on the circuit, such as another MUX under NOT.
 
= 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.
 
[[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.