Appendix D

Hexadecimal System

This appendix provides a brief description of the hexadecimal system. The base of the hexadecimal system is the number 16. The numbers 0–9 are the same of the decimal system. The numbers 10–15 are represented by the letters A to F. The correspondence of the hexadecimal system to the binary and decimal systems is shown in Table D.1.

As shown, each hexadecimal digit (0 to F) is represented with four binary digits. For example, the hexadecimal number F4A is written in binary as 1111 0100 1010.

To find the decimal value of a hexadecimal number that consists of n digits (e.g., dn−1…d2d1d0), we apply the formula

Decimal = i=0n1(di×16i).

For example, the decimal value of the hexadecimal number F4A is (F×16 ...

Get C now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.