### GE6151 Computer Programming HEXADECIMAL NUMBERS

The hexadecimal number system has sixteen digits and is used primarily as a compact way of displaying or writing binary numbers because it is very easy to convert between binary and hexadecimal.Long binary numbers are difficult to read and write because it is easy to drop or transpose a bit. Hexadecimal is widely used in computer and microprocessor applications. The hexadecimal system has a base of sixteen; it is composed of 16 digits and alphabetic characters. The maximum 3-digits hexadecimal number is FFF or decimal 4095 and maximum 4-digit hexadecimal number is FFFF or decimal 65.535.

Simply break the binary number into 4-bit groups, starting at the right-most bit and replace each 4-bit group with the equivalent hexadecimal symbol as in the following example

Convert the binary number to hexadecimal: 1100101001010111

Solution:

1100 1010 0101 0111

C A 5 7 = CA57

One way to find the decimal equivalent of a hexadecimal number is to first convert the

hexadecimal number to binary and then convert from binary to decimal.

Convert the hexadecimal number 1C to decimal:

1 C

0001 1100= 24+ 2³ + 2² = 16 +8+4 = 28