The Four Number Systems Explained
Decimal (Base 10)
The number system we use daily. It uses ten digits (0โ9) and each position represents a power of 10: units, tens, hundreds, thousands, etc. The number 4,237 means 4ร10ยณ + 2ร10ยฒ + 3ร10ยน + 7ร10โฐ = 4,000 + 200 + 30 + 7. Humans use base 10 because we have 10 fingers.
Binary (Base 2)
Binary uses only two digits (0 and 1), called bits. Each position represents a power of 2: 1, 2, 4, 8, 16, 32, 64, 128, 256, ... Computers use binary because transistors have two states: on (1) and off (0). The number 1101 in binary = 1ร2ยณ + 1ร2ยฒ + 0ร2ยน + 1ร2โฐ = 8 + 4 + 0 + 1 = 13 in decimal. Eight bits form one byte (00000000 to 11111111 = 0 to 255).
Hexadecimal (Base 16)
Hexadecimal uses 16 symbols: 0โ9 for values 0โ9, and AโF for values 10โ15. Each hex digit represents exactly 4 bits (a "nibble"), so one byte = two hex digits. This makes hex a compact, human-readable representation of binary data. Hex is ubiquitous in computing: web colors (#FF5733), memory addresses (0x7FFF), IPv6 addresses (2001:0db8), Unix permissions (0x755), and color profiles in graphics software.
Octal (Base 8)
Octal uses digits 0โ7. Each octal digit represents exactly 3 bits. Octal was widely used in early computing but is now mainly encountered in Unix/Linux file permissions. The command chmod 755 sets permissions to 111 101 101 in binary โ owner can read/write/execute (7), group can read/execute (5), others can read/execute (5).
How to Convert Between Number Systems
Decimal to Binary
Divide the decimal number by 2 repeatedly, recording remainders, then read remainders from bottom to top. Example: 13 รท 2 = 6 R1 โ 6 รท 2 = 3 R0 โ 3 รท 2 = 1 R1 โ 1 รท 2 = 0 R1. Read remainders upward: 1101โ = 13โโ. Alternatively, identify powers of 2 that sum to your target: 13 = 8+4+1 = 2ยณ+2ยฒ+2โฐ = 1101โ.
Binary to Hexadecimal
Group binary digits into sets of 4 (from right). Convert each group to its hex digit. Example: 11111111โ โ groups: 1111 | 1111 โ F | F โ FFโโ. This is why FFโโ = 255โโ = 11111111โ.
Real-World Applications
Web designers encounter hex colors daily โ #FF5733 is red (R=255, G=87, B=51). Database engineers use hex for primary keys and memory addresses. Network engineers work with hex for IPv6 and MAC addresses. Students taking computer science courses need to convert between all four bases in exams. Embedded systems programmers use binary and hex to set hardware registers directly.
Frequently Asked Questions
How do you convert a decimal number to binary?
Divide by 2 repeatedly, recording the remainder each time (0 or 1). When the quotient reaches 0, stop and read all remainders from bottom to top โ that's your binary number. Example: 13 โ remainders are 1,0,1,1 โ binary = 1101. Or use our converter above for instant results.
What does FF mean in hexadecimal?
FF in hex = 15ร16 + 15 = 240 + 15 = 255 in decimal = 11111111 in binary. It represents one byte with all 8 bits set to 1. In web colors, #FFFFFF means R=255, G=255, B=255 = pure white. #000000 is R=0, G=0, B=0 = pure black.
Why do computers use binary?
Computers use binary because electronic components naturally have two reliable states: on (voltage high = 1) and off (voltage low = 0). Building circuits with just two states is far simpler and more reliable than three or more. George Boole formalized the mathematics of two-value logic in 1854 (Boolean algebra), and Claude Shannon showed in 1937 how to implement it with electrical circuits.
Related Articles
Number system conversions are mathematically exact. Accuracy note.