The easiest way to explain hexadecimal is to refer back to binary and decimal in binary you have two
values either a 0 or a 1.
So all numbers are made up of either those two values.
As an example 128 in decimal equals one followed by seven binary zeros decimal numbers are made up of
combinations in range 0 to 9.
So as an example 128 consists of 1 2 and an 8 255 consists of the number two followed by two fives.
Hexadecimal has values from 0 to f..
In other words it's 0 1 2 3 up to 9 followed by A B C D E and F.
So these are hexadecimal values the decimal equivalents are 0 1 2 3 all the way up to 9 and then a equates
to 10 B equates to 11 C crates to 12 DS 13 and decimal in hexadecimal is 14 in decimal and F in hexadecimal
is 15 in decimal.
If you remember that then hexadecimal isn't very difficult.
That's the first thing you need to remember when working with hexadecimal.
So if I gave you a number such as F in hexadecimal you need to remember that that equates to 15 and
decimal he equates to 14 D equates to 13 C equates to 12 B is an 11 and then a equates to 10 and then
the values are 0 to 9 of the same as decimal values.
0 2 9.
Now if I gave you a more complex example let's say 128.
The easiest way to work that out is to convert it to binary so 128.
It looks as follows in binary.
And then what you need to do is to split it into two portions of four plus.
The reason why is that if we look at 15 or F in hexadecimal and convert that into binary you'll see
that it equates to four binary ones.
10 equates to 1 0 1 0 in binary 11 is 1 0 1 1 in binary a zero in hexadecimal equates to four binary
zeros.
So the highest number in hexadecimal consists of four binary ones.
So whenever you work out a larger number like 128 for an IP address.
Break it into two portions of four binary zeros.
So if we looked at for binary zeros that would equate to zero in hexadecimal 1 followed by three binary
zeros equates to eight in both decimal and hexadecimal.
Hence 128 in decimal equates to 80 in hexadecimal.
Let's confirm this by taking the windows calculator and going to program mode and selecting a decimal
value of 15 and converting that to hexadecimal.
You'll see that it equates to binary Yeff in hexadecimal Let's take another decimal value such as 10
convert that to hex and you'll see it's anay.
So what about a 128 128 in decimal equates to 8 is 0 in hexadecimal.
As we worked out.
So let's do a few more examples to make sure that you understand how to do this conversion.
So what about 255.
That equates to a binary value of eight binary ones.
If you split into two portions that gives you full binary ones and 4 binary ones.
So to convert into hexadecimal.
Convert this to decimal which is 15 and 15 in hexadecimal equates to f..
So 15 gives us f and 15 gives us f that's why a broadcast of 255 255 255 255 equates to 8 binary F's
in binary you've got eight binary ones put 255.
And if you convert that into hexadecimal you'll notice that eight binary ones equates to 15 and decimal
which is f in hexadecimal.
So we end up having eight hexadecimal F's the rule to remember is that a in hexadecimal equates to 10
in decimal or 10 decimal equates to a in hexadecimal 11 and decimal is a B and hex 12 and decimal is
a C in hexadecimal 13 and decimal is a D in hexadecimal 14 in decimal is an E in hexadecimal and 15
equates to F in hexadecimal.