Dr. Praveen Kumar: School of Electronics Engineering (SENSE) VIT-AP University E-Mail
Dr. Praveen Kumar: School of Electronics Engineering (SENSE) VIT-AP University E-Mail
Praveen Kumar
School of Electronics Engineering (SENSE)
VIT-AP University
E-Mail: [email protected]
CONTENTS
Module-2
Lecture-2
Number Systems 3
BOOKS
Textbooks
1. M.Morris Mano, Michael D Ciletti, Digital Design, 5th edition, Pearson Publishers, 2013.
2. R.P. Jain, “Modern Digital Electronics”, 4th edition, TMH.
References
1. M.Morris Mano, Charles R. Kime, Tom Martin, Logic and Computer Design Fundamentals, 4th edition,
Pearson Publishers.
2. C. H. Roth and L. L. Kinney, Fundamentals of Logic Design, 5th edition, Cengage Publishers.
A binary adder is a digital circuit that produces the arithmetic sum of 2 binary numbers.
It is also called as ripple carry adder or parallel adder.
Consider two 4-bit binary number A and B
A3 A2 A1 A0
1 1 Ci+1 Ci
A 1 0 1 1 A 1 0 1 1 Ai
B 0 0 1 1 +Bi
B3 B2 B1 B0
1 1 1 0 Si
B 0 0 1 1
Each bit position creates a
sum and carry
To demonstrate with the specific example, the two binary numbers A = 1011 and B = 0011.
Their sum S = 1110 is formed with the four-bit adder as follows:
The addition of 2 binary numbers using parallel adder implies that all the bits of augend and addend
are available at the same time.
From the 4-bit adder circuit, it can be observed that Ai and Bi are available at same time.
However, the generation of Ci+1 is depending upon Ci. This means the input carry C3 does not settle to
its final value until C2 is available from the previous stage. Similarly, C2 has to wait for C1 and so on
down to C0.
Thus, only after the carry propagates and ripples through all stages will the last output S3 and carry C4
settle to their final correct value.
Hence, to generate the final carry C4, 8-gate levels are needed which leads to more propagation delay.
Therefore, carry lookahead logic can be implemented to reduce the propagation delay.
These adders are called as fast adders or carry lookahead adder.
The Boolean functions for the carry outputs of each stage and substitute the value of each Ci from the
previous equations:
The subtraction of two binary number can be achieved by using 2’s complement
method.
The circuit for subtracting A – B consists of an adder with inverters placed between
each data input B and the corresponding input of the full adder. The input carry C0
must be equal to 1 when subtraction is performed.
The operation thus performed becomes A, plus the 1’s complement of B, plus 1. This
is equal to A plus the 2’s complement of B.
For unsigned numbers, that gives A – B if A ≥ B or the 2’s complement of (B – A) if
A < B.
Ai Bi Ai Bi’
Logic Design
The mode input M controls the operation. When M = 0, the circuit is an adder, and
when M = 1, the circuit becomes a subtractor.
Each exclusive-OR gate receives input M and one of the inputs of B.
When M = 0, we have B ⊕ 0 = B. The full adders receive the value of B, the input
carry is 0, and the circuit performs A plus B.
When M = 1, we have B ⊕ 1 = B’ and C0 = 1. The B inputs are all complemented
and a 1 is added through the input carry.
The circuit performs the operation A plus the 2’s complement of B.
Logic Design
M=0
an adder
M=1
a subtractor
−7 6 − 12 4
+8 −3 − 3 + 8
1 3 − 15 12
1 1 1 1 1 1 1 1 0 0
1 1001 0 0110 1 0100 0 0100
+ 0 1000 + 1 1101 + 1 1101 + 0 1000
--------- --------- --------- ---------
1 0 0001 1 0 0011 1 1 0001 0 0000
9 + 9 + 1 (Previous carry) = 19
The range of the binary sum will be from 0 - 19 i.e., in BCD, it is from 0000 to 00011001 (0000 to
10011 in binary)
Add the two BCD numbers, using the rules for binary addition.
If the sum is equal or less than 1001 (9) without any carry, then the BCD digit is a valid BCD digit.
If sum ≥ 𝟏𝟎𝟏𝟎 (10), then the result is an invalid BCD digit, then add 0110 (6) to the binary sum to get
a valid BCD digit and can also produce a carry as well.
1. If Z8 and Z2 are 1
2. If Z8 and Z4 are 1
3. If carry K is 1
Output carry