Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2016 AQA. Created by Teachit for AQA 3.3.2 Converting between number bases Lesson.

Similar presentations


Presentation on theme: "© 2016 AQA. Created by Teachit for AQA 3.3.2 Converting between number bases Lesson."— Presentation transcript:

1 © 2016 AQA. Created by Teachit for AQA 3.3.2 Converting between number bases Lesson

2 © 2016 AQA. Created by Teachit for AQA Objectives Understand how binary can be used to represent whole numbers. Understand how hexadecimal can be used to represent whole numbers. Be able to convert in both directions between: binary and decimal, binary and hexadecimal, decimal and hexadecimal.

3 © 2016 AQA. Created by Teachit for AQA Starter activity In pairs… Give three reasons why a knowledge of binary is useful to working with computers and understanding how computers work. Did you think of any of these? Programming Computer architecture Computer networks

4 © 2016 AQA. Created by Teachit for AQA Converting between number bases A byte is a collection of eight bits and may be represented as follows: Value as power of 22727 2626 2525 2424 23232 2121 2020 Decimal value1286432168421 Sample 8-bit pattern01011001 Individual values0640168001 Total decimal value64 + 16 + 8 + 1 = 89 Key point When one byte of storage is used, it does not matter how much you rearrange the ones and zeros, the maximum number in base 10 that can be stored is 255 (and 0 is the minimum).

5 © 2016 AQA. Created by Teachit for AQA Converting decimal to binary Example: Convert the number 115 10 into 8-bit binary. Reading from left to right, look at each column in turn. 1286432168421 Step 1 0115 – 128 = negative, write 0 in that column. Step 2 01115 – 64 = 51, write 1 in that column. Step 3 01151 – 32 = 19, write 1 in that column. Step 4 011119 – 16 = 3, write 1 in that column. Step 5 011103 – 8 = negative, write 0 Step 6 011100 3 – 4 = negative, write 0 Step 7 0111001 3 - 2 = 1, write 1 Final answer 01110011* *Remainder 1 goes in final column.

6 © 2016 AQA. Created by Teachit for AQA Now its your turn… Activity: Quiz 1

7 © 2016 AQA. Created by Teachit for AQA Converting binary to decimal Look at the binary pattern and work from right to left, identifying whether each successive bit has a value of 0 or 1. Then add up the totals where the bit is set. 1286432168421 00101100 Decimal value Totals 32 84 44 Binary pattern00101100

8 © 2016 AQA. Created by Teachit for AQA Now its your turn… Activity: Quiz 2

9 © 2016 AQA. Created by Teachit for AQA Making binary easier to represent Using the hexadecimal number system Key point Hexadecimal in itself means nothing to a CPU. However, it is useful to abbreviate binary notation. Binary is not very easy to read and there are many applications where it is beneficial to convert from binary to hexadecimal. DecimalHexadecimal 15F 14E 13D 12C 11B 10A 99 88 77 66 55 44 33 22 11 00

10 © 2016 AQA. Created by Teachit for AQA Converting from binary to hexadecimal Conversion involves looking at four bits at a time and grouping them as a single hexadecimal (‘hex’) character. Example 1Value Binary110 0 Decimal842 1 Sum (base 10)12 HexC Example 2Value Binary11010001 Decimal84218421 Sum (base 10)131 HexD1 In this case, the binary value has been split into two groups of four. In each group the highest power of 2 is 2 3. The first group of four converts to D in hex and the second group converts to 1. Combining these two values gives D1.

11 © 2016 AQA. Created by Teachit for AQA Benefits of hexadecimal over binary Hexadecimal: is shorter than binary offers less chance of making mistakes if using it in programming is easily converted to binary.

12 © 2016 AQA. Created by Teachit for AQA Now its your turn… Activity: Quiz 3

13 © 2016 AQA. Created by Teachit for AQA Plenary Binary bingo!

14 © 2016 AQA. Created by Teachit for AQA Extension activity Using the Hex colours! (Extension task) sheet, colour in the web page template with appropriate RGB colour values set in hexadecimal.


Download ppt "© 2016 AQA. Created by Teachit for AQA 3.3.2 Converting between number bases Lesson."

Similar presentations


Ads by Google