Professional Documents
Culture Documents
Arithmetic Logic Unit (ALU) : CSE320 Lecture 6
Arithmetic Logic Unit (ALU) : CSE320 Lecture 6
Arithmetic Logic Unit (ALU) : CSE320 Lecture 6
A B = A + 2s complement of B
= A + ((1s comp. of B) + 1)
Critical Path
Each logic gate has a propogation delay. This is the delay between when the inputs are applied and the
correct logical output is available.
The critical path of a circuit is the path between the input values and the output value which has the
longest delay.
To calculate the critical path assume that each input value was available at time 0. For each gate which
the input values propograte through, calculate the time when the output will be available. For each
internal gate, take the input value with the largest delay and add the gate delay to produce the output
time. Continue for all gates, until the output.
The critical path delay time is the length of time for the output value. The critical path is the set of gates
which dictate this longest time. If there is a tie between input for the longest, both inputs are required in
the critical path.
Building ALUs
1-bit ALU: It does a + b , a AND b & a OR b .
ALU
Operation
AND
OR
ADD
A 32-bit ALU constructed from 32 1-bit ALUs. CarryOut of the less significant bit is connected to the
CarryIn of the more significant bit. This organization is called ripple carry.
The 1-bit ALU below has an extra NOT gate for inverting b.
A 1-bit ALU that performs AND, OR, and addition on a and b or a and b. By selecting b (Binvert = 1) and setting CarryIn
to 1 in the least significant bit of the ALU, we get twos complement subtraction of b from a instead of addition of b to a.
Carry-in input of the 32-bit ALU is set to 1. This adds 1 at the least significant (i.e., rightmost) position.
Thus, for subtraction, we set Cin = 1, Binvert to 1, and select the add operation.
The following 1-bit ALU builds on the previous one by introducing a second NOT gate, for inverting a
and thereby giving us NOR functionality.
A 1-bit ALU that performs AND, OR, and addition on a and b or a and b. By selecting a (Ainvert = 1) and b (Binvert = 1),
we get a NOR b instead of a AND b.