🔢 Number Base Converter
Convert between Binary (base 2), Octal (base 8), Decimal (base 10), and Hexadecimal (base 16). Edit any field and the rest update instantly.
Understanding Number Bases – Binary, Octal, Decimal, and Hexadecimal Explained
Number bases (also called radixes) are different ways to represent the same numerical value using different sets of digits. Understanding base conversion is fundamental to computer science, networking, and low-level programming.
The Four Most Common Number Bases in Computing
- Binary (Base-2) — Uses digits 0 and 1. The foundation of all digital computing — every piece of data in a computer is ultimately stored as binary. Used in bitwise operations, network subnet masks, and hardware design.
- Octal (Base-8) — Uses digits 0–7. Historically used in early computing. Still used today for Unix file permissions (
chmod 755), where each digit represents 3 binary bits (read/write/execute). - Decimal (Base-10) — Uses digits 0–9. The human-standard number system used in everyday life, mathematics, and most programming variables.
- Hexadecimal (Base-16) — Uses digits 0–9 and A–F. Each hex digit represents exactly 4 binary bits, making it a compact way to represent binary data. Used in CSS colors (
#FF5733), memory addresses, MAC addresses, IPv6 addresses, and byte values.
Quick Reference Table
- 255 decimal =
11111111binary =377octal =FFhex (max value of one byte) - 42 decimal =
101010binary =52octal =2Ahex (the answer to everything) - 256 decimal =
100000000binary =400octal =100hex (one byte + 1) - 65535 decimal =
1111111111111111binary =177777octal =FFFFhex (max 16-bit value)
Where You'll Use Base Conversion
- Reading hexdump output — Debug binary files, network packets, and memory dumps
- CSS and web development — Convert between hex color codes and RGB decimal values
- Network engineering — Calculate subnet masks, convert IPv6 addresses, read MAC addresses
- Unix/Linux administration — Set file permissions using octal notation (
chmod 644) - Bitwise operations — Understand flags, masks, and bit manipulation in binary
- Assembly and embedded programming — Memory addresses and register values in hexadecimal