Binary Adders

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 19

Binary Adders

UNIVOTEC-National Dipoloma in 1
Comuter Science
BINARY ADDERS
• An electronics circuit that performs
addition of numbers
• In modern computers adders reside in the
arithmetic logic unit (ALU) where other
operations are performed

UNIVOTEC-National Dipoloma in 2
Comuter Science
BINARY ADDERS
• Can add two bits
• Inputs
– A and B
• Two outputs
– the sum, S and carry, Cout

UNIVOTEC-National Dipoloma in 3
Comuter Science
Truth table & Circuit Diagram
for half adder

UNIVOTEC-National Dipoloma in 4
Comuter Science
Full adder

• Capable of adding three bits


• Two bits and one carry bit of earlier
calculation
• Three inputs
– A, B, and carry Cin
• Two outputs
– the sum, S and carry, Cout

UNIVOTEC-National Dipoloma in 5
Comuter Science
Truth table & Circuit Diagram
for Full adder

UNIVOTEC-National Dipoloma in 6
Comuter Science
UNIVOTEC-National Dipoloma in 7
Comuter Science
UNIVOTEC-National Dipoloma in 8
Comuter Science
Ripple carry adder
• Create using multiple full adders to add N-bit numbers
• Each adder inputs a Cin, which is the Cout of the
previous adder.
• This is a ripple carry adder, since each carry bit
"ripples" to the next full adder.
• The first full adder may be replaced by a half adder
• The ripple carry adder is relatively slow
• The gate delay can calculated by inspection of the full
adder circuit.
• Therefore, a 32-bit adder requires 31 carry
computations and the final sum calculation for a total
of 31 * 2 + 1 = 63 UNIVOTEC-National
gate delays
Comuter Science
Dipoloma in 9
Ripple carry adder

UNIVOTEC-National Dipoloma in 10
Comuter Science
Adder / Subtractor Circuit

• We can add two numbers using the formula, A+B


• Similarly, we can Subtract two numbers using the
same formula, but using negative B.
A - B  = A + (-B).
              = A + (2's complement of B)
thus, A - B = A + ( B + 1 )
• We can Add two numbers using similar equation
•   A + B = A + (B + 0)
• The 0 or 1 in the above equation can be added using
the Carry input of the Full - Adder block.
UNIVOTEC-National Dipoloma in 11
Comuter Science
Adder / Subtractor Circuit

UNIVOTEC-National Dipoloma in 12
Comuter Science
• Whenever the Add/Subtract signal is
high, the Carry input is 1 and the MUX
selects B input
• Thus a 1 is added and B is selected as
second input to the Full-Adder block
• Thus the circuit realize the function A + ( B
+ 1 ), which is subtraction
• Thus the circuit acts as a Subtractor, when
the Add/Subtract input is 1
UNIVOTEC-National Dipoloma in 13
Comuter Science
• Whenever the Add/Subtract signal is low(0), the
Carry input is 0 and the MUX selects B input
• Thus a 0 is added and B is selected as second
input to the Full-Adder block
• Thus the circuit realize the function A + (B + 0),
which is addition. Thus the circuit acts as a
Adder, when the Add/Subtract input is 0
• We use two ICs, IC 7483 which is an Adder, and
IC 74157, which is a MUX

UNIVOTEC-National Dipoloma in 14
Comuter Science
Circuit Implementation

UNIVOTEC-National Dipoloma in 15
Comuter Science
Circuit Implementation

UNIVOTEC-National Dipoloma in 16
Comuter Science
Circuit Implementation

UNIVOTEC-National Dipoloma in 17
Comuter Science
UNIVOTEC-National Dipoloma in 18
Comuter Science
Assignment
• Design a calculator to perform addition
and subtraction of 4-bit binary numbers
and display the results using seven
segment display

• Implement the above circuit using ADDER


7483 and MUX 74157 ICs

UNIVOTEC-National Dipoloma in 19
Comuter Science

You might also like