Professional Documents
Culture Documents
Ref: http://www.me.gatech.edu/me3056/lab4/
Base 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Base 2 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
Base 16 (Hex) 0 1 2 3 4 5 6 7 8 9 A B C D E F
Binary Definitions
Byte
10011001
Bit Nibble
Base Conversions
Base 2 to Base 10 Base 16 to Base 10 Base 10 to Base 2 Base 10 to Base 16 Base 2 to Base 16 Base 16 to Base 2 Base 10 to Hi/Lo Bytes Hi/Lo Bytes to Base 10
Base 2 to Base 10
Each digit is multiplied by 2 raised to the appropriate power.
Base 16 to Base 10
Each digit is multiplied by 16 raised to the appropriate power. Note that B=11 and F=15 from the previous table.
Base 10 to Base 2
An example of converting 13 to 11012 ... Start by finding the largest power of 2 that's still less than 13, in this case it's 23 or 8. Divide it into 13 and record the remainder, 5. Proceed as shown in the example.
Base 10 to Base 16
An example of converting 1807 to 70F16 ... Start by finding the largest power of 16 that's still less than 1807, in this case it's 162 or 256. Divide it into 1807 and record the remainder, 15. Proceed as shown in the example.
Base 2 to Base 16
Converting from Base 2 to Base 16 is straight forward. Partition the binary number into groups of 4 digits. Convert each group directly to a hexadecimal number using the previous table.
Base 16 to Base 2
Converting from Base 16 to Base 2 is also straight forward. Convert each individual hex digit to binary using the previous table.