Hexadecimal in Cryptographic Output
Learn why cryptographic hashes, keys, and ciphertexts are commonly displayed in hexadecimal notation.
Hexadecimal as Base-16
Hexadecimal (hex) is a base-16 numbering system using the digits 0-9 and letters A-F (or a-f). Each hex digit represents exactly 4 bits (a nibble), since 16 = 2^4.
Hex is the universal language of binary data in computing. Memory addresses, byte values, color codes, and cryptographic outputs are all commonly expressed in hexadecimal.
4 Bits Per Hex Digit
Because each hex digit represents exactly 4 bits, every byte (8 bits) maps to exactly 2 hex digits. This makes conversion between binary and hex trivial: split binary into 4-bit groups and convert each group.
For example, the byte 11001010 splits into 1100 (C) and 1010 (A), giving the hex value CA. No arithmetic is needed, just lookup table conversion.
All lessons in this course
- Base64 Encoding: How It Works
- ASCII, Unicode, and Text Representation
- Hexadecimal in Cryptographic Output
- Encoding vs Encryption vs Hashing