Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hexadecimal In today’s lesson we will look at: the need for something other than binary how hexadecimal works how to convert between hexadecimal and binary.

Similar presentations


Presentation on theme: "Hexadecimal In today’s lesson we will look at: the need for something other than binary how hexadecimal works how to convert between hexadecimal and binary."— Presentation transcript:

1 Hexadecimal In today’s lesson we will look at: the need for something other than binary how hexadecimal works how to convert between hexadecimal and binary where hexadecimal is used

2 Why Binary? Computers haven’t got fingers, but they have got circuits that can be on or off We can use on to represent 1 and off to represent 0 and use these circuits to process binary numbers Everything inside the computer, therefore, is done in the form of binary Binary numbers can be sent along cables as pulses of electricity (where a pulse would be 1, and a gap is 0)

3 Why Not Binary? So, binary has lots of advantages, but it has one big disadvantage – the numbers are very long. Even the number 128 is eight bits long – for larger numbers we can be looking at dozens of bits. These numbers are difficult to write down and type in, so it’s easy to make a mistake. Denary is also a little bit tricky to convert to binary, so what we need is a method for writing numbers that’s more concise (i.e. shorter), but that we (or the computer) can easily convert to binary.

4 Hexadecimal Hexadecimal is a number system based on sixteens: 0123 1640961256 x16 As we move left, the column headings increase by a factor of sixteen In each column we can have sixteen different digits This number is: 1 x 256 + 2 x 16 + 3 x 1 = 291 It’s still two hundred and ninety- one, it’s just written down differently

5 Wait a Minute... How can there be sixteen possible digits in each column, when there are only ten digits? Hexadecimal uses the digits 0-9 and the letters A-F, so counting would look like this: 0123456789ABCDEF0123456789ABCDEF 101112131415161718191A1B1C1D1E1F 202122232425262728292A2B2C2D2E2F 30313232…etc

6 Converting to Denary 0 0 14 1640961256 = 20 0 1 23 = 291 0 1 40 = 320 0 0 A5 = 165 0 F FF = 4095

7 Converting to Binary Converting to binary is straightforward – just take each digit and convert it to four binary bits. 64 161 0 1 10 2814 0 1 00 2814 We then concatenate the results, so that 64 in hexadecimal is 01100100 in binary.

8 Converting from Binary Converting from binary is the reverse process – split the bits into groups of 4 and convert to hex: A7 1 0 10 2814 0 1 11 2814 We then concatenate the results, so that 10100111 in binary is A7 in hexadecimal.

9 Why Use Hexadecimal? Hexadecimal numbers are shorter than their decimal equivalents, and use fewer digits. For example, a two digit number can be up to FF, which is 255 Hexadecimal is most often used to describe colours, especially when editing a web-page or adjusting the palette in your painting program Colour codes are made up of two digits each for the amount of red, green and blue, in the form #RRGGBB e.g. #FF0000 is bright red, #FF00FF is purple, etc.


Download ppt "Hexadecimal In today’s lesson we will look at: the need for something other than binary how hexadecimal works how to convert between hexadecimal and binary."

Similar presentations


Ads by Google