Presentation is loading. Please wait.

Presentation is loading. Please wait.

Negative Numbers Module M3.3 Section 2.4. Negative Numbers Subtract by adding 73 -35 38 10’s complement 73 +65 138 Ignore carry.

Similar presentations


Presentation on theme: "Negative Numbers Module M3.3 Section 2.4. Negative Numbers Subtract by adding 73 -35 38 10’s complement 73 +65 138 Ignore carry."— Presentation transcript:

1 Negative Numbers Module M3.3 Section 2.4

2 Negative Numbers Subtract by adding 73 -35 38 10’s complement 73 +65 138 Ignore carry

3 Negative Numbers 10’s complement : Subtract from 100 100 -35 65 Take 9’s complement and add 1 99 -35 64 +1 65

4 Negative Numbers 2’s complement: Subtract from 100000000 01001101 10110011 Take 1’s complement and add 1 11111111 -01001101 10110010 +1 10110011

5 Finding 2’s Complement 0 1 0 1 1 0 0 0 Copy all bits to first 1 2’s complement 0001 Complement remaining bits 0101

6 Negative Number Take 2’s Complement 75 10 = 4B 16 = 01001011 -75 10 = B5 16 = 10110101 FF -4B B4 +1 B5

7 Negative Number Take 2’s Complement 1 10 = 01 16 = 00000001 -1 10 = FF 16 = 11111111 128 10 = 80 16 = 10000000 -128 10 = 80 16 = 10000000

8

9 Signed Numbers 4-bit: 8H = -8 to 7H = +7 1000 to 0111 8-bit: 80H = -128 to 7F = +127 16-bit: 8000H = -32,768 to 7FFFH = +32,767 32-bit: 80000000H = -2,147,483,648 to 7FFFFFFFH = +2,147,483,647

10 Questions What is the two’s complement of 00101100? What hex number represents the decimal number -40?


Download ppt "Negative Numbers Module M3.3 Section 2.4. Negative Numbers Subtract by adding 73 -35 38 10’s complement 73 +65 138 Ignore carry."

Similar presentations


Ads by Google