Presentation is loading. Please wait.

Presentation is loading. Please wait.

Number Systems Different number systems Representation of numbers in binary Conversion between decimal and binary, Conversion between binary and hexadecimal.

Similar presentations


Presentation on theme: "Number Systems Different number systems Representation of numbers in binary Conversion between decimal and binary, Conversion between binary and hexadecimal."— Presentation transcript:

1 Number Systems Different number systems Representation of numbers in binary Conversion between decimal and binary, Conversion between binary and hexadecimal Use of subscripts 2, 10 and 16 for bases

2 Number Systems Decimal number system – Base 10 = 1, 2,3 4, 5, ect.. Binary number system –Base 2 = 0001, 0010, 0011, ect… Hexadecimal number system = Base 16 = 9, A, B, 4C ect…

3 Decimal Number Systems HundredsTensUnits 341 10 2 10 1 10 0 300401 300 + 40 +1 = 341 Decimal numbers are base 10 They are made up of 10 numbers – 0,1,2,3,4,5,6,7,8,9. Combining the ten numbers will create units, tens, hundreds and thousands

4 Split the following decimal numbers HundredsTensUnits 550 HundredsTensUnits 982

5 Answers HundredsTensUnits 550 10 2 10 1 10 0 500500 500 + 50 + 0 = 550 10 HundredsTensUnits 982 10 2 10 1 10 0 900802 900 + 80 + 2 = 982 10

6 Binary Number System Binary numbers are base 2 Computer language They are made up of 2 numbers – 1 and 0 DecimalBinaryDecimalBinary 0 10 0202 5 10 101 2 1 10 1212 6 10 110 2 2 10 10 2 7 10 111 2 3 10 11 2 8 10 1000 2 4 10 100 2 9 10 1001 2

7 Hexadecimal Number Systems Hexadecimal numbers are base 16 Computer memory locations They are made up of 16 numbers DecimalHexDecimalHex 0 10 0 16 5 10 5 16 1 10 1 16 6 10 6 16 2 10 2 16 7 10 7 16 3 10 3 16 8 10 8 16 4 10 4 16 9 10 9 16 DecimalHex10 A 16 11 10 B 16 12 10 C 16 13 10 D 16 14 10 E 16 DecimalHex 15 10 F 16

8 Importance of Base numbers Writing the base numbers is very important as; ◦ 15 10 and 15 16 are not the same number but without the base they would be both considered as the same number ◦ 10 10 and 10 2 are not the same number as 10 2 represents 2 10

9 Complete the table NumberNumber System 20 10 2A 16 1010101 2 101 10 15 16 111000111 2

10 Answers NumberNumber System 20 10 Decimal 2A 16 Hexadecimal 1010101 2 Binary 101 10 Decimal 15 16 Hexadecimal 111000111 2 Binary

11 Converting Binary to Decimal

