Digital Technology

Number System Converter: Binary, Decimal, Hexadecimal, Octal — All-in-One Guide

CalcPool Team
May 12, 2026
12 min read

What You'll Learn

  • 1. Number Systems Explained: Binary, Decimal, Hex, Octal
  • 2. Binary ↔ Decimal Converter — The Foundation
  • 3. Binary ↔ Hexadecimal Converter — For Programmers
  • 4. Binary ↔ Octal Converter — For Unix/Linux Permissions
  • 5. Decimal ↔ Hexadecimal Converter — For Web Colours
  • 6. Decimal ↔ Octal Converter — For chmod Commands
  • 7. Hexadecimal ↔ Octal Converter — Cross-System Conversion
  • 8. Complete Conversion Reference Table (All 4 Systems)
  • 9. How to Choose the Right Converter for Your Task
  • 10. Common Number System Mistakes to Avoid
  • 11. Frequently Asked Questions
  • 12. Summary: Master All Number Systems

Key Takeaways

  • Binary (base 2) — uses 0 and 1; the language of computers; every file, image, and program is ultimately binary
  • Decimal (base 10) — uses 0-9; the everyday number system humans use
  • Hexadecimal (base 16) — uses 0-9 and A-F; used for colour codes (#FF5733), memory addresses, debugging
  • Octal (base 8) — uses 0-7; used for Unix/Linux file permissions (chmod 755)
  • 4 bits = 1 hex digit, 3 bits = 1 octal digit — this relationship makes conversion easy
  • Use our free converters below — instantly convert between any number systems for programming, web design, or studying

👇 Read on for complete guides to each converter, step-by-step examples, and reference tables.

Number Systems Explained: Binary, Decimal, Hex, Octal

Computers operate using binary — a base-2 number system with only two digits: 0 and 1. But humans prefer decimal (base 10, digits 0-9), programmers use hexadecimal (base 16, digits 0-9 and A-F), and Unix systems still use octal (base 8, digits 0-7) for file permissions.

Why multiple number systems exist:

System Base Digits Where It's Used
Binary 2 0, 1 Computer hardware, machine code, digital circuits
Decimal 10 0-9 Everyday human counting, mathematics
Hexadecimal 16 0-9, A-F Memory addresses, web colours, debugging, assembly
Octal 8 0-7 Unix/Linux file permissions (chmod), legacy systems

The relationship between systems:

  • 1 hex digit = 4 binary bits
  • 1 octal digit = 3 binary bits
  • 1 byte (8 bits) = 2 hex digits = approximately 2.67 octal digits

This relationship means conversion between these systems is straightforward — each system is a different grouping of the same underlying binary data.

Binary ↔ Decimal Converter — The Foundation

The Binary to Decimal Converter is the most fundamental number system converter. Binary is the language of computers — every file, image, and program on your computer is ultimately stored as binary.

How binary to decimal conversion works:

Each binary digit (bit) represents a power of 2. Starting from the rightmost digit (position 0), multiply each digit by 2 raised to its position, then sum all results.

Binary Calculation Decimal
1 1 × 2⁰ = 1 1
10 (1 × 2¹) + (0 × 2⁰) = 2 + 0 2
1010 (1×8)+(0×4)+(1×2)+(0×1) = 8+0+2+0 10
11111111 (1×128)+(1×64)+(1×32)+(1×16)+(1×8)+(1×4)+(1×2)+(1×1) 255

How decimal to binary conversion works:

Repeatedly divide the decimal number by 2, recording remainders from bottom to top.

Example: 13 decimal to binary

Division Quotient Remainder
13 ÷ 2 6 1
6 ÷ 2 3 0
3 ÷ 2 1 1
1 ÷ 2 0 1

Reading remainders from bottom to top: 13 decimal = 1101 binary.

Common binary values to memorise:

Decimal Binary Use Case
0 0 Zero
1 1 One
2 10 Binary 10
4 100 First power of 2
8 1000 Byte start
16 10000 Half byte
32 100000 ASCII space
64 1000000 @ symbol
128 10000000 High bit
255 11111111 Maximum byte value

Use our Binary Decimal Converter to instantly convert any number between these two systems.

Binary ↔ Hexadecimal Converter — For Programmers

The Binary to Hexadecimal Converter is essential for programmers working with memory addresses, colour codes, and assembly language. Hexadecimal is the standard human-readable representation of binary because it is 4× more compact.

Why hex is so useful:

A single byte (8 bits) is exactly represented by two hex digits. FF = 255, 00 = 0. This perfect alignment makes hex the natural choice for low-level programming.

How binary to hexadecimal conversion works:

  1. Group binary digits into sets of 4 from the right
  2. Convert each 4-bit group to its hex digit (0-9, A-F)
4-bit Binary Hex Digit
0000 0
0001 1
0010 2
0011 3
0100 4
0101 5
0110 6
0111 7
1000 8
1001 9
1010 A
1011 B
1100 C
1101 D
1110 E
1111 F

Example: Binary 11011010 to hex

Step Binary Hex
Group 4 bits 1101 1010
First group 1101 D
Second group 1010 A
Result DA

Where hex is used in real life:

Use Case Example
Web colours #FF5733 (red=FF, green=57, blue=33)
Memory addresses 0x7FFD8A3F2B1C
MAC addresses 00:1A:2B:3C:4D:5E
IPv6 addresses 2001:0db8:85a3:0000:0000:8a2e:0370:7334
Debugging Values in registers shown as hex

Use our Binary Hexadecimal Converter to convert between these systems instantly.

Binary ↔ Octal Converter — For Unix/Linux Permissions

The Binary to Octal Converter is essential for understanding Unix/Linux file permissions. While less common than hex, octal is still used daily by system administrators.

How binary to octal conversion works:

  1. Group binary digits into sets of 3 from the right
  2. Convert each 3-bit group to its octal digit (0-7)
3-bit Binary Octal Digit
000 0
001 1
010 2
011 3
100 4
101 5
110 6
111 7

Example: Binary 111010 to octal

Step Binary Octal
Group 3 bits 111 010
First group 111 7
Second group 010 2
Result 72

Where octal is used today — chmod file permissions:

Octal Binary Permission Meaning
0 000 --- No permissions
1 001 --x Execute only
2 010 -w- Write only
3 011 -wx Write and execute
4 100 r-- Read only
5 101 r-x Read and execute
6 110 rw- Read and write
7 111 rwx All permissions

Common chmod examples:

Command Binary Meaning
chmod 755 111 101 101 Owner:rwx, Group:r-x, Others:r-x (directories)
chmod 644 110 100 100 Owner:rw-, Group:r--, Others:r-- (files)
chmod 777 111 111 111 Everyone has full access (security risk)

Use our Binary Octal Converter to convert between binary and octal for chmod calculations.

Decimal ↔ Hexadecimal Converter — For Web Colours

The Decimal to Hexadecimal Converter is essential for web developers working with RGB colour codes. Every colour in HTML/CSS can be expressed as a hex code.

How decimal to hexadecimal conversion works:

Repeatedly divide the decimal number by 16, recording remainders (0-15, with 10-15 as A-F).

Example: 255 decimal to hex

Division Quotient Remainder Hex Digit
255 ÷ 16 15 15 F
15 ÷ 16 0 15 F

Read remainders from bottom to top: 255 decimal = FF hex.

RGB colour conversion:

RGB colours are three decimal values (0-255 each). Convert each to hex and combine with #.

Colour RGB (Decimal) Hex Code
Red 255, 0, 0 #FF0000
Green 0, 255, 0 #00FF00
Blue 0, 0, 255 #0000FF
White 255, 255, 255 #FFFFFF
Black 0, 0, 0 #000000
Yellow 255, 255, 0 #FFFF00
Purple 128, 0, 128 #800080

Common hex values to memorise:

Decimal Hex Use
0 00 Minimum colour value
51 33 Dark shade
102 66 Medium-dark
153 99 Mid shade
204 CC Medium-light
255 FF Maximum colour value

Use our Decimal Hexadecimal Converter to convert RGB values to hex codes for web design.

Decimal ↔ Octal Converter — For chmod Commands

The Decimal to Octal Converter is essential for system administrators setting file permissions. The chmod command uses octal numbers (0-7) to represent permission sets.

How decimal to octal conversion works:

Repeatedly divide the decimal number by 8, recording remainders (0-7).

Example: 493 decimal to octal

Division Quotient Remainder
493 ÷ 8 61 5
61 ÷ 8 7 5
7 ÷ 8 0 7

Read remainders from bottom to top: 493 decimal = 755 octal.

Common chmod values in decimal and octal:

Decimal Octal Permissions
493 755 rwxr-xr-x (directories)
420 644 rw-r--r-- (files)
511 777 rwxrwxrwx (all access)
384 600 rw------- (private)
292 444 r--r--r-- (read-only)

How to read chmod permissions:

  • First digit (owner): 7 = rwx (read, write, execute)
  • Second digit (group): 5 = r-x (read, execute)
  • Third digit (others): 5 = r-x (read, execute)

Use our Decimal Octal Converter to convert decimal numbers to octal for chmod commands.

Hexadecimal ↔ Octal Converter — Cross-System Conversion

The Hexadecimal to Octal Converter helps when working across systems that use different number systems — debugging memory addresses (hex) while setting file permissions (octal).

How to convert between hex and octal:

The most reliable method is to go through decimal first:

  1. Hex → Decimal → Octal
  2. Octal → Decimal → Hex

Example: Hex DEAD to octal

Step Calculation Result
Hex DEAD to decimal D=13, E=14, A=10, D=13 13×4096 + 14×256 + 10×16 + 13 = 57,005
Decimal 57,005 to octal Repeated division by 8 157255

Hex DEAD = Octal 157255

Why convert between hex and octal?

Scenario Need
Debugging memory addresses (hex) while checking file permissions (octal) Cross-reference
Legacy code that uses octal while modern systems use hex Compatibility
Learning number system relationships Education

Use our Hex Octal Converter to convert between these systems instantly.

Complete Conversion Reference Table (All 4 Systems)

This table shows the same number represented in all four number systems simultaneously — a powerful reference for understanding the relationships.

Numbers 0-31

Decimal Binary Hexadecimal Octal
0 0 0 0
1 1 1 1
2 10 2 2
3 11 3 3
4 100 4 4
5 101 5 5
6 110 6 6
7 111 7 7
8 1000 8 10
9 1001 9 11
10 1010 A 12
11 1011 B 13
12 1100 C 14
13 1101 D 15
14 1110 E 16
15 1111 F 17
16 10000 10 20
17 10001 11 21
18 10010 12 22
19 10011 13 23
20 10100 14 24
21 10101 15 25
22 10110 16 26
23 10111 17 27
24 11000 18 30
25 11001 19 31
26 11010 1A 32
27 11011 1B 33
28 11100 1C 34
29 11101 1D 35
30 11110 1E 36
31 11111 1F 37

Important Computer Numbers

Decimal Binary Hexadecimal Octal Significance
255 11111111 FF 377 Maximum byte value
256 100000000 100 400 2⁸
1024 10000000000 400 2000 2¹⁰ (1KB)
4096 1000000000000 1000 10000 2¹² (4KB page)
65535 1111111111111111 FFFF 177777 16-bit maximum
16777215 111111111111111111111111 FFFFFF 77777777 24-bit colour max

Powers of 2 Reference

Power of 2 Decimal Binary Hexadecimal Octal
2⁰ 1 1 1 1
2 10 2 2
4 100 4 4
8 1000 8 10
2⁴ 16 10000 10 20
2⁵ 32 100000 20 40
2⁶ 64 1000000 40 100
2⁷ 128 10000000 80 200
2⁸ 256 100000000 100 400
2⁹ 512 1000000000 200 1000
2¹⁰ 1024 10000000000 400 2000
2¹¹ 2048 100000000000 800 4000
2¹² 4096 1000000000000 1000 10000

How to Choose the Right Converter for Your Task

If You Are... Use This Converter Why
Learning how computers work Binary ↔ Decimal Most fundamental conversion
Web developer designing colours Decimal ↔ Hexadecimal RGB to hex colour codes
Programmer debugging memory Binary ↔ Hexadecimal Memory addresses in hex
System administrator Decimal ↔ Octal chmod file permissions
Working with legacy systems Binary ↔ Octal Old Unix/PDP systems
Cross-system debugging Hexadecimal ↔ Octal Connect hex and octal worlds

Common Number System Mistakes to Avoid

Mistake #1: Confusing Binary Digits with Decimal Digits

What people do: They treat binary 10 as decimal ten (it is actually two).

Why it is wrong: Binary 10 = 2 decimal, not 10 decimal. In binary, each position doubles, not adds ten.

What to do instead: Always remember: binary digits are powers of 2, not powers of 10.

Mistake #2: Using A-F Characters in Octal or Decimal

What people do: They type "FF" into an octal or decimal converter and wonder why it fails.

Why it is wrong: Octal only uses digits 0-7; decimal only uses 0-9. Letters A-F are only valid in hexadecimal.

What to do instead: Check which number system you are entering before typing letters.

Mistake #3: Forgetting to Group Binary from the Right (Not Left)

What people do: They group binary digits starting from the leftmost digit.

Why it is wrong: The least significant bit (LSB) is on the RIGHT. Always group from the right, adding leading zeros to the leftmost group if needed.

What to do instead: Start grouping from the rightmost digit (position 0).

Mistake #4: Forgetting That chmod Octal Is Three Digits (Owner, Group, Others)

What people do: They use a single octal digit for chmod.

Why it is wrong: chmod requires three digits: one for owner, one for group, one for others. 7 alone is not valid — must be 777, 755, 644, etc.

What to do instead: Always use three digits for chmod permissions (or four in some systems with sticky bits).

Frequently Asked Questions About Number Systems

What is binary and why do computers use it?

Binary (base-2) uses only digits 0 and 1. Computers use binary because transistors have only two reliable states: ON (1) and OFF (0). Every piece of data on your computer — every character in this text, every pixel on your screen, every sound in the music you hear — is ultimately stored as binary. Decimal would require ten-state components, which are less reliable and more expensive.

What is hexadecimal used for in programming?

Hexadecimal (base-16) is used extensively in programming because it is 4× more compact than binary while maintaining an exact correspondence. One hex digit equals 4 binary bits. Specific uses include: HTML/CSS colour codes (#FF5733), memory addresses in debuggers (0x7FFD8A3F2B1C), MAC addresses (00:1A:2B:3C:4D:5E), IPv6 addresses, assembly language, and binary file viewers.

What is octal used for today?

Octal (base-8) is primarily used for Unix/Linux file permissions via the chmod command (e.g., chmod 755). Each octal digit (0-7) represents exactly 3 binary bits, perfectly matching the three permission flags for each user class (read, write, execute). Octal is also used in legacy systems like the PDP-11 and some digital electronics applications.

How do I convert binary to decimal?

Multiply each binary digit by 2 raised to its position (starting from 0 on the right), then sum all results. For example, binary 1010 = (1×8) + (0×4) + (1×2) + (0×1) = 8 + 0 + 2 + 0 = 10 decimal. Use our Binary Decimal Converter for instant results with any binary number.

How do I convert decimal to hexadecimal?

Repeatedly divide the decimal number by 16, recording remainders (0-15, with 10-15 as A-F). Read remainders from bottom to top. For example, 255 decimal ÷ 16 = 15 remainder 15 → FF hex. Use our Decimal Hexadecimal Converter for instant conversion of any decimal number.

How many digits are in each number system?

Binary uses 2 digits: 0 and 1. Decimal uses 10 digits: 0-9. Hexadecimal uses 16 digits: 0-9 and A-F (where A=10, B=11, C=12, D=13, E=14, F=15). Octal uses 8 digits: 0-7. Each system is named for its base (number of digits). The relationship between systems: 1 hex digit = 4 bits, 1 octal digit = 3 bits.

Summary: Master All Number Systems

Here is what you learned today:

  • Binary (base 2) — uses 0 and 1; the fundamental language of computers. Every digital device ultimately operates in binary.

  • Decimal (base 10) — uses 0-9; the everyday number system humans use. Bridging decimal and binary is essential for understanding computing.

  • Hexadecimal (base 16) — uses 0-9 and A-F; 4× more compact than binary. Essential for web colours (#FF5733), memory addresses, and debugging.

  • Octal (base 8) — uses 0-7; primarily used for Unix/Linux file permissions. chmod 755 is octal.

  • 1 hex digit = 4 bits, 1 octal digit = 3 bits — these relationships make conversion straightforward.

  • Use our 6 free converters — instantly convert between any number systems for programming, web design, or studying.

Your Next Step

Stop memorizing conversion tables. Here is what to do right now:

  1. Bookmark the Binary Decimal Converter for everyday binary work
  2. Use the Decimal Hexadecimal Converter for web colour codes
  3. Use the Decimal Octal Converter for chmod permission calculations
  4. Reference the conversion table above when studying
  5. Share the six converters with colleagues learning number systems

Master binary, decimal, hex, and octal — the languages of computing.


Disclaimer: This guide is for educational and practical computing purposes. If you are managing sensitive file permissions on production servers, always verify chmod commands before applying. Incorrect permissions can cause security vulnerabilities or system issues.

CP

CalcPool Team

Trusted Tools & Research

CalcPool builds free tools and science-backed content to help you make better financial and lifestyle decisions. Every calculator is verified with real-world data.