Number Systems Explained — Binary, Octal, Decimal, Hex

March 31, 2026

How Number Systems Shape Our World

The decimal system (base 10) feels natural because humans have 10 fingers, but it is just one of many ways to represent numbers. Computers use binary (base 2) because electronic circuits have two states — on and off. Programmers use hexadecimal (base 16) because it provides a compact way to represent binary data — every hex digit maps to exactly 4 binary digits, making it much easier to read than long strings of ones and zeros.

Understanding number systems is not just academic — it is essential for anyone working with computers, electronics, networking, or digital design. IP addresses, color codes, memory addresses, file permissions, and encryption keys all use non-decimal number systems. A web designer writing #FF5733 for a color is working in hexadecimal. A network engineer configuring subnet masks works in binary. A Unix administrator setting file permissions to 755 is working in octal.

Binary: The Language of Computers

Binary represents all values using only two digits: 0 and 1. Each position represents a power of 2, just as each position in decimal represents a power of 10. The binary number 1101 means (1 times 8) plus (1 times 4) plus (0 times 2) plus (1 times 1) = 13 in decimal. Every number, every letter, every image, every video, and every sound on your computer is ultimately stored as binary — sequences of electrical signals that are either on (1) or off (0).

A single binary digit (bit) can represent two values: 0 or 1. Two bits can represent four values (00, 01, 10, 11). Eight bits (one byte) can represent 256 values (0 through 255). This is why pixel color values range from 0 to 255 — each color channel (red, green, blue) is stored in one byte. Our Number System Converter at miniconvert.com converts between binary, decimal, octal, and hexadecimal instantly, showing the step-by-step conversion process.

Hexadecimal: Making Binary Human-Readable

Hexadecimal uses 16 symbols: 0-9 for values zero through nine, and A-F for values ten through fifteen. The hex number 2F means (2 times 16) plus (15 times 1) = 47 in decimal. The reason hexadecimal is so useful in computing is the perfect mapping to binary — each hex digit represents exactly 4 bits, so the byte 10101111 becomes AF in hex. Reading AF is much faster than reading 10101111.

Web colors use hexadecimal notation: #RRGGBB where each pair of hex digits represents the intensity of red, green, and blue from 00 (none) to FF (maximum). So #FF0000 is pure red (max red, no green, no blue), #00FF00 is pure green, and #FFFFFF is white (all channels at maximum). Understanding hex makes reading and modifying color codes intuitive rather than mysterious.

Octal: File Permissions and Beyond

Octal (base 8) uses digits 0 through 7. It was historically popular in computing because early computers used word sizes that were multiples of 3 bits, making octal a natural fit. Today, octal is most commonly encountered in Unix/Linux file permissions. The permission 755 means the owner can read, write, and execute (7 = 4+2+1), while the group and others can read and execute but not write (5 = 4+0+1).

Each octal digit maps to exactly 3 binary bits: 0=000, 1=001, 2=010, 3=011, 4=100, 5=101, 6=110, 7=111. So the permission 755 in binary is 111 101 101, which directly shows the read-write-execute bits for owner, group, and others. This is why octal was chosen for Unix permissions — the three-bit grouping matches the three permission types perfectly.

Converting Between Number Systems

Converting from any base to decimal: multiply each digit by its positional value and sum the results. Converting from decimal to any base: repeatedly divide by the base and read the remainders in reverse order. For example, converting 47 to binary: 47 divided by 2 is 23 remainder 1, 23 divided by 2 is 11 remainder 1, 11 divided by 2 is 5 remainder 1, 5 divided by 2 is 2 remainder 1, 2 divided by 2 is 1 remainder 0, 1 divided by 2 is 0 remainder 1. Reading remainders bottom to top: 101111. So 47 in decimal equals 101111 in binary.

Converting between binary and hex is simpler: group binary digits in fours from right to left, then convert each group to its hex equivalent. 101111 becomes 0010 1111, which is 2F in hex. This shortcut works because 16 is a power of 2 (16 = 2 to the fourth power), creating a clean mapping between the systems.