0% found this document useful (0 votes)
22 views35 pages

Adder Subtractor

The document discusses various types of adders and subtractors used in digital logic circuits. It describes half adders and full adders, which are used to add binary numbers. A half adder adds two bits and produces a sum and carry output, while a full adder adds three bits and accounts for an input carry. Subtractors, including half subtractors and full subtractors, are also discussed. Half subtractors subtract two bits, and full subtractors subtract three bits and account for borrowed values. Truth tables and logic diagrams are provided for each circuit.

Uploaded by

Mr Robot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views35 pages

Adder Subtractor

The document discusses various types of adders and subtractors used in digital logic circuits. It describes half adders and full adders, which are used to add binary numbers. A half adder adds two bits and produces a sum and carry output, while a full adder adds three bits and accounts for an input carry. Subtractors, including half subtractors and full subtractors, are also discussed. Half subtractors subtract two bits, and full subtractors subtract three bits and account for borrowed values. Truth tables and logic diagrams are provided for each circuit.

Uploaded by

Mr Robot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 35

ADDAR And SUBTRACTOR

Adder
Half adder
Full adder
Subtractor
Half Subtractor
Full Subtractor
Adder
An adder is a digital logic circuit in electronics that
implements addition of numbers.
 In many computers and other kinds of processors, adders
are used not only in the arithmetic logic units, but also in
other parts of the processor, where they are used to
calculate addresses, increment and decrement operators,
and similar operations.
Adders are classified into two types: 1)half adder.
2) full adder.
Let us first take a look at the addition of single bits.
0+0 = 0
0+1 = 1
1+0 = 1
1+1 =10 (i.e. 1+1=0 with carry = 1)
Half Adder
The half adder adds two single binary
digits A and B.
 It has two outputs, sum (S) and carry (C).
The carry signal represents an overflow into
the next digit of a multi-digit addition.
Truth Table
SUM=A’B+AB’
1+1+1+1= 100 CARRY=AB
INPUTS OUTPUTS
A B SUM CARRY
0 0 0 0
0 1 1 0
1 0 1 0
1 1 0 1
Solving truth table using K-map
Analysing results
No of inputs = 2
No of outputs = 2
Inputs are A , B.
Outputs are Sum , Carry.
Sum can be obtained using XOR logic gate.
Carry can be obtained using AND logic gate.
Designing circuit
Binary Adder

 Half Adder x S
y HA
C
● Adds 1-bit plus 1-bit
● Produces Sum and Carry x
+ y
───
x y C S C S
0 0 0 0
0 1 0 1
x S
1 0 0 1
1 1 1 0
y C
Full Adder
A full adder adds binary numbers and accounts for
values carried in as well as out.
The main difference between a half-adder and a
full-adder is that the full-adder has three inputs and
two outputs.
A one-bit full adder adds three one-bit numbers,
often written as A, B, and Cin.
It has two outputs, sum (S) and carry (Cout).
Truth Table
x y C S
0 0 0 0
INPUTS OUTPUTS
0 1 0 1
A B CIN COUT Sum
1 0 0 1
0 0 0 0 0
1 1 1 0
0 0 1 0 1
0 1 0 0 1
0 1 1 1 0
1 0 0 0 1
1 0 1 1 0
1 1 0 1 0
1 1 1 1 1
Solving Truth Table using K-Map

XOR’

OR

= AB+AC+BC
Analysing results
No of inputs = 3
No of outputs = 2
Inputs are A , B, Cin.
Outputs are Sum , Cout.
Designing circuit
CARRY=AB+ C*(A+B)
Binary Adder

 Full Adder x S
y FA
● Adds 1-bit plus 1-bit plus 1-bit z C

● Produces Sum and Carry x


+ y
y + z
x y z C S ───
0 1 0 1
0 0 0 0 0 C S
0 0 1 0 1 x 1 0 1 0
z
0 1 0 0 1
S = xy'z'+x'yz'+x'y'z+xyz = x  y  z
0 1 1 1 0
y
1 0 0 0 1
0 0 1 0
1 0 1 1 0
x 0 1 1 1
1 1 0 1 0
z
1 1 1 1 1 C = xy + xz + yz
Binary Adder

 Full Adder (0-4)10 x S


y FA
● Produces Sum and Carry z C

x
+ y
y + z
x y z C S ───
0 1 0 1
0 0 0 0 0 C S
0 0 1 0 1 x 1 X X X
z
0 1 0 0 1
S = x+y  z
0 1 1 1 0
y
1 0 0 0 1
0 0 1 0
1 0 1 X X
x 0 X X X
1 1 0 X X
z
1 1 1 X X C = yz
Binary Adder

 Full Adder S = xy'z'+x'yz'+x'y'z+xyz = x  y  z


x C = xy + xz + yz
y
z
x
y x
x z y
x S z S
y
z
x
x
x y
y y y
z x
x z C
y z
y
z x C
z
z
y
z
S = xy'+x'y= x  y S = xy'z'+x'yz'+x'y'z+xyz = x  y  z
Binary Adder C = xy C = xy + xz + yz

 Full Adder
x S
y HA HA

z C

x S=xy S = x  yS = xy'z'+x'yz'+x'y'z+xyz = x  y  z
Z S
S = x  y (x  y)*Z
y C = xy Z
(x C
 y)*Z+xy
