This Binary Calculator converts non-negative whole numbers between decimal (base 10) and binary (base 2). Choose a conversion direction, enter a decimal integer or a binary digit string, and read the equivalent value. The current widget does not add binary numbers or encode negative values using two’s complement.
How to Use the Binary Calculator
- Select Decimal → Binary or Binary → Decimal.
- For decimal-to-binary, enter a non-negative safe integer.
- For binary-to-decimal, enter a string containing only 0 and 1; spaces are ignored.
- Read the converted value.
How Binary Conversion Works
Each binary position represents a power of two. For example, (1101_2 = 1×8 + 1×4 + 0×2 + 1×1 = 13_{10}). To convert a positive decimal integer to binary, repeatedly divide by 2 and read the remainders in reverse order.
Worked Examples
- Decimal to binary: 13 → 1101.
- Binary to decimal: 1111 → 15.
- Place values: 101010₂ = 32 + 8 + 2 = 42.
Binary Place Values and Reading a Result
Read a binary integer from right to left, starting at position zero. Each position is a power of two. In 101101₂, the active positions are 32, 8, 4 and 1, so the decimal value is 45. Leading zeros do not change the value: 00001101₂ and 1101₂ both represent 13. The number of digits can still matter when a separate system assigns a fixed bit width.
Do not confuse an unsigned binary magnitude with a signed machine integer. In an 8-bit two's-complement system, 11111111 represents −1, but this converter reads that same digit string as the unsigned value 255. A signed interpretation requires a declared bit width and a signed-number convention.
Calculator.net's Binary Calculator includes binary arithmetic as well as two-way conversion, while IntelCalculator's binary tools cover bitwise logic and fixed-width operations. Choose those workflows when you need arithmetic or bit manipulation; use this page when you need a straightforward integer conversion.
Binary Conversion vs Binary Arithmetic
Some online base converters support signed values, fixed bit widths, bitwise operations, batch conversion or arithmetic. This widget is intentionally narrower: it converts in either direction and validates the binary input. It does not provide binary addition, bitwise AND/OR/XOR, fractional binary, octal conversion or two’s-complement formatting.
For hexadecimal conversion, use the Hex Calculator.
Assumptions and Limitations
- Decimal inputs must be non-negative safe integers; fractional and negative decimal values are not supported.
- Binary input must contain at least one digit and only 0 or 1 after spaces are removed.
- Binary strings are parsed as non-negative integers; leading zeros do not change the decimal value.
- The tool does not infer a signed bit width or two’s-complement meaning.
- Very long binary strings can be converted using integer arithmetic, but the UI and browser remain subject to practical input-size limits.
