Section 2.4
Hexadecimal Number System
The hexadecimal system uses base 16. Thus, it has 16 possible digit symbols. It uses the digits 0 through 9 plus the letters A, B, C, D, E, and F as the 16 digit symbols.
163 162 161 160 16-1 16-2 16-3 =4096 =256 =16 =1 . =1/16 =1/256 =1/4096 Most Significant Digit Hexadec. point Least Significant Digit Hexadecimal to Decimal Conversion
eg. 2AF16 = 2 x (162) + 10 x (161) + 15 x (160) = 68710
Repeat Division: Convert decimal to hexadecimal
This method uses repeated division by 16. Eg. convert 37810 to hexadecimal and binary:
378/16 = 23+ remainder of 10 A (Least Significant Bit) 23/ 16 = 1 + remainder of 7 7 1 / 16 = 0 + remainder of 1 1 (Most Significant Bit) Result 37810 = 17A8 Convert to Binary = 0001 0111 10102
= 0000 0001 0111 1010 (16 bits)
Binary-To-Hexadecimal /
Hexadecimal-To-Binary Conversion
Hexadecimal Digit 0 1 2 3 4 5 6 7 Binary Equivalent 0000 0001 0010 0011 0100 0101 0110 0111
Hexadecimal Digit 8 9 A B C D E F Binary Equivalent 1000 1001 1010 1011 1100 1101 1110 1111 Each Hexadecimal digit is represented by four bits of binary digit.
eg. 1011 0010 11112 = (1011) (0010) (1111)2 = B 2 F16
Octal-To-Hexadecimal /
Hexadecimal-To-Octal Conversion1) Convert Octal (Hexadecimal) to Binary first.
2a) Regroup the binary number in 3 bits a group starts from the LSB if Octal is required.
Go back to Section 2.3 if you are not sure how to group in Octal.
2b) Regroup the binary number in 4 bits a group from the LSB if Hexadecimal is required.eg. Convert 5A816 to Octal .
5A816
= 0101 1010 1000 (Binary)
= 2 6 5 0 (Octal)