Number Conversion Chart


To understand any numbering system, we have to understand the concept of the Most Significant BIT (MSB) and the Least Significant BIT (LSB). In any numbering system, the leftmost bit is the MSB, and the rightmost bit is the LSB. So, in a number such as:

1796

the MSD is the 1 and the 6 is the LSD.

So, it we look at a decimal number, the LSD represents the number of 1's, the next digit represents the number of 10's, the next the number of 100's, the next the number of 1,000's, and so on in powers of 10! This is true of any number base, for binary it is the number of 1's, 2's, 4's, etc. (powers of 2); for hexadecimal, it is powers of 16 (1's, 16's, 256's, 4096's, etc.
Number Base
Binary 2 values = 1 or 0 per digit.
Decimal 10values = 0 thru 9 per digit.
Hexidecimal 16values = 0 thru F per digit.
Octal 8 values = 0 thru 7 per digit.
Base5 5 values = 0 thru 4 per digit.

NOTE: In base 16, the largest number before a carry is 15 (F). In hexadecimal when you reach decimal values greater than 9, the representation for 10 is A, 11 is B, 12 is C, 13 is D, 14 is E, and 15 is F. A 16 value is a carry and is 10. This is 1x16 + 0x1.

Nr.Base Powers of Base X
Decimal (10) 10-710-610-510-410-310-210-110-0
Value10,000,0001,000,000100,00010,0001,000100100-9
Binary(2) 2-72-62-52-42-32-22-12-0
Value 1286432168420 or 1
Hexadecimal (16)16-716-616-516-416-316-216-116-0
Value268,435,45616,777,2161,048,57665,5364096256160-F
Octal(8) 8-78-68-58-48-38-28-18-0
Value2,097,152262,14432,768 40965126480-7

You can create your own tables past the 7th power of number bases.

To convert a number: 11001011 base 2, to base 10,you simply go to the table and add the corresponding numbers for the powers of 2, from the LSB: Going from the right of the binary number, we have: "11001011" - one one, 1 two, 0 fours, 1 eight, 0 16s, 0 32s, 1 64, and 1 128.

SO: lets add them: 1 + 2 + 0 + 8 + 0 + 0 + 64 + 128 = 203 base 10. Lets convert the same number to hexadecimal:

"11001011" - one one, 1 two, 0 fours, 1 eight, 0 16s, 0 32s, 1 64, and 1 128.

This time it is easier to convert first to decimal (base 10) and convert the base 10 number to hexadecimal:

SO: 203 in decimal can be converted by dividing the largest power of 16 that will go into 203 (if you look in the chart above, you can see that 16 squared = 256 and 256 will not divide into 203, so we go to the next lower power - 16): 203/16 = 12 with a Remainder of 11. Since we cannot divide the base (16) any more, we know that the remainder of 11 will be in the LSD position. We convert the 11 to hex, and the 12 to hex. Remember 12 decimal = C in hex, and 11 decimal = B in hex. Then the answer is "CB" in hex. To check this out, we convert this way:

We have B (or 11) ones + C (or 12) 16's. 12 x 16 = 192. Then 11 + 192 = 203 base 10. So, "CB" hexadecimal is correct.

Another illustration is converting 1765 decimal to hexadecimal. From the chart the largest power of 16 that will divide into 1765 is 16 squared or 256. 1765/256 = 6 remainder = 229, so 6 will be our high order digit. Now, divide the next power of 16 into 229. 229/16 = 14 (or E in hex) with remainder 5. So, 5 is our digits, 14 (E) is our next number, and 6 is the high order digit. It looks like this in hex: "6E5".

To prove it: (256 x 6) + (14 x 16) + 5 = 1536 + 224 + 5 = 1765


Return