12 Explanation 1. Write down the placement value on top of each number. 2. Write the values that are on (the ones with a one under them 3. Add the numbers together 2424 23232 2121 2020 168421

13 Example We want to convert 11001 2 to decimal 2424 23232 2121 2020 11001 168421 81 16 + 8 + 1 25

14 Working Convert the following to decimal 1. 101010 2 2. 111011 2 3. 10101001 2 4. 001100111 2 5. 111010100 2

15 Answers Convert the following to decimal 1. 101010 2 = 42 10 2. 111011 2 = 59 10 3. 10101001 2 = 169 10 4. 001100111 2 = 103 10 5. 111010100 2 = 468 10

16 Converting Decimal to Binary

17 Method One 1. Write down the placement values of binary 2. Chose the numbers that add up to you decimal number 3. Put a 1 under the numbers used to add up to your decimal number 1246432168421

18 Example Convert 46 10 to binary 1246432168421 00101110 32 + 8 + 4 + 2 = 46 46 10 = 00101110 2

19 Method Two Divide the original number by 2 and write down the remainder even if it is 0 Keep on dividing the decimal numbers by 2 until 1 is divided by 2 Write down the remainders next to each other starting from the bottom moving upwards

20 Example Convert 46 10 to binary Ans  46 10 = 101110 2 46/2=23r0 /2=11r1 /2=5r1 5/2=2r1 2/2=1r0 1/2=0r1

21 Working Convert the following decimal numbers to binary 1. 10 10 2. 66 10 3. 120 10 4. 35 10 5. 88 10

22 Answers Convert the following decimal numbers to binary 1. 10 10 = 1010 2 2. 66 10 = 1000010 2 3. 120 10 = 1111000 2 4. 35 10 = 100011 2 5. 88 10 = 1011000 2

23 Converting Binary to Hexadecimal

24 Explanation Split the binary number into groups of 4 1001110 = 0100 – 1110 Write the 2 x on top of each number starting from the right Add the numbers that are on Write down the totals, if a total is larger than 9, convert it to the hex letter 01001110 23232 2121 2020 23232 2121 2020 84218421 414 4E 16 NOTE: when we do not have enough bits lefts to create a group of 4 we add 0s

25 Example Convert 1100111 2 in Hexadecinal 01100111 23232 2121 2020 23232 2121 2020 84218421 67 67 16

26 Working Convert the following into Hexadecimal 1. 111010100 2 2. 1110111 2 3. 101010 2 4. 111 2 5. 1110001 2

27 Working Convert the following into Hexadecimal 1. 111010100 2 = 1D4 16 2. 1110111 2 = 77 16 3. 101010 2 = 2A 16 4. 111 2 = 7 16 5. 1110001 2 = 71 16

28 Converting Hexadecimal to Binary

29 Explanation 1. Write each individual number in the hexadecimal number eg B4 16 2. Write the binary placement values for each hex number 3. List 1s under the placement values that are on B = 114 23232 2121 2020 23232 2121 2020 84218421 10110100 10110100 2 4. Write the split binary number as one whole number

30 Example Convert 2C 16 to binary 2C = 12 23232 2121 2020 23232 2121 2020 84218421 00101100 00101100 2

31 Working Convert the following hex numbers to binary 1. AB 16 2. F7 16 3. 15 16 4. CC 16 5. 22 16

32 Answers Convert the following hex numbers to binary 1. AB 16 = 10101011 2 2. F7 16 = 11110111 2 3. 15 16 = 00010101 2 4. CC 16 = 11001100 2 5. 22 16 = 00100010 2

33 Converting Decimal to Hexadecimal

34 Method One Divide the decimal number by 16 taking note of the remainders Keep on dividing the whole number by 16 until the whole number obtained is 0. Write down the remainders next to each other starting from the bottom, changing numbers greater than 9 to letters 465/16=29r1 /16=1r13 1/16=0r1 ANS = 1D1 16

35 Example Convert 800 10 to hexadecimal 800/16=50r0 /16=3r2 3/ =0r3 ANS = 320 16

36 Method Two 1. Convert the decimal number to binary 2. Convert the binary number to hexadecimal Eg, changing 456 10 to hexadecimal

37 Example Convert 800 10 to hexadecimal 5122561286432168421 1100100000 512 + 256 + 32 = 800 800 10 = 1100100000 2 001100100000 23232 2121 2020 23232 2121 2020 23232 2121 2020 842184218421 320 320 16

38 Working Convert the following to Hexadecimal numbers 1. 340 10 2. 119 10 3. 66 10 4. 25 10 5. 111 10

39 Answers Convert the following to Hexadecimal numbers 1. 340 10 = 154 16 2. 119 10 = 77 16 3. 66 10 = 42 16 4. 25 10 = 19 16 5. 111 10 = 6F 16

40 Converting Hexadecimal to Decimal

41 Explanation Writing down the placement values on top of each number starting with 16 0 Multiply the top value with the hexadecimal number. Add all the results 16 2 256 16 1 16 16 0 1 43A (256x4)(16x3)(1x10) 10244810 =1024+48+10 =1082 10 Converting 43A 16 to decimal

42 Working Convert the following into decimal 1. 55 16 2. CB 16 3. F8 16 4. B4 16 5. 90 16

43 Answers Convert the following into decimal 1. 55 16 = 85 10 2. B0 16 = 176 10 3. 2F8 16 = 760 10 4. B4 16 = 180 10 5. 90 16 = 144 10

44 Homework Copy and complete this table DecimalBinaryHexadecimal 21 10 101010100 2 2E 16 159 10 00111000 2 1C2 16 44 10


Download ppt "Number Systems Different number systems Representation of numbers in binary Conversion between decimal and binary, Conversion between binary and hexadecimal."

Similar presentations


Ads by Google