Discrete Mathematics

Hexadecimal Number System

hexadecimal number system: Hexadecimal number system is a system with base 16. Thus it is a system which has 16 possible digit symbols. As we are familiar with only 10 digits - 0 to 9, the hexadecimal system uses letters A to F to represent the remaining numbers 10 to 15.
Thus the 16 digit symbols are
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E and F.
Also four binary digits are grouped together to represent each digit in hexadecimal number system.
Decimal to Hexadecimal Conversion -
Steps-
1) Divide the number by 16
2) Place the remainder to the right of original number.
3) Subsequently divide the partial quotient by 16 and place the remainder to the right of partial quotient.
4) Repeat the above steps till we get quotient 0
5) Then the hexadecimal number is equal to the remainders arranged from the last remainder to the first remainder (ie. down to up)

Decimal to hexadecimal fraction conversion-
Steps :
1) Multiply decimal fraction by 16
2) Write the integer to the right of product.
3) The partial product is again multiplied by 16 and integer is placed to the right of product.
4) Repeat the process till partial product is seen or till the required place of hexadecimal point.

Hexadecimal to Decimal conversion-
1) To convert a whole hexadecimal number to its decimal equivalent, the extreme right digit is multiplied by 160, the second from right by 161, the third digit from right by 162 and so on. Add all their products to get the required decimal number.
2) To convert hexadecimal fraction to decimal fraction, multiply the first digit after hexadecimal point by 16-1, the second digit from point by 16-2 and so on. Add all these products to get the equivalent decimal number.

Hexadecimal to Binary conversion: The conversion from hexadecimal to binary is performed by converting each hexadecimal digit to its 4-bit binary equivalent.