Professional Documents
Culture Documents
Lecture # 1_B
Chapter 1 1
ARITHMETIC OPERATIONS
1. Addition
2. Subtraction
3. Multiplication
4. BCD Addition
Chapter 1 2
One’s Complement
Chapter 1 3
Two’s Complement
Chapter 1 4
Chapter 1 5
Addition of Two Binary Numbers
Chapter 1 6
Subtraction of Two Binary Numbers
Chapter 1 7
Binary Subtraction using 2’s complement
1100
2’s Complement
0111
1100
1 0011
Chapter 1 8
Multiplication of Two Binary Numbers
Chapter 1 9
Binary Coded Decimal (BCD)
Chapter 1 10
Warning: Conversion or Coding?
• Do NOT mix up conversion of a decimal number to a binary number
with coding a decimal number with a BINARY CODE.
Chapter 1 11
Binary Coded Decimal (BCD)
Chapter 1 12
Decimal to Binary Coded Decimal (BCD)
Chapter 1 13
Binary Coded Decimal (BCD) to Decimal
Chapter 1 14
BCD Arithmetic
Given a BCD code, we use binary arithmetic to add the digits:
8 1000 Eight
+5 +0101 Plus 5
13 1101 is 13 (> 9)
Note that the result is MORE THAN 9, so must be represented by two digits!
8 1000 Eight
+5 +0101 Plus 5
13 1101 is 13 (> 9)
+0110 so add 6
Chapter 1 15
Example
Chapter 1 16
Chapter 1 17