Comparison

Binary, octal, decimal, hexadecimal

The same quantity written four ways. Hexadecimal is the one worth understanding properly, because it is not arbitrary: one hex digit is exactly four bits, so a byte is always exactly two hex digits, and that is the whole reason colours, memory addresses and file signatures are written in it.

6 related tools

Side by side

Binary, octal, decimal, hexadecimal
BaseDigitsThe number 255Where you meet it
Binary20-111111111Flags, permissions, logic
Octal80-7377Unix file modes
Decimal100-9255Everywhere else
Hexadecimal160-9 A-FFFColours, addresses, hashes
RomanNoneI V X L C D MCCLVClocks, titles, dates

The short answer

A chmod value like 755 is octal because each digit holds exactly three permission bits, which is why the digit 8 never appears in one. Roman numerals are not a base at all: they are additive, have no zero and no fractions, and cannot express anything below one, so a conversion to them from a decimal with a fractional part always loses something.

In more detail

Why hexadecimal and not something else

One hex digit is exactly four bits, so a byte is always exactly two hex digits. That clean correspondence is the entire reason colours, memory addresses, file signatures and hashes are written in it - the boundaries line up with the underlying bytes in a way decimal never does.

Octal survives in file permissions

A chmod value groups permission bits in threes - read, write, execute - and three bits is one octal digit. That is why 755 is a complete description of nine permission bits and why the digit 8 can never appear in one. Outside this corner, octal is largely historical.

Roman numerals are not a base

They are additive and subtractive, with no zero, no fractions and no way to express anything below one. Converting a decimal with a fractional part to Roman always loses something, and the conventional upper limit of 3,999 exists because larger values needed overline notation that plain text cannot carry.

Tools covered by this comparison

More comparisons