Number System Converter
Convert any integer between binary, octal, decimal, and hexadecimal number bases instantly. Essential for programmers, computer science students, and anyone working with low-level data representation.
Quick Reference
Number System Reference Table
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0000 | 0 | 0 |
| 1 | 0001 | 1 | 1 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 26 | 11010 | 32 | 1A |
| 64 | 1000000 | 100 | 40 |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1023 | 1111111111 | 1777 | 3FF |
About Number Systems
A number system (or numeral system) is a way of expressing numbers using a set of symbols and rules. The base (or radix) determines how many unique digits exist. Decimal (base 10) uses 0–9 and is used in everyday life. Binary (base 2) uses only 0 and 1 and underpins all digital computing. Every file, image, and instruction your computer executes is ultimately encoded as binary.
Hexadecimal (base 16) uses 0–9 and A–F, compactly representing 4 bits per digit — making it ideal for memory addresses, colour codes, and byte data. Octal (base 8) uses 0–7 and was popular in older Unix systems for file permissions. Understanding these bases is essential for programming, networking, electronics, and computer science.
Common Base Conversions
Worked Examples
255 to Binary
Divide by 2 repeatedly: 255→1, 127→1, 63→1, 31→1, 15→1, 7→1, 3→1, 1→1
Read remainders bottom-to-top:
FF hex to Decimal
F = 15, so FF = (15 × 16¹) + (15 × 16⁰)
= 240 + 15 = 255
777 Octal to Decimal
(7 × 8²) + (7 × 8¹) + (7 × 8⁰)
= 448 + 56 + 7 = 511
42 Decimal to All Bases
42 ÷ 2 repeatedly → binary 101010
42 ÷ 16 = 2 R10 → hex 2A
When You Need Base Conversion
Programming
Interpret binary flags, bitmasks, and memory addresses in C, Python, Java, and assembly code.
Networking
Read IPv4 addresses, subnet masks, and MAC addresses — all commonly expressed in hex or binary.
Colour Codes
Decode and encode CSS hex colours like #FF5733 into their red, green, and blue decimal components.
File Permissions
Unix chmod values like 755 are octal — convert to binary (rwxr-xr-x) to understand permission bits.
Electronics
Microcontroller registers, I2C addresses, and SPI commands are all read and written in hex.
Cryptography
Hash values, encryption keys, and digital certificates are expressed as long hexadecimal strings.
Mental Math Tips
Each hexadecimal character (0–F) represents exactly 4 binary bits, so 2 hex chars = 1 byte (8 bits).
Memorise key hex values: 0xF=15, 0xFF=255, 0xFFF=4095, 0xFFFF=65535 — essential for masks.
Binary position values double each step: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024…