Binary Calculator
Convert numbers between decimal and binary in either direction.
Try an example
11111111
About this calculator
How This Binary Calculator Works
Choose a direction — decimal to binary, or binary to decimal — enter a value, and the calculator converts it instantly.
Worked Example
255 in decimal converts to 11111111 in binary — the maximum value representable in 8 bits, or one byte.
Why Computers Use Binary
Digital hardware represents information as electrical signals most reliably distinguished as two states — on or off. Binary's two digits (0 and 1) map directly onto that physical reality, which is why it's the native number system of computing, even though humans generally find decimal easier to work with.
Doing Binary Arithmetic
The simplest way to add, subtract, or otherwise do arithmetic with binary numbers: convert each one to decimal, do the math in decimal (which you already know how to do), then convert the result back to binary using this calculator. Direct binary arithmetic follows the same carrying/borrowing logic as decimal, just with only two digits instead of ten.
Binary vs. Hexadecimal
Hexadecimal is often used alongside binary because each hex digit corresponds to exactly 4 binary digits, making hex a much more compact way to write out binary data — see the Hex Calculator for the base-16 equivalent of this tool.
Worked example
255 in decimal converts to 11111111 in binary — the maximum value representable in 8 bits (a byte).
Frequently asked questions
Why is binary used in computing?
Computer hardware represents data as electrical signals that are most reliably distinguished as two states (on/off) — binary's two digits (0 and 1) map directly onto that, making it the natural base for digital systems.
How do I do binary arithmetic (addition, subtraction)?
The simplest approach: convert each binary number to decimal, do the arithmetic in decimal, then convert the result back to binary using this calculator.
What's the difference between binary and hexadecimal?
Both are alternate number bases; hexadecimal (base 16) is often used alongside binary because each hex digit maps to exactly 4 binary digits, making hex a more compact, human-readable way to represent binary data.