Ha! Now I know how to explain that!
0100 binary means 0*8 + 1*4 + 0*2 + 0*1 = 4
so
1111 binary means 1*8 + 1*4 + 1*2 + 1*1 = 15
there you have the "15". Two digits. that´s not efficient, cause computers use 4 binary digits as ONE unit, so the expression should also be ONE digit.
That´s where HEX comes in place! Hex numbers start like normal ones, but "10" normal is "A" Hex, up to "15" normal is "F" HEX.
Then a second Hex digit is added for "16" normal (="10" Hex). Adding 15 to that will give you "31" normal and "1F" Hex. "32" normal is "20" Hex and so on. Up to "255" normal being "FF" Hex!
1111 1111 binary is 1*128 + 1*64 + ... + 1*1 =255
F F Hex
0001 1111 binary
1 F Hex
0101 1010 binary
5 A Hex ("10" normal = "A" Hex)
This way you can say e.g.
AA F3 D0 01 F1 instead of
1010 1010 1111 0011 1101 0000 0000 0001 1111 0001
See?
0100 binary means 0*8 + 1*4 + 0*2 + 0*1 = 4
so
1111 binary means 1*8 + 1*4 + 1*2 + 1*1 = 15
there you have the "15". Two digits. that´s not efficient, cause computers use 4 binary digits as ONE unit, so the expression should also be ONE digit.
That´s where HEX comes in place! Hex numbers start like normal ones, but "10" normal is "A" Hex, up to "15" normal is "F" HEX.
Then a second Hex digit is added for "16" normal (="10" Hex). Adding 15 to that will give you "31" normal and "1F" Hex. "32" normal is "20" Hex and so on. Up to "255" normal being "FF" Hex!
1111 1111 binary is 1*128 + 1*64 + ... + 1*1 =255
F F Hex
0001 1111 binary
1 F Hex
0101 1010 binary
5 A Hex ("10" normal = "A" Hex)
This way you can say e.g.
AA F3 D0 01 F1 instead of
1010 1010 1111 0011 1101 0000 0000 0001 1111 0001
See?
Comment