Presentation is loading. Please wait.

Presentation is loading. Please wait.

Binary Addition Addition Rules: 0 + 0 = 0 + 1 = 1 + 0 = 1 + 1 = 1 + 1 + 1 = 0 1 1 0 carry 1 1 carry 1 Example 1: 0 1 0 1 + 0 1 1 0 110 1 1 Example 2:

Similar presentations


Presentation on theme: "Binary Addition Addition Rules: 0 + 0 = 0 + 1 = 1 + 0 = 1 + 1 = 1 + 1 + 1 = 0 1 1 0 carry 1 1 carry 1 Example 1: 0 1 0 1 + 0 1 1 0 110 1 1 Example 2:"— Presentation transcript:

1

2 Binary Addition Addition Rules: 0 + 0 = 0 + 1 = 1 + 0 = 1 + 1 = 1 + 1 + 1 = 0 1 1 0 carry 1 1 carry 1 Example 1: 0 1 0 1 + 0 1 1 0 110 1 1 Example 2: 1 0 1 1 1 + 1 0 0 1 0 1 010 1 10 1

3 Binary Multiplication Multiplication Rules: 0 x 0 = 0 x 1 = 1 x 0 = 1 x 1 = 0 0 0 1 Example: 1 0 1 X 1 1 1 101 0101 01001 + 110 1 0 1 01

4 Binary Subtraction A computer cannot subtract a number from another. It can only add two numbers Example: Subtract B from AA - B Add –B to AA + (-B) Complementation

5 Subtraction Rules Pad with 0’s until both numbers are the same length Take 2’s complement of the digit to be subtracted Add the result to the first binary number Ignore the carry result to preserve the initial size

6 Step 1: One’s Complement Example: Example: Find the one’s complement of 1001101 Number Number1001101 Invert bits Invert bits0110010 Step 2: Two’s Complement Number Number1001101 One’s complement One’s complement0110010 Add 1 Add 1+ 1 Two’s complement Two’s complement0110011 Adding 1 to the one’s complement of a binary digit Example: Example: Find the two’s complement of 1001101

7 Practice Examples Example 1: Example 1:Find the result of 101 - 10 Step 1: Two’s complement for 010 Number010 Invert bits101 Add 1+ 1 Code for -010 = 110 Step 2: Add answer with first number Number101 Code for -010 = 110 011


Download ppt "Binary Addition Addition Rules: 0 + 0 = 0 + 1 = 1 + 0 = 1 + 1 = 1 + 1 + 1 = 0 1 1 0 carry 1 1 carry 1 Example 1: 0 1 0 1 + 0 1 1 0 110 1 1 Example 2:"

Similar presentations


Ads by Google