Professional Documents
Culture Documents
CLD2
CLD2
Borrow 1
1st Number 1 0 1 1
2nd Number 1 1 0
Result 1 0 1
Binary Multiplication
• Four Basic rules for binary multiplication
• Anything multiplied by 0 results in 0 just like in decimal
multiplication.
1st digit 2nd digit Product
0 0 0
0 1 0
1 0 0
1 1 1
Binary Multiplication
1101 (13)
x 101 (5)
1st product term 1101
2nd product term 0000x
3rd product term 1101xx
Product 1000001 (65)
1011 -5 1011 -5
1110 -2 0010 +2
1001 -7 1101 -3
• Rule: Discard Carry-out from MSB
• What’s the advantage?
• Computer processes them efficiently
• No need to separate signs for addition/subtraction.
• One single system for addition/subtraction
Roadmap
• Binary to Decimal Conversion
• Decimal to Binary Conversion
• Binary-Decimal Fraction Conversion
• Binary Arithmetic
• Signed and Unsigned Numbers
• Range of Numbers
Range of Numbers
• Maximum Range
• Number of digits
• Decimal number example
• Binary number example
• Overflow
Range of Binary Numbers
Decimal Sign Magnitude 2’s Complement Unsigned
Number 2n-1, 2n-1 -1 2n-1, 2n-1 -1 2n, 2n - 1
0 0000 0000 000
1 0001 0001 001
2 0010 0010 010
3 0011 0011 011
4 0100 0100 100
5 0101 0101 101
6 0110 0110 110
7 0111 0111 111
Range of Binary Numbers
Decimal Sign Magnitude 2’s Complement Unsigned
Number 2n-1-1, -(2n-1 -1) 2n-1, -2n-1
-8 1000
-7 1111 1001
-6 1110 1010
-5 1101 1011
-4 1100 1100
-3 1011 1101
-2 1010 1110
-1 1001 1111