Professional Documents
Culture Documents
DEC30032 Chapter3 PDF
DEC30032 Chapter3 PDF
CHAPTER 3
ARITHMETIC LOGIC UNIT
(ALU)
• CARRY OUT
Cout = AB
FULL ADDER
• A full adder is a combinational circuit that performs the
arithmetic sum of three bits: A, B and a carry in, C.
• Also, as in the case of the half adder, the full adder
produces the corresponding sum, S, and a carry out
Cout.
• A full adder maybe designed by two half adders or
more.
• The sum of A and B are fed to a second half adder,
which then adds it to the carry in C to generate the
final sum S.
• The carry out, Co, is the result of an OR operation
taken from the carry outs of both half adders.
Logic Diagram
Logic Symbol
Truth table for full adder
A B Cin SUM Cout
(S)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 0 1
1 0 0 1 0
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
PARALLEL BINARY ADDER
General block diagram
4 Bit Parallel Binary Adder
1) Consider the addition of the following 4-bit binary
numbers:
Where
A3 = 0, A2 = 1, A1 = 1, A0 = 1
B3 = 1, B2 = 1, B1 = 0, B0= 0, Cin = 0
1
1 0 111
+ 1100
10011
1 1 1
11 1 1 1
1 01 1
+ 1
11 01 1
INPUT OUTPUT
A B DIFFERENCE BORROW
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
LOGIC DIAGRAM – FULL SUBTRACTOR
TRUTH TABLE – FULL SUBTRACTOR
INPUT OUTPUT
C
A B DIFFERENCE BORROW
(BORin)
0 0 0 0 0
0 0 1 1 1
0 1 0 1 1
0 1 1 0 1
1 0 0 1 0
1 0 1 0 0
1 1 0 0 0
1 1 1 1 1
4 BIT ADDER SUBTRACTOR
• When M = 0, the full–adders see A + B
because B 0 = B.
• When M = 1, the full–adders see A + B’ + 1
because B 1 = B’ and C0 = M.
• B’ is the 1’s complement of B
• So (B’ + 1) is the 2’s complement of B.
a) 2 bit Parallel Binary Adder Subtractor have input A = 10 and
B = 01. Calculate the output for both situation M=0 and M=1.
ANSWER
When M=0, Adder process = A + B
B’ + 1 = 1 0 + 1 = 1 1
ANSWER
When M=0, Adder process = A + B
A+B = 1 1100
+ 1001
10101