Presentation is loading. Please wait.

Presentation is loading. Please wait.

NUMBER SYSTEMS.

Similar presentations


Presentation on theme: "NUMBER SYSTEMS."— Presentation transcript:

1 NUMBER SYSTEMS

2 DEC BIN OCT HEX DEC BIN OCT HEX
0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 10000 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 2 3 4 5 6 7 10 11 12 13 14 15 16 17 20 1 2 3 4 5 6 7 8 9 A B C D E F 10 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 10001 10010 10011 10100 10101 10110 10111 11000 11001 11010 11011 11100 11101 11110 11111 100000 21 22 23 24 25 26 27 30 31 32 33 34 35 36 37 40 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20

3 CONVERSIONS FROM ONE BASE TO ANOTHER BASE

4 Decimal to Binary 9410 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 94/64 = 1R30 1
BASE TWO PLACE VALUE CHART | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 9410 94/64 = 1R30 1 30/32 = 0R 30/16 = 1R 14/8 = 1R 6/4 = 1R 2/2 = 1R 0/1 = 0R =

5 Decimal to Binary 7210 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 72/64 = 1R8 1
BASE TWO PLACE VALUE CHART | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 7210 72/64 = 1R8 1 8/32 = 0R 8/16 = 0R 8/8 = 1R 0/4 = 0R 0/2 = 0R 0/1 = 0R =

6 Decimal to Binary 5110 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 51/32 = 1R19 1
BASE TWO PLACE VALUE CHART | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 5110 51/32 = 1R 19/16 = 1R 3/8 = 0R 3/4 = 0R 3/2 = 1R 1/1 = 1R =

7 BINARY TO DECIMAL Simply add up the binary place values where there is a one. Try it out on the last three slides and see how it works. Try converting the following Base two place value chart | 256 | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 | 11610 4310 21010 15810 Good Job

8 EASIEST CONVERSIONS Binary to Octal and Octal to Binary Each Base 8 digit has no more than 3 bits in the binary version. Binary to Octal Starting from the right, take groups of three bits, convert to base 8. = Octal to Binary Write three bits for each Base 8 digit 173608 =

9 EASIEST CONVERSIONS 11010000101111002 1101 0000 1011 1100 D 0 B C
Binary to Hexadecimal and to Hexadecimal to Binary Each Base 16 digit has no more than 4 bits in the binary version. Binary to to Hexadecimal Starting from the right, take groups of four bits, convert to base 16. D B C = D0BC16 Hexadecimal to Binary Write three bits for each Base 16 digit 3A4F16 A F =

10 ONCE BASE 2 CAN BE REACHED FROM THE OTHER BASES IT IS EASY TO GET FROM ANY BASE TO ANY OTHER BASE.
9810 = = = = = = = You try these. DEC BIN OCT HEX _________ _____ _____ EC ____ __________ _____ A9 ____ __________ _____ F

11 ADDING AND SUBTRACTING IN OTHER BASES
ADD SUBTRACT BASE 16 2A D96 +97F AE 93E E +6DA DA REMEMBER TO THINK AND SPEAK WITH BASE 10 NUMBERS (WE HAVE THE IDEA 10 ) BUT SEE AND WRITE BASE 16 NUMERALS (WE SEE AND WRITE A ) C23 3E8 1018 264

12 ADDING AND SUBTRACTING IN OTHER BASES
ADD SUBTRACT BASE 8 REMEMBER TO THINK AND SPEAK WITH BASE 10 NUMBERS (WE HAVE THE IDEA 8 ) BUT SEE AND WRITE BASE 8 NUMERALS (WE SEE AND WRITE 10 ) 620 57 752 233

13 ADDING AND SUBTRACTING IN OTHER BASES
ADD SUBTRACT BASE 2 REMEMBER TO THINK AND SPEAK WITH BASE 10 NUMBERS (WE HAVE THE IDEA 8 ) BUT SEE AND WRITE BASE 2 NUMERALS (WE SEE AND WRITE ) 11000 1101 To simplify the ALU (arithmetic logic unit) in the CPU, the only operation the computer performs is addition. How? By using one’s and two’s complement.---

14 ONE'S COMPLIMENT AND TWO'S COMPLEMENT
First, let’s look at base 10 ten’s and nine’s complement Instead use the ten’s compliment which is the next higher power of Ten’s complement - > 717 Add the 10’s compliment to the top number and throw away the carry 1279 Subtract: 562 -283 279 Easier way: Add 9’s complement So 562 This can be done easily Nine’s complement-> in your head Same as above 717

15 Now for the one’s and two’s complement
Subtract: - 101 100 Instead use the two’s compliment which is the next higher power of -101 Two’s complement - > 1011 Add the 2’s compliment to the top number and throw away the carry 10100 Easier way: Add 1’s complement So 1001 This can be done easily One’s complement-> in your head Same as above 1011 In the CPU the inverter or NOT Circuit performs the 1’s complement. Easiest method of all coming up next >

16 EASIEST WAY TO GET THE TWO'S COMPLEMENT
Subtract the long way. Rules for the easiest method 1. Copy the subtrahend exactly as it until and including the first one (1) 10 The easy method + 2. After the first one, invert (or NOT) all bits to the one’s complement. 1 1 1 10 3. Now we have the ten’s complement. Add this to the top number. 4. Discard the carry.

17 Note: Negative numbers in the computer are stored in
For Practice Write the two’s complement of these numbers. Good Job! Note: Negative numbers in the computer are stored in two’s complement form. Also: In positive binary numbers the last bit to the left is 0. In negative binary numbers the last bit to the left is 1.

18 THE END


Download ppt "NUMBER SYSTEMS."

Similar presentations


Ads by Google