Demystifying Binary And Hex

I recently started an Open university course. It has been a long time since I studied and I really need to buckle down and learn how to do it again.

While browsing the OU forums recently I came across a post from people who could not get their head around binary and Hex. The following is the explanation I provided, it seems to have helped some so maybe it will help the wider community as well

Binary really is not difficult once you get the hang of it. The main problem people have is that they are used to base 10.

Base 10 of course is how everyone counts normally. Each digit in a number can have a value of between 0 and 9 each number to the left has a value 10 times greater than the 1 on the right. ie 1 however add a 0 and it becomes 10.

With binary this is called base 2. Each number can only contain 0 or 1. This time the number on the left instead of being 10 times greater is instead 2 times greater (i.e. double).

So with binary 1 is of course the vale 1 however 11 is 3. The 1 on the right is worth simply 1 however the the 1 on the left is worth 2 therefore the total value of 11 in binary is 3 and the value of 1010 has a value of 10 (the 1 2nd from the right is worth 2 and the 1 on the left worth 8, if the 0 3rd from the right had a 1 if would be worth 4).

Someone asked about hex as well. Hex is similar except it is base 16. Each digit can be represented by 0-9 and further also using a,b,c,d,e,f. The value of a is 10 and the value of f is 15.

Like binary you need to work this out slightly different. if you had af in hexadecimal this would be worth 175.

The reason this is the f being the farthest to the right has its straight value, in this case 15. The a on the other hand has a normal value of 10 however as it is 2 places to the left it is worth 16 x 10 (160). Add the 2 values together and you get 175.

if you had 9af then the 9 would be worth 2304 (9×16x16).

As I say however you just need to get out of the mindset of how you count (sounds odd I know). Once you grasp the concept of binary or any other method the rest will fall into place.

Tags: , , , , , ,

Leave a Reply