Computers fundamentally represent all data — numbers, text, images, everything — using binary, base-2 representation at the hardware level, since the simplest, most reliable physical mechanism for a digital circuit is a two-state system (typically represented as an electrical signal being either present or absent, or a voltage being either high or low) — this is the deep, unavoidable hardware reality that makes binary the actual native language of digital computation, regardless of which number base humans find more convenient to read and write.
The genuine challenge with binary, though, is that it's remarkably unwieldy for humans to read, write, and mentally process directly — even a moderately sized number requires a long string of 1s and 0s, and the human eye and mind are notoriously bad at quickly and reliably distinguishing between similar-looking long binary strings (miscounting digits, misreading a long run of similar digits, is a genuinely common source of transcription errors when working directly with binary). This is exactly the practical problem that octal (base 8) and, far more commonly in modern practice, hexadecimal (base 16) solve — both serve as compact, human-friendly shorthand notations that represent the identical underlying binary value using dramatically fewer digits.
The specific mathematical relationship that makes hexadecimal such a clean, convenient shorthand for binary is that 16 is a power of 2 (2 to the 4th power), meaning each single hexadecimal digit corresponds to exactly 4 binary bits, with no messy remainder or partial-digit complexity to worry about. This clean, exact correspondence means converting between binary and hex is genuinely mechanical and error-resistant — simply group the binary digits into sets of 4 (starting from the right) and convert each group independently into its single corresponding hex digit, with no cross-group carrying or borrowing required, unlike converting between number bases that don't share this clean power-of-2 relationship. This exact 4-bits-per-hex-digit relationship is precisely why a 32-bit binary value, an unwieldy 32-character string of 1s and 0s, condenses down to a comparatively compact, much more manageable 8-character hexadecimal representation — the same underlying information, represented far more efficiently and readably for human use.
Octal (base 8) follows the identical underlying logic, since 8 is also a power of 2 (2 to the 3rd power), meaning each octal digit corresponds to exactly 3 binary bits. Octal was historically more prevalent in certain earlier computing contexts (some older computer architectures used word sizes that divided more naturally into groups of 3 bits rather than 4), but hexadecimal has become considerably more dominant in modern computing practice, largely because most contemporary computer architectures are built around byte and word sizes (8, 16, 32, 64 bits) that divide especially cleanly into groups of 4 bits for hex representation, making hex the more naturally convenient choice for most modern programming, memory addressing, and low-level technical contexts.
This hex-and-binary relationship shows up constantly across everyday computing contexts once you know to look for it — web color codes (like #FF5733) are hexadecimal representations of the underlying red, green, and blue color channel values; memory addresses in low-level programming and debugging contexts are conventionally displayed in hex specifically for the same compactness and readability reasons; and many programming languages provide direct hexadecimal literal notation (writing 0xFF directly in source code, for instance) precisely because hex remains the most practical, readable way for programmers to work directly with binary-level values without the unwieldy length of writing out full binary strings by hand.



