math

Binary Calculator

A binary calculator converts between decimal and binary — base 10 and base 2.

retro matrix layoutHOLA-SERIES // ANALYZER
LCD OUTPUT STATUS // DEG MATH
Binary11111111
Hex:FF
Octal:377

Recent Calculations

No calculations yet — results will appear here automatically.

About the Binary Calculator

A binary calculator converts between decimal and binary — base 10 and base 2. Binary is how computers represent everything, because a circuit is either on or off, and understanding the conversion is the entry point to bitwise operations, memory sizes, and network addressing.

The formula

n = bₖ·2ᵏ + … + b₂·2² + b₁·2¹ + b₀·2⁰

Each b is a bit, either 0 or 1, and its position gives the power of two it contributes. Reading right to left, the place values are 1, 2, 4, 8, 16, 32 and so on.

How to use this calculator

  1. 1Enter your Decimal Number. The field starts at 255, which you can overwrite.
  2. 2Read the result straight away — it recalculates as you type, so there is no button to press. Use Share to copy a link that reopens the page with your exact numbers filled in.

Worked example

Example inputs and the resulting output for the Binary Calculator
InputValue
Decimal Number255

Result

Binary: 11111111

Hex: FF

Octal: 377

Those are the values the page loads with, so you can reproduce this result yourself and then change one field at a time to see what drives the outcome.

Understanding your result

Converting decimal to binary works by repeated division by 2, collecting remainders and reading them in reverse. For 255: dividing repeatedly by 2 yields eight remainders of 1, giving 11111111. Going the other way, sum the place values wherever a bit is 1.

Certain binary values recur constantly in computing because they mark boundaries. 255 is 11111111, the maximum of eight bits, which is why colour channels and IP address octets both run 0 to 255. 1024 is 2¹⁰, which is why memory is measured in powers of two, and 65,535 is the largest 16-bit value, which is why that number appears as a limit throughout older software.

Things worth knowing

  • Eight bits make a byte, holding values 0 to 255 unsigned.
  • Shifting a binary number left by one place doubles it; shifting right halves it, discarding any remainder.
  • Signed integers usually use two's complement, where the leading bit indicates a negative value.
  • Hexadecimal is a compact stand-in for binary because each hex digit maps to exactly four bits.
  • Powers of two in binary are a single 1 followed by zeros, which makes them instantly recognisable.

Frequently asked questions

How do I convert a decimal number to binary?+

Divide by 2 repeatedly, recording each remainder, then read the remainders bottom to top. 10 becomes 1010 this way. Alternatively subtract the largest power of two that fits and repeat.

Why do computers use binary?+

Because electronic circuits reliably distinguish two states — on and off, high and low voltage — but not ten. Two-state logic is far more robust against noise and easier to build than a base-10 equivalent.

What is the largest number eight bits can hold?+

255 unsigned, which is 11111111 in binary. That is why colour values and IP address octets both run from 0 to 255 — each occupies exactly one byte.

How does binary represent negative numbers?+

Most systems use two's complement: invert all the bits of the positive value and add 1. The leading bit then acts as a sign flag, and addition works identically for positive and negative values.

Related math calculators