Hexadecimal
Hexadecimal is a positional number system with base 16, using the sixteen symbols 0 through 9 and A through F, where A to F stand for the values ten to fifteen. Each position is worth a power of sixteen, so the hexadecimal numeral 3F8 means 3 × 256 + 15 × 16 + 8, which is 1,016 in everyday decimal. The system exists not because computers think in sixteens but because people need a compact, readable way to write binary: a machine's native bit patterns are long, error-prone strings of ones and zeros, and hexadecimal lets a human read and write them at a quarter of the length without any arithmetic.
The whole reason hexadecimal works is that 16 is exactly 2 to the fourth power, so one hex digit corresponds to exactly four bits. Four bits (half a byte, sometimes called a nibble) can hold sixteen distinct values, which is precisely the number of symbols a hex digit can take, so conversion between binary and hex is a pure regrouping rather than a calculation: split the bits into groups of four starting from the right and replace each group with its digit. One byte is therefore always exactly two hex digits, from 00 to FF, a property that decimal (where a byte runs from 0 to 255 and takes one to three digits) cannot offer. Octal, base 8, has a similar tidy relationship with three-bit groups and was popular on machines with 12-, 18- and 36-bit words, but it fits poorly with the 8-bit byte, which is why hexadecimal won once the byte became universal, a shift strongly associated with the IBM System/360 of 1964.
Hexadecimal is a notation for numbers, not a type of data, and the prefix or context is what tells a reader which base is in use. The digits 10 could mean ten, sixteen or two, so languages and tools mark hex explicitly: C, C++, Java, JavaScript, Python and many others use the prefix 0x (so 0xFF is 255), CSS and HTML use a leading hash for colors, HTML and XML use &#x for character references, and assembly languages have used suffixes such as h or prefixes such as a dollar sign in various dialects. Underneath, the value 255, 0xFF and 11111111 are one and the same bit pattern stored in memory; choosing hex only changes how it is written on a screen. Mistaking a hex string for a number to be added, or reading the text "0xFF" as three characters of data rather than one byte, is a classic beginner stumble.
Hex shows up wherever people have to inspect raw bytes or bit-level structure. Web colors are three bytes written as six hex digits in the form #RRGGBB, so #FF8800 is full red, mid-level green and no blue, an orange; memory addresses and pointers in debuggers appear as values like 0x7ffd5e3a1c40; MAC addresses are six bytes in hex, and IPv6 addresses are eight groups of four hex digits (IPv4 uses decimal, which is partly why IPv6 looks so different). Cryptographic hashes are usually displayed in hex, so a SHA-256 digest of 32 bytes is a 64-character string, and a hex dump, the output of tools such as xxd or hexdump, shows a file's raw bytes with their offsets, which is how analysts recognise file signatures such as the bytes 89 50 4E 47 that begin every PNG image. Programmers also use hex for bit masks and flags, because 0xF0 makes it visible at a glance that the top four bits are selected.
Hex is also a sentimental part of programmer culture, and a practical debugging aid, through recognisable marker values. Developers have long filled uninitialised or freed memory with distinctive patterns such as 0xDEADBEEF, 0xCAFEBABE (which also begins every compiled Java class file) or 0xBAADF00D, so that when one of them turns up in a crash dump the cause is immediately suggestive. Reading hex fluently comes from a few anchors: 0x0A is ten, 0x10 is sixteen, 0x7F is 127, 0x80 is 128, 0xFF is 255, and 0x100 is 256. Memorising these makes sizes and limits legible, for instance why a signed byte tops out at 0x7F and why a hex string of length 2n always describes n bytes.
The commonest confusions are treating hex as a separate numeric format, forgetting case and width conventions, and mixing it up with encodings that look alike. Upper and lower case digits (ff versus FF) are equal in value, though conventions differ by tool; leading zeros are meaningful when width matters, since 0x0F and 0xF are the same number but 0F and F are different byte lengths in a dump. Hexadecimal is also not Base64: Base64 turns every three bytes into four text characters and is used to embed binary in text, whereas hex turns every byte into exactly two characters, doubling the size. In data science and machine learning, hex appears in practice when printing tensors' raw bytes, reading binary file formats, comparing checksums or inspecting colour values, and in languages with big integers it is a convenient way to move 256-bit numbers through text.
Read hexadecimal as binary with its bits grouped into fours and a friendlier face: not a different way of computing, just the shortest honest way for a human to look at the bytes a machine is already holding.