Display/: Batch: 12electronics Department of Electronics Mehran University of Engineering & Technology, Pakistan
Display/: Batch: 12electronics Department of Electronics Mehran University of Engineering & Technology, Pakistan
org/simple-quiz-
display/ BATCH: 12ELECTRONICS
DEPARTMENT OF ELECTRONICS
MEHRAN UNIVERSITY OF ENGINEERING &
TECHNOLOGY, PAKISTAN
1+1 = 210
= 102 = 0 with 1 to carry
1+1+1 = 310
= 112 = 1 with 1 to carry
A1 B1 Cin ∑1 Cout
A0 B0 ∑0 Cout
0 0 0 0 0
0 0 0 0
0 0 1 1 0
0 1 1 0
0 1 0 1 0
1 0 1 0
0 1 1 0 1
1 1 0 1
1 0 0 1 0
•Truth table for Addition of 2 Binary bits 1 0 1 0 1
•General Form: A0+B0=∑0+Cout
1 1 0 0 1
C in C in
1 1 1 1 1
A1 A0
B1 B0 •Truth table for Addition of 3 Binary bits
+ •General Form: A1+B1+ Cin=∑1+Cout
∑2 ∑1 ∑0
+ +
C out C out
Col 1) Add 1 + 0 = 1
Example 1: Add Write 1
binary 110111 to 11100 Col 2) Add 1 + 0 = 1
Write 1
Col 3) Add 1 + 1 = 2 (10 in binary)
1 1 1 1 Write 0, carry 1
1 1 0 1 1 1 Col 4) Add 1+ 0 + 1 = 2
+ 0 1 1 1 0 0 Write 0, carry 1
Col 5) Add 1 + 1 + 1 = 3 (11 in binary)
1 0 1 0 01 1 Write 1, carry 1
Col 6) Add 1 + 1 + 0 = 2
Write 0, carry 1
Col 7) Bring down the carried 1
Write 1
You can always check your Verification
answer by converting the
figures to decimal, doing the 1101112 5510
addition, and comparing the
answers. +011100 2 + 28 10
8310
1 1 0 1 1 1
+ 0 1 1 1 0 0 1 0 1 0 0 1 12
1 01 00 1 1 = 64+0+16+0+0+2+1
= 8310
Example 2: Verification
Add 1111 to 111010. 1110102 5810
+ 0011112 +1510
1 1 1 1 1 7310
1 1 1 0 1 0
+ 0 0 1 1 1 1 64 32 16 8 4 2 1
1 0 0 1 0 0 1
1 0 0 1 0 0 1
= 64 + 8 +1
= 7310
Example7-1:
5 101 18 00010010
+2 + 011 + 2 + 00000010
7 111 20 00010100
0 0 0 0 Partial products
1 1 0 1
1 1 0
+ 0 0 1
0 0
1 0 0 1 1 1 0 Product
There are four partial products which are added to form the
result
1 1 0 1
x 1 0 1 1
1 1 0 1 Add
1 1 0 1 Shift, then add
0 0 0 0
Shift
1 1 0 1
Shift, then add
1 0 0 0 1 1 1 1
Q: Divide 1 0 0 1 0 01 1 by 1 01 1
0 0 0 0 1 1 0 1 Quotient
Divisor 1 0 1 1 1 0 0 1 0 0 1 1 Dividend
1 0 1 1
Partial 0 0 1 1 1 0
Remainder 1 1 0 1 1
0 0 0 0 1 1 1 1
Partial
Remainder 2 1 0 1 1
1 0 0 Remainder
Quotient = 1 1 01
Remainder = 1 0 0
Multiply the number by 2.
Example: 0.812510 = (?)2
0.8125x2 =1.625 = 0.625 carry1
0.625x2 = 1.25 = 0.25 carry1
0.25x2 = 0.5 = 0.5 carry0
0.5x2 =1.0 =0 carry1
So 0.812510 = 0.11012
Example: 0.7710 = (?)2
0.77x2 =1.54 =0.54 carry1
0.54x2 =1.08 =0.08 carry1
0.08x2 =0.16 =0.16 carry0
0.16x2 =0.32 =0.32 carry0
0.32x2 =0.64 =0.64 carry0
0.64x2 =1.28 =0.28 carry1 and so on
We may stop here but the answer would be approximate.
0.7710 ≈ 0.1100012
Example: 25.62510 = (?)2
2 25 1
0.625x2 =1.25 =0.25 carry1
2 12 0
0.25x2 =0.5 =0.5 carry0
2 6 0 0.5x2 =1.0 =0.0 carry1
2 3 1 0.625 = 0.101
1
0110 0110
0001 0110 0011 0111 (1637)10
Example 7-17: convert decimal to BCD add them.
Convert the result back to check your answer.
a) 8+7 = ?
8 1000
+7 +0111
1510 1111 (invalid BCD)
+0110 (add 6)
1 0100 (0001 0101)BCD =1510
b) 52 + 63 = ?
c) 78 + 69 = ?
d) 123+23 = ?
e) 123 + 19 = ?
1. Add the two hex digits by working with their
decimal equivalents
2. If the decimal sum is <16, write down the hex
equivalent
3. If the decimal sum is 16 or more, write down
the hex result in that column, and carry 1 to
the next more significant column.
9 + C =?
C = 1210
+910
2110 > 1610 so 2110 –1610 = 510
1610 = 1016
+5
1516
9 + C = 15H
4F + 2D = ?
A7C5 + 2DA8 = ?
Alternative Method: convert to binary and then
add
0100 1111 4F
+0010 1101 +2D
0111 1100 7C
24 –C = ?
D7 –A8 = ?
A05C –24CA = ?