Converting numbers from binary and hexadecimal to decimal.
A handy helper from Ethan Watson.

DISCLAIMER: The wording in this for some things is probably wrong, but it gets the point across. I know how it works, but I couldn't think of a better way to put it to paper.

Converting from binary to decimal is incredibly easy without using a scientific calculator, believe it or not. It requires some knowledge on how number systems work however.

Consider the binary number 11001001. If you type that in to a scientific calculator and change modes back to decimal, you will get the decimal number 201. How would you go about converting that without using a scientific calculator?

Binary is also known as the base 2 number system. It is called this because only 2 base numbers are used to represent an infinite range of numbers. Decimal is also known as base 10, as it uses 10 base numbers to represent an infinite range, and hexadecimal is known as base 16 for the same reasons. With this knowledge, we can move on to the next step.

0 in binary is 0. 1 in binary is 1. Just like with base 10, if you want to go past these basic numbers, you add a number in front of the number. 10 is 3 in binary, and 11 is 4 in binary. As a result, each number you add to the front has a base value, from which the rest of the expression is worked out from. In binary, the first position has a base value of 1, the next a value of 2, then 4, 8, 16, 32, 64, 128, and so on. In decimal, the first position has a base value of 1, the next a value of 10, then 100, 1000, 10000, 100000, and so on. You might see a pattern here. In each number system, the base value for each position is a power of the base system being used. Consider this formula:

value = x * base ^ (pos - 1)

where x is the number at position pos; and base is the base being used ie base 2, base 16, etc. (If you are unfamiliar with the term, the ^ symbol means "to the power of", so 3 ^ 4 would equal 81 for example) Let's use this formula on the binary number mentioned above, 11001001. Taking the leftmost number, it is in position 8. Therefore, the value at that position is 1 * 2 ^ 7, which equals 128. Going across 1, the value is 1 * 2 ^ 6, which is 64. Working across to the final number, we get (in order) 0, 0, 8, 0, 0, 1 (remember, anything to the power of 0 equals 1). So we have all these numbers, but what do we do with them?

Add them together.

128 + 64 + 0 + 0 + 8 + 0 + 0 + 1 = 201

Let's take another number, one that's bigger. 1011011010101111. This number would be 32768 + 0 + 8192 + 4096 + 0 + 1024 + 512 + 0 + 128 + 0 + 32 + 0 + 8 + 4 + 2 + 1, which would equate to 46767. Typing the binary number in to a scientific calculator and then converting it will wield the exact same result.

You can perform this action with blocks of numbers as well. Take 11110011. If we split that in half, we get 1111 and 0011. The leftmost block by itself equates to 15. Treat that number as if it occupied the rightmost position without going into a position occupied by a number on the next (in this case, rightmost) block, ie,  would get 15 * 2 ^ 4, which would equal 240. The rightmost block by itself equates to 3. Do just as you did to the previous block and treat the 3 as if it was in the rightmost position possible, which would be the first position, which would mean the value would equal 3 * 2 ^ 0, which equates to 3. Again, add the numbers together and you get 243. You can do this with any sized block, and they can be different sizes each, and you can have more than two blocks, and so on and so on, just remember to follow the rules stated in this example and it will work fine every time.

You may notice something about splitting an 8-digit binary number in 2. The two 4-digit numbers produced can be represented in hexadecimal (the 4 digits can represent 16 different values in total, and hexadecimal is a number system made of 16 base numbers). You can use the exact same methods I described above for binary to convert a hexadecimal number to decimal. As I stated earlier, hexadecimal is base 16. It is represented by the numbers 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F. Letters for numbers? In hexadecimal, yes. We have no single numbers to represent numbers greater than or equal to 10, so letters come in to play. A is equal to 10 in decimal, B is equal to 11, and so on.

Take the above example of 11110011. Split in 2, we get 1111 and 0011. Converting them to hexadecimal, we get F and 3. To convert the hexadecimal number F3 to decimal, use the above formula, value = x * base ^ (pos - 1). base in this case is 16, so to convert F to decimal, we calculate F * 16 ^ 1. F equals 15, so in decimal terms that reads 15 * 16 ^ 1, which equals 240. Convert the 3 with the same method (3 * 16 ^ 0 = 3), add them together, and you get 243. Simple, huh?

Again, let's take a bigger number, for simplicity sake the number used above, 1011011010101111. Split up, that would read 1011 0110 1010 1111. In hexadecimal, it would convert to B, 6, A and F. Convert the number B6AF to decimal using the above methods would produce (11 * 16 ^ 3) + (6 * 16 ^ 2) + (10 * 16 ^ 1) + (15 * 16 ^ 0), which equates to 46767. This, too, can be converted from hex to decimal in blocks, but I'll let you experiment with that one.

Hopefully, that should make things clearer.