hexadecimal

From SEGGER Wiki
Revision as of 12:32, 6 July 2019 by Rolf (talk | contribs) (Created page with "Hexadecimal (or simply "Hex) is the representation of a number to base 16. In general, numbers are represented in decimal format, so base 10. Therefor only 10 different digits...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Hexadecimal (or simply "Hex) is the representation of a number to base 16. In general, numbers are represented in decimal format, so base 10. Therefor only 10 different digits exist, 0...9. In hexadecimal, 16 digits are required, so the first six letters of the alphabet are used. Therefor, the digits in hexadecimal are:

Hex digits:
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

Hex is in use in computer programming, as a hex digit can represent 4 bits and is therefor a good choice for displaying numbers in computers, such as addresses.

Example: The number of bytes that can be addressed by a true 16-bit CPU with 16 address bits is 2^16, which is 0x10000 = 65536.