Base16
Base16 is hexadecimal encoding: every 4 bits map to one hexadecimal character (0-9, A-F), making it the simplest member of the Base family defined by RFC 4648.
Purpose
It offers a case-insensitive, minimal-alphabet text representation of binary data, convenient for compactly displaying byte values in logs, debug output, and protocol fields.
Mechanism
Each byte (8 bits) is split into a high and a low 4-bit nibble, each mapped to one hexadecimal character. One input byte produces 2 output characters, so the encoded length is exactly twice the original, with no padding.
Use cases
- MAC address and IPv6 address notation
- Hex dumps and diffs of binary files
- Cryptographic digest display
- HTML/CSS color values (#RRGGBB)
Examples
- Input
HiOutput4869H=0x48, i=0x69
Common errors
- Inconsistent letter case causing comparison failures
- Normalize to upper- or lowercase before comparing
Related terms
Hexadecimal
Hexadecimal (hex) is the base-16 numeral system, using 0-9 and A-F for 0-15; it is one of the most common radix notations in computing. GLOSSARY
Base32
Base32 maps binary data onto a 32-character alphabet (A-Z and 2-7); the output uses only uppercase letters and digits, which makes it easy to read aloud and type by hand. GLOSSARY
Base64
Base64 maps arbitrary binary data onto 64 printable ASCII characters (A-Z, a-z, 0-9, +, /) so that binary data can travel over text-only channels. GLOSSARY
Octal
Octal is the base-8 numeral system, using digits 0-7, where each digit corresponds to 3 binary bits; it was widely used on early computers. GLOSSARY
Binary
Binary is the base-2 numeral system, using only 0 and 1, and is the foundation of internal data representation in all digital electronic computers. GLOSSARY