=xy+xz+yz
z
Subtractor

 An Subtractor is a digital logic circuit in electronics that implements


subtraction of numbers.
 In many computers and other kinds of processors, Subtractor are
used not only in the arithmetic logic units, but also in other parts of
the processor, where they are used to calculate addresses, increment
and decrement operators, and similar operations.
 Substractor are classified into two types: 1)half Subtractor.
2) full Subtractor.
Let us first take a look at the subtraction of single bits.
 0-0 = 0
 0-1 = 11 (i.e. 0-1 = 1 with borrow = 1)
 1-0 = 1
 1-1 = 0
Half Subtractor
The half Subtractor subtracts two single binary
digits A and B.
 It has two outputs, Difference (D) and borrow (B).
The borrow signal represents an overflow into the next
digit of a multi-digit subtraction.
Truth Table

INPUTS OUTPUTS
A B DIFF BORROW
0 0 0 0
0 1 1 1
1 0 1 0
1 1 0 0
Solving truth table using K-map

Borrow = Ā.B Difference = A ⊕ B


Analysing results
No of inputs = 2
No of outputs = 2
Inputs are A , B.
Outputs are Difference , Borrow.
Difference can be obtained using XOR logic gate.
Borrow can be obtained using NOT and AND logic gate.
Designing circuit
Full Subtractor
A full Subtractor subtracts binary numbers and accounts
for values borrowed in as well as out.
The main difference between a half- Subtractor and a full-
Subtractor is that the full- Subtractor has three inputs and
two outputs.
A one-bit full Subtractor subtracts three one-bit numbers,
often written as A, B, and Bin.
It has two outputs, Difference (D) and borrow (B).
Truth Table
(A-B) –C = A - (B+C) 1 0-1=
INPUTS OUTPUTS
1-1=0-1=1
A B BIN BOUT Difference
0 0 0 0 0
A BC B’C’ B’C BC BC’
00 01 11 10
0 0 1 1 1
A’ 0 1 1 1
A 1 1 0 1 0 1 1
Borrow=A’C+A’B+BC 0 1 1 1 0
A BC B’C’ B’C BC BC’

A’ 0
00 01 11 10
1 0 0 0 1
1 1
A 1 1 1 1 0 1 0 0
Difference= 1 1 0 0 0
1 1 1 1 1
Solving Truth Table using K-Map

Difference is same as SUM


Analysing results
 No of inputs = 3
 No of outputs = 2
 Inputs are A , B, Bin.
 Outputs are Difference , Bout.
Thank you.
1+1+1+1= 100
Truth Table
SUM=A’B+AB’
0 I0 CARRY=AB
1 I1 MUX SUM INPUTS OUTPUTS
Y
1 I2 4X1
I3
A B SUM CARRY
0
S1 S0
0 0 0 0
A B 0 1 1 0
1 0 1 0
S S
0 I0 1 0 1 1 0 1
0 I1 MUX CARRY
Y
0 I2 4X1
1 I3
1+1+1+1= 100 A B SUM A B CARRY

0 0 0 SUM=B 0 0 0 CARRY=0
0 1 1 0 1 0
B I0 1 0 1 SUM=B’ 1 0 0 CARRY=B
B’ I1 MUX SUM 1 1 0 1 1 1
Y
2X1
S1

S
0 I0 1
B I1 MUX CARRY
Y
2X1
0 I0
33 / 1 I1
1 INPUTS OUTPUTS
65 I2
I3 MUX A B CIN Carry Sum
0 Y Sum
1 I4 8X1 0 0 0 0 0
0 I5 0 0 1 0 1
0 I6
0 1 0 0 1
1 I7
S2 S1 S0 0 1 1 1 0
1 0 0 0 1
I0 1 0 1 1 0
I1 1 1 0 1 0
I2
1 1 1 1 1
I3
Y
I4 MUX Carry
I5
I6
Eastern Mediterranean University

I7
1+1+1+1= 100 A B CIN CARRY
A B CIN sum
0 0 0 0 CARRY
0 0 0 0 sum =0
0 0 1 0
=C
C I0 0 0 1 1
0 1 0 0 CARRY
C’ I1 MUX SUM 0 1 0 1 sum
0 1 1 1
=C
Y =C’
C’ I2 4X1 0 1 1 0
1 0 0 0 CARRY
C I3 1 0 0 1 sum =C
S1 S0 1 0 1 1
=C’
1 0 1 0
1 1 0 1 CARRY
A B 1 1 0 0 sum =1
1 1 1 1
=C
1 1 1 1
S S
0 I0 1 0
C I1 MUX CARRY
Y
C I2 4X1
1 I3
1+1+1+1= 100 A B CIN sum A B CIN CARRY

0 0 0 0 0 0 0 0
0 0 1 1 0 0 1 0
R)C I0 0 1 0 1 0 1 0 0
R)C I1 MUX SUM 0 1 1 0 0 1 1 1
Y
2X1 1 0 0 1 1 0 0 0
S1 1 0 1 0 1 0 1 1
1 1 0 0 1 1 0 1
A 1 1 1 1 1 1 1 1

S
BC I0 1
B+C I1 MUX CARRY
Y
2X1

You might also like