Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.

Similar presentations


Presentation on theme: "Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers."— Presentation transcript:

1 Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers

2 Let us review the decimal system… It is called Base 10 and uses 10 characters, the numbers 0 through 9.

3 Each position has a value, ones, tens, hundreds, etc. Remember, we move to the right to find the values. Example: 258 The 2 is hundreds, 5 is tens, and 8 is ones.

4 We find the values by multiplying by 1, 10, 100, etc. 2 X 100 = 200 5 X 10 = 50 8 X 1 = 8 This totals to 258.

5 It’s binary time!!!!!

6

7 Bi means two. Therefore, binary numbers have only two choices, either 0 or 1.

8 Here is an example of a binary number 0 0 1 0 1 0 1 1 This would convert to 43 in our decimal number system.

9 LOST ????

10 Think of each 1 or 0 as a light switch being on or off. 1 means on and 0 means off.

11 Each position of the 1 or 0 has a decimal value. We start on the right with the value of 1. We move to the left and double it to find the next value.

12 128 64 32 16 8 4 2 1 0 0 1 0 1 0 1 1 The decimal numbers increase in value from right to left.

13 128 64 32 16 8 4 2 1 0 0 1 0 1 0 1 1 We add all of the decimal numbers having a binary position value of 1.

14 128 64 32 16 8 4 2 1 0 0 1 0 1 0 1 1 43 = 32 + 8 + 2 + 1

15 Practice

16 128 64 32 16 8 4 2 1 0 1 0 1 1 1 1 0 ? = + + + +

17 Did you find the answer to be 94?

18 128 64 32 16 8 4 2 1 1 1 1 0 0 0 1 1 Answer: 227 More practice:

19 Try these: 0 1 0 0 1 0 1 1 1 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0

20 Your answers should be: 75 141 90

21 Now it’s hexadecimal time!!! 3F7A

22 Hexadecimal is referred to as a Base 16 system. This means we use 16 characters when counting. Our decimal system is Base 10 and uses ten characters(the numbers 0 to 9).

23

24 Do you notice a pattern from the chart? It starts over with multiples of 16(and you thought Math would never be used).

25 Hexadecimal uses the numbers 0 through 9 and letters A through F as its characters. This makes 16 characters, thus, Base 16.

26 When counting in hexadecimal, think of the characters as being place holders rather than digits. The decimal 24 would be hexadecimal one eight. Also, decimal 29 would be one D. Review the table.

27 Get a copy of the table from the instructor.

28 How do I convert decimal to hexadecimal???? Divide by 16 and find the remainder.

29 Example: 18  16 = 1 with remainder of 2. So, decimal 18 would be hex one two (12).

30 Ex: 24  16 = 1 remainder 8. So, decimal 24 would be hex one eight (18h). The small h denotes the number is hexadecimal.

31 What about 30? Divide by 16 to get 1 remainder 14. Now what?? There are probably 4 or 5 ways to go from here. Most people just count to 14 to find what letter is needed. This will find the answer to be one E (1Eh).

32 Try 66?

33 Was the answer 42h? 66  16 = 4 remainder of 2.

34 Practice changing decimal to hex: 80 85 92 159 160

35 Answers: 50h 55h 5Ch 9Fh A0h

36 How is the answer A0????? What character comes after 9? A

37 See a pattern??? If the decimal is evenly divisible by 16, then the hexadecimal ends in zero.

38 Remember, the sequence repeats every 16 characters. Continue with the LAP…

39 0 + 0 = 0 1 + 0 = 1 0 + 1 = 1 1 + 1 = 10 (carry of 1 to the next higher column) 0 1 1 0 0 1 -------- 1 0 0 1 0 1 0 (10) 0 0 1 1 (03) --------- 1 1 0 1 (13) 1 1 1 1 1 1 1 1 0 (30) 0 1 0 1 1 (11) --------------- 1 0 1 0 0 1 (41) 1 1 1 1 0 1 1 1 (23) 1 0 1 0 1 (21) ---------------- 1 0 1 1 0 0 (44)

40 0 – 0 = 0 1 – 0 = 1 1 – 1 = 0 0 – 1 = 1 (with a borrow from the next higher column) 1 1 0 0 (12) 1 0 0 0 (08) ------------- 0 1 0 0 (04) 1 1 0 1 1 (27) 0 1 0 0 1 (09) ----------------------- 1 0 0 1 0 (18) 0 1 1 0 1 0 1 1 ----------- 0 1 0 1 2 0 2 0 2 1 0 1 0 1 (21) 0 1 1 1 0 (14) ----------- 0 0 1 1 1 (07)

41 0* 0 = 0 1 * 0 = 0 0 * 1 = 0 1 * 1 = 1 (Multiplication table) 0 / 0 = 0 1 / 0 = 0 1 / 1 = 1 (Division Table)

42 Convert Binary into Real number Note: real numbers – the whole number which have decimal value 1110.01 = ?


Download ppt "Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers."

Similar presentations


Ads by Google