## Wednesday, 30 July 2014

This blog will be a little different to my usual debugging blogs.
I will be talking about hexadecimals and binary, it can be difficult to fully understand but we should be able to get through it.

Now, at school, I was never really good at Maths, I struggled with a lot of things but I've picked up a few things with debugging as Windows Internals uses these figures to perform operations that would not be possible in decimal.

Binary can be difficult to get your head round but computers use them to make things a lot more simpler.
Remember at school when you had to use a T chart and count in tens.
So "10" would be 1 ten and 0 ones, in binary "10" means 1 twos and 0 ones.
"100" in binary would be 4 (2x2), "1000" would be eight (4x2) etc.
Generally, binary is used for power states within computers because they're multiples of 2 it would on and off.
There would also be far less rules compared to decimal which actually simplifies things (for the computer), but for us we would need a compiler to convert the code for us to make sense of them.

Hexadecimal is used because it's easier to make smaller numbers, it's mainly used to convert code into binary easier as it divides easier. Instead of multiples of 10 hexadecimal uses multiples of 16, so "10" in hexadecimal would be 16 as it's 1 sixteen and 0 ones.
"25" in hexadecimal would be 2 sixteens and 5 ones so it would be 37.

But how does that work as there aren't symbols for 10 to 16 in hexadecimal?
This is why we have letters for 10 to 16, here's a good conversion chart to help you understand.

Here we can see how they all convert into each other, obviously the higher the figures the more difficult they become to understand.

Hopefully this has helped a lot of you understand if you didn't already.