Вы находитесь на странице: 1из 14

CM305 .

17
DEPARTMENT OF TECHNICAL EDUCATION
ANDHRAPRADESH
Name : B. Rama Sundari
Designation : Lecturer in ECE
Branch : Electronics & Comm. Engg.
Institute : Govt. Polytechnic for women,
Guntur
Year/ Semester : III
Subject : Digital Electronics
Subject Code : CM-305
Topic : Logic gates & Boolean Algebra
Duration : 50 mts.
Sub topic : 4-bit parallel adder/2complement
subtractor
Teaching aids : Diagrams
1
CM305 .17
How many number of full adders are required to

construct a 4-bit parallel adder? - Four


Can we perform the addition using subtraction circuit?

-Yes, by using 2s complement method of subtraction
2
CM305 .17
Objectives
On completion of this period, you would be able
to

Draw the block diagram of 4-bit parallel adder/ 2s
complement subtractor

Know the functioning of 4-bit parallel adder/ 2s
complement subtractor

3
CM305 .17
4


A
3
A
2
A
1
A
0
B
3
B
2
B
1
B
0
C
f
S
3
S
2
S
1
S
0
Addition of two
4-bit numbers
2s complement
subtraction of two
4-bit numbers


A
3
A
2
A
1
A
0
B
3
B
2
B
1
B
0

+
1
C
f
S
3
S
2
S
1
S
0
+
+
The advantage of 2s complement subtraction is
subtraction can be performed by the adder circuit
itself
Where C
f
is final
carry
CM305 .17
5
Output is in 2s complement form if B > A
Inverts each bit
of B if S is 1
Adds 1 to make
2s complement
S low for add,
high for subtract
4-bit parallel adder/2s complement subtractor
Fig 17.1
CM305 .17
The circuit performs addition as well as subtraction

When s input is low the circuit performs additon.

The EX-OR gate acts as a controlled inverter (i.e., it
inverts input when control is high, otherwise it passes the
input to the output)

The output of EX-OR gate is B when s input is low

The output of the circuit is sum of two input numbers
when s input is low


6
4-bit parallel adder/2s complement subtractor
CM305 .17
When s input is HIGH the EX-OR gate acts as inverter

and its output is the complement of input


The carry input of the first full adder is 1


The output of the circuit is the sum A, complement of

B and 1.

7
4-bit parallel adder/2s complement subtractor
(Continued)
CM305 .17
This performs 2s complement subtraction


The output of the circuit is in true magnitude form if the
A>B


The output of the circuit is in 2s complement form if the
A<B

CM305 .17
Summary
This circuit performs 4-bit addition as well as 2s

complement subtraction


The 2s complement subtraction is performed by using

the adder circuit itself

9
CM305 .17
The EX-OR gate acts as controlled inverter


When s input is 0 this performs addition


when s input is 1 this performs subtraction


This circuit is widely used in most of the ALUs


CM305 .17
QUIZ
The function of EX-OR gate in the 2s complement
adder/ subtractor circuit is

1. Inverter

2. Controlled inverter

3. Adder

4. Subtractor
11
CM305 .17
When S input is 1, the circuit performs
1. Addition

2. Subtraction

3. Inversion

4. None of the above
12
CM305 .17
Frequently asked quesitons in exam
1. Draw the circuit of 2s complement adder/ subtractor

circuit.


2. Explain the working of the above circuit.
13
CM305 .17
Assignment
1. Explain the use of Ex-or gate as controlled inverter.


2. What is the form of binary output when a large number

is subtracted from smaller number ? Explain with an

example
14

Вам также может понравиться