Home Math Binary Calculator

Binary Calculator

Any whole number in binary, hexadecimal and octal at once.

Advertisement

How it works

Enter a whole number and read it in the three bases programmers live in: binary for bits and flags, hexadecimal for colors, memory and byte values, octal for file permissions. Each hexadecimal digit packs exactly four bits, which is why developers read hex as compressed binary.

Advertisement

Formula

Binary: divide by 2 and collect remainders upward.
Hex: the same with 16, where digits 10 to 15 are written A to F.
Octal: the same with 8.

Example

Example in plain words. The year 2026.

Binary: 11111101010.

Hexadecimal: 7EA, since 7 x 256 + 14 x 16 + 10 = 2026.

Octal: 3752.

Frequently asked questions

Why do colors use hex?

A color channel is one byte, 0 to 255, which is exactly two hex digits: FF is 255. Six digits pack a whole color.

Where does octal still appear?

Unix file permissions: 755 means full rights for the owner, read and execute for the rest, one octal digit per group of three bits.

Advertisement

Related calculators

Percentage Calculator

Find a percent of a number, what percent one number is of another, and percent change, all at once.

Fraction Calculator

Add, subtract, multiply and divide fractions, with the answer simplified.

Scientific Calculator

Online scientific calculator with trig, logs, powers, roots, factorial and degree or radian mode.

Quadratic Formula Calculator

Solve ax² + bx + c = 0, with the discriminant and the vertex.