Binary (Base-2)
0, 1
The language of computers. Each digit is a bit representing ON (1) or OFF (0).
Use Cases
Computer processors, digital logic, memory addressing, bitwise operations
Example
1010₂ = 10₁₀Convert numbers between binary, octal, decimal, hexadecimal, and other custom bases from 2 to 36.
https://www.solvezi.com/math-tools/number-base-calculator
Valid characters: 0-9
Number Base Calculator • Convert between different number systems instantly
This number base converter converts between binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16) instantly. Use it to convert binary to decimal, decimal to binary, hex to decimal, or any other base combination.
0, 1
The language of computers. Each digit is a bit representing ON (1) or OFF (0).
Use Cases
Computer processors, digital logic, memory addressing, bitwise operations
Example
1010₂ = 10₁₀0-7
Each octal digit represents 3 bits. Popular in early computing and Unix systems.
Use Cases
Unix file permissions (chmod), PDP-11 computers, some embedded systems
Example
12₈ = 10₁₀0-9
The standard human counting system we use every day.
Use Cases
Everyday math, financial calculations, user interfaces
Example
42₁₀ = 420-9, A-F
Compact representation of binary. Each hex digit = 4 bits (a nibble).
Use Cases
Memory addresses, color codes (#FF0000), debugging, assembly language
Example
2A₁₆ = 42₁₀Formula: Multiply each bit by 2^position
1011₂ = 1×8 + 0×4 + 1×2 + 1×1 = 11₁₀
Formula: Repeated division by 2
13₁₀ = 1101₂
Formula: Group bits in 4s (nibbles)
11111111₂ = FF₁₆
Formula: Convert each hex digit to 4 bits
2A₁₆ = 00101010₂
Formula: Multiply each digit by 16^position
2A₁₆ = 42₁₀
Formula: Multiply each digit by 8^position
17₈ = 15₁₀
AND, OR, XOR, NOT, left shift (<<), right shift (>>) — fundamental for low-level programming
5 & 3 = 1 (0101 & 0011 = 0001)Octal represents read (4), write (2), execute (1) permissions
chmod 755 = rwxr-xr-xHexadecimal shows memory locations compactly
0x7FFF (32767 in decimal)Hex colors: #RRGGBB format
#FF0000 = Red, #00FF00 = Green, #0000FF = BlueIPv6 uses hexadecimal notation
2001:0db8:85a3:0000:0000:8a2e:0370:7334Characters map to numeric values
A = 0x41 (65 decimal), space = 0x20 (32 decimal)| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 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 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
A number base converter is a tool that converts numbers between different number systems such as binary (base-2), octal (base-8), decimal (base-10), and hexadecimal (base-16).
Multiply each binary digit by 2 raised to its position (starting from 0 on the right) and add the results. For example, 1011₂ = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11₁₀.
Repeatedly divide the decimal number by 2 and record the remainders. Read the remainders from bottom to top. For example, 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1. So 13₁₀ = 1101₂.
Multiply each hex digit by 16 raised to its position. For example, 2A₁₆ = (2 × 16¹) + (10 × 16⁰) = 32 + 10 = 42₁₀.
Computers use binary because electronic components (transistors) naturally have two stable states: ON (1) and OFF (0). Decimal would require 10 distinct voltage levels, which is harder to implement reliably.
Hexadecimal represents binary data compactly. One hex digit = 4 bits (a nibble), making binary values easier to read and write. For example, 11111111₂ becomes FF₁₆.
A bit is a single binary digit (0 or 1). A nibble is 4 bits (one hex digit). A byte is 8 bits (two hex digits, e.g., 0xFF).
Negative numbers use Two's Complement representation. For 8-bit: invert all bits and add 1. Example: -1 in 8-bit binary = 11111111₂.
Use hexadecimal for most modern programming (memory dumps, debugging, color codes). Use octal for Unix file permissions or legacy systems.
BCD encodes each decimal digit separately into 4 bits. For example, 42₁₀ becomes 0100 0010 in BCD. BCD is used in digital clocks, calculators, and financial systems.
The Babylonians used a base-60 (sexagesimal) system around 2000 BCE. That is why we have 60 minutes in an hour and 360 degrees in a circle.
The word 'bit' is a contraction of 'binary digit', coined by statistician John Tukey in 1946.
Hexadecimal was popularized by IBM in the 1960s for their System/360 mainframes, making it the standard for computing.
The octal system was used on early DEC PDP-11 computers, which influenced Unix file permission notation still used today.
The choice of base affects how efficiently humans can work with numbers. Base-10 works well for humans (10 fingers), but base-2 is optimal for electronics. Base-16 provides a sweet spot — compact like base-10 but directly related to binary.
When debugging or reading memory dumps, use our converter above to quickly switch between hex and decimal. For working with color codes, hex to decimal conversion helps you understand RGB values (e.g., #FF0000 = Red = 255,0,0).