PDF Archive

Easily share your PDF documents with your contacts, on the Web and Social Networks.

Share a file Manage my documents Convert Recover PDF Search Help Contact



Lecture 12 Binary Adder Subtractor .pdf



Original filename: Lecture 12 Binary Adder-Subtractor.pdf
Author: ABU-SALEM

This PDF 1.5 document has been generated by Microsoft® Office Word 2007, and has been sent on pdf-archive.com on 20/01/2016 at 08:15, from IP address 115.249.x.x. The current document download page has been viewed 10262 times.
File size: 887 KB (8 pages).
Privacy: public file




Download original PDF file









Document preview


Objectives:
1.
2.
3.
4.
5.

Half Adder.
Full Adder.
Binary Adder.
Binary Subtractor.
Binary Adder-Subtractor.
1. Half Adder

Half Adder: is a combinational circuit that performs the addition of two bits,
this circuit needs two binary inputs and two binary outputs.
Inputs Outputs
0
0
1
1

0
0
0
1
0
1
0
0
1
1
1
0
Truth table

The simplified Boolean function from the truth
table:
(Using sum of product form)
Where

is the sum and

is the carry.
(Using XOR and AND Gates)

X

X Y

Y

X

S

C

Implementation of Half Adder using equation (1)

Y

S

C

Implementation of Half Adder using equation (2)

 The implementation of half adder using exclusive–OR and an AND
gates is used to show that two half adders can be used to construct a full
adder.
 The inputs to the XOR gate are also the inputs to the AND gate.
2. Full Adder
Full Adder is a combinational circuit that performs the addition of three bits
(two significant bits and previous carry).
 It consists of three inputs and two outputs, two inputs are the bits to be
added, the third input represents the carry form the previous position.
 The full adder is usually a component in a cascade of adders, which add
8, 16, etc, binary numbers.
Inputs

Outputs

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
Truth table for the full adder

YCin

00

01

11

10

1

0

0

0

1

0

0

1

0

1

1

1

YCin

00

01

11

10

0

0

1

0

1

1

0

1

X

 The output is equal to 1 when
only one input is equal to 1 or when all
three inputs are equal to 1.
 The
output has a carry 1 if
two or three inputs are equal to 1.
 The Karnaugh maps and the
simplified expression are shown in the
following figures:

S  XYCin  XYCin  XYCin  XYCin

X

C out  XY  XC in  YC in

(Sum of products)

 The logic diagrams for the full adder implemented in sum-of-products
form are the following:
X X Y Y Cin Cin

S

C out

logic diagram for the full adder

 It can also be implemented using two half adders and one OR gate
(using XOR gates).

Proof:
The sum:

The carry output:

X

Y C in

First Half Adder

Second Half Adder

X  Y  C

X Y

in

S

 X Y C

XY

in

 XY

Cout
Implementation of Full Adder with two Half Adders and an OR gate

3. Binary Adder (Asynchronous Ripple-Carry Adder)
 A binary adder is a digital circuit that produces the arithmetic sum of
two binary numbers.
 A binary adder can be constructed with full adders connected in
cascade with the output carry form each full adder connected to the
input carry of the next full adder in the chain.
 The four-bit adder is a typical example of a standard component .It can
be used in many application involving arithmetic operations.
B3

C

C4

S3

B1

A2

B2

A3

C1

C2

3

S

2

A0

B0

A1

S1

C0

S0

Four-bit Adder (Ripple Carry Adder)

 The input carry to the adder is
and it ripples through the full adders to
the output carry .
 -bit binary adder requires full adders.

Example:
and
Subscript
Input Carry
+
Sum
Output Carry

3
0

2
1

1
1

0
0

1

0

1

1

0
1
0

0
1
0

1
1
1

1
0
1

Carry Propagation
 The addition of
binary numbers in parallel implies that all the
bits of and are available for computation at the same time.
 As in any combinational circuit, the signal must propagate through the
gates before the correct output sum is available.
 The output will not be correct unless the signals are given enough time
to propagate through the gates connected form the input to the output.
 The longest propagation delay time in an adder is the time it takes
the carry to propagate through the full adders.
Ai

P

i

Pi  Ci

Si

Bi

G

i

Pi C i  Gi

Ci1
Ci

Full Adder with P and G

 The signal form the carry input
to the output carry
propagates
through an AND gate and an OR gate, which equals 2 gate levels.
o If there are 4 full adders in the binary adder, the output carry
would have 2×4=8 gate levels, form
to
o For an -bit adder,
gate levels for the carry to propagate form
input to output are required.

 The carry propagation time is an important attribute of the
adder because it limits the speed with which two numbers are added.
 To reduce the carry propagation delay time:
1) Employ faster gates with reduced delays.
2) Employ the principle of Carry Lookahead Logic.
Proof: (using carry lookahead logic)

The output sum and carry are:

-called a carry generate, and it produces a carry of 1 when both
and
are 1.
 -called a carry propagate, it determines whether a carry into
stage will propagate into stage
.
 The Boolean function for the carry outputs of each stage and substitute
the value of each form the previous equations:


 The three Boolean functions
lookahead generator.

,

and

are implemented in the carry

The two level-circuit for the output carry
is not
shown, it can be easily derived by the equation.


does not have to wait for
propagated at the same time as

and
and .

to propagate, in fact

is

C 0 P 0 G 0 P 1 G1 P 2 G2

C3

C2

C

1

Logic Diagram for Carry Lookahead Generator

 The construction of a four-bit adder with a carry lookahead scheme is the
following:
C4

A3

P3

B3

P3

G3
A2
B2

P

C

P

B1

1

G1
A

0

B

0

S3
3

P2

2

G2

A1

P

C4

Carry C 2
Lookahead
Generator

S2

P1

S1

C1

0

P0

G0

C0

C0

four-bit adder with a carry lookahead scheme

S0








4. Binary Subtractor
To perform the subtraction
, we can use the 2's complements, so
the subtraction can be converted to addition.
2's complement can be obtained by talking the 1’s complement and
adding 1 to the LSD bit.
1) 1’s complement can be implemented with inventors.
2) 1 can be added to the sum through the input carry.
The circuit for subtracting
consists of an adder with inverters placed
between each data input and the corresponding input of the full adder.
The input carry
must be equal to 1.
5. Binary Adder–Subtractor
The addition and subtraction operations can be combined into one circuit
with one common binary adder by including an exclusive-OR gate with
each full-adder.

The mode input

controls the operation as the following:

→adder.
→ subtractor.
 Each XOR gate receives signal and
o When
then
and the carry = 0, then the circuit
performs the operation
.
o When
then
and the carry = 1, then the circuit
performs the operation
.
 The exclusive-OR with output is for detecting an overflow.
o (
o


Related documents


PDF Document counit6
PDF Document ldunit4
PDF Document a
PDF Document 26i15 ijaet0715628 v6 iss3 1250to1255
PDF Document lecture 12 binary adder subtractor
PDF Document 17n13 ijaet0313457 revised


Related keywords