Digital Arithmetic: Operations and Circuits: Chapter-6
Digital Arithmetic: Operations and Circuits: Chapter-6
Digital Arithmetic:
Operations and Circuits
Afroza Sultana
Binary Addition
• The addition of two binary number is performed in exactly
the same manner as the addition of decimal numbers.
• Least-significant-digit first.
• “Carry” of 1 into the next position may be needed.
• 4 different cases for binary addition
0+0=0
1+0=1
1 + 1 = 10 = 0 + carry of 1 into next position
1 + 1 + 1 = 11 = 1 + carry of 1 into next position
• The operations of subtraction, multiplication, and division
actually use only addition as their basic operation
Examples
– 011.101 + 010.010
ans.) 101.111
– 10001111 + 00000001
ans.) 10010000
Representing signed numbers
Sign-magnitude system:
1 0 1 1 0 1 ( 45)
+ 0 1 0 0 1 0 (-45)
111111
Ans:
+9 : 0 1 0 0 1 (augend)
+4 : 0 0 1 0 0 (addend)
0 1 1 0 1 (sum = +13)
Sign bits
Addition
-9 : 1 0 1 1 1
+4 : 0 0 1 0 0
1 1 0 1 1 (sum = -5)
-9 : 1 0 1 1 1
-4 : 1 1 1 0 0
110011
Sign bit
This carry is disregarded;
The result is 10011(sum =-13)
Addition
• Case V: Equal and Opposite Numbers
-9 : 1 0 1 1 1
+9 : 0 1 0 0 1
100000
Sign bit
Disregard;
The result is 00000 (sum = +0)
Subtraction in the 2’s-complement
System
• The procedure for subtracting one binary
number (the subtrahend) from another binary
number (the minuend)
• Subtract 4 from 9
• (+9) – (+4) =(+9) + (-4)= (+5)
+9 : 0 1 0 0 1 (Minuend)
- 4 : 1 1 1 0 0 (Subtrahend)
1 0 0 1 0 1 (Difference = +5)
Disregard;
The result is 00101 (Difference = +5)
Subtraction
• Subtract 8 from -9
• (-9) – (+8) =(-9) + (-8)= (-17)
-9 : 1 0 1 1 1 (Minuend)
- 8 : 1 1 0 0 0 (Subtrahend)
1 0 1 1 1 1 (Difference = -17)
Magnitude
+275 = 0 0 1 0 0 1 1 1 0 1 0 1
+641 = 0 1 1 0 0 1 0 0 0 0 0 1
+916 = 1 0 0 0 1 0 1 1 0 1 1 0
0110
1001 0001 0110
3AF
23C
5EB Ans: Sum = 5EB
Hex Subtraction
• A quicker procedure: subtract each hex digit
from F; then add 1.
F F F
-7
8
-3
C
-A
5
} Subtract each digit from F
+1 Add 1
8 C 6 Hex equivalent of 2’s
complement
Example
Let , X B C IN
S A. X A. X A X A B C IN
COut BC IN ( A A) AC IN ( B B) AB (C IN C IN ) BC IN AC IN AB
Complete circuitry for a FA
Parallel Binary Adder
Parallel Adder
• All the bits of the augend and the addend are
fed into the adder ckt simultaneously.
• Parallel addition is extremely fast.
Complete Parallel Adder With Registers
IC Parallel Adder