Half Adder
Half Adder
0 0 1 1
+ 0 + 1 + 0 +_1
0 1
Sum
1 /
Carry
10
Sum
ADDER
• In electronics, an adder a digital circuit that
performs
is addition of numbers.
•In modern computers and other kinds of
processors, adders are used in the arithmetic logic
unit (ALU), but also in other parts of the processor,
where they are used to calculate addresses, table
indices, and similar operations.
•Although adders can be constructed for
many representations, such as binary-coded
numerical
decimal or excess-3, the most common adders
operate on binary numbers.
ii
Types of Adder
• There are two types of Adder
1.Half Adder
2.Full Adder
Half Adder
• The half adder accepts two binary digits on its inputs
A and B.
• It produce two binary digits outputs, a sum bit (S)
and a carry bit (C).
• The simplest half-adder design, pictured
incorporates an XOR gate for Sand an AND gate for C.
Carry <= X AND Y; Sum <= X XOR Y;
C.= ( 4 · B)
Diagram
Logic Input Output
Symbol: .!\
Half .,
B
Adder Co (carry out)
i---
r. (sum)
a -
Logic b -
XOR - Sum
Diagram :
AND Cout
Diagram
A
Logic 8
sum
Diagram:
carry out
)
x
> • l s
Logic x•
Diagram: >
x [
(a) S X } ' t- .i'y
c
> c
xy
Truth Table
0 0 0 0
0 1 0 1
1 0 0 1
1 1 1 0
Full Adder
• A full adds binary numbers and accounts for
adder
values carried in as well as out.
•A one-bit full adder adds three one-bit numbers input ,
often written as A, B, and Ci11; A and B are the operands, and
cin is a bit carried in.
Input Output
Logic Ci Full :E (sum)
Symbol: n Adder
A. Co (car ry out)
B
C(in)
Logic Sum
Diagram: •A L A I:
C(o)
8 ._ A I:
• B
Co
"
I
Diagram
a-i Half
b- Adder
EJ1-
i----.
_, Cout
ci
n, ------+I
!r 1I - ---, Sum
-
Truth Table
Inputs Output
A0 B0 0 0 0
Sum
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
• S is 1if an odd number of inputs are 1.
• COUT is 1if two or more of the inputs are 1.
• Sum is '1' when one of the following four
cases is true:
- a=1, b=O' c=O
Circuit of Adder
A
B
The Full Adder
x
s
:) )
y
C
i
n \
)
\ Cout
J
,,
The Full Adder
'iJ)' I x $ y) 1C n
s
I
I
\ n· (x @ )') Cin
-
(x '!' J) Cin + Xy L.
.I
-
Cin