Result
Result reflects the current submitted inputs.
- Risk A
- Reviewed 2026-05-26
- 2 sources
- Binary input is parsed as signed magnitude text, not two's-complement.
- Supported decimal range is -9223372036854775808 to 9223372036854775807.
- Exact integer conversion uses BigInt and outputs exact strings.
Accuracy notes
- Risk level
- A
- Reviewed
- 2026-05-26
- Sources
- 2
- Primary result
- Decimal
Formula logic is kept in a pure calculator module with fixtures, source notes, and page-visible assumptions.
What the result means
Binary results are bit-exact — no rounding. For two's complement negative numbers, the leading 1 means the value is negative; convert back by inverting all bits and adding 1, then negating. Hexadecimal is a compact way to read binary: every 4 binary digits = 1 hex digit.
Use the result this way
- Start with Decimal, then use supporting outputs for context.
- Verify Binary integer before copying the result.
- Check the formula, example, and assumptions before reusing the answer.
User job
How to use this calculator
Use Binary Calculator when you need decimal, then use hexadecimal and normalized binary to check the context for unit checks, engineering notes, recipes, travel, shopping, and measurement cleanup.
Best for
- Converting compatible units
- Auditing the factor used for a repeated conversion
- Reviewing a default example before entering your own binary integer.
Check before relying
- Make sure the source and target units measure the same kind of quantity.
- Negative values use a leading sign, not two's-complement notation.
- Fractional binary values are out of scope.
- Source context: Carnegie Mellon University, reviewed 2026-06-23.
Next useful step
- Scientific CalculatorUse next when your task shifts from Binary Calculator to Scientific Calculator.
- Basic CalculatorUse next when your task shifts from Binary Calculator to Basic Calculator.
- Roman Numeral ConverterUse next when your task shifts from Binary Calculator to Roman Numeral Converter.
Formula
Binary is base 2: every digit is a 0 or 1, and each position represents a power of 2. Reading right to left, the place values are 1, 2, 4, 8, 16, 32, 64, 128, … So 1011 in binary = 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal. Binary arithmetic follows the same rules as decimal, but with carry on 2 instead of 10: 1 + 1 = 10 in binary (a 0 with a carry of 1).
- Place values: from the right, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024. To convert binary → decimal, sum the place values where the bit is 1.
- Decimal → binary: repeatedly divide by 2, recording remainders, then read remainders bottom-up. Example: 13 ÷ 2 = 6 r1, 6 ÷ 2 = 3 r0, 3 ÷ 2 = 1 r1, 1 ÷ 2 = 0 r1 → 1101.
- Addition rules: 0+0=0, 0+1=1, 1+1=10 (write 0, carry 1), 1+1+1=11 (write 1, carry 1). Just like decimal but with carry on 2.
- Two's complement: the standard way computers store signed integers. To negate, invert every bit then add 1. The range for n bits is -2^(n-1) to 2^(n-1) - 1. 8-bit: -128 to 127.
- Binary ↔ hexadecimal: group binary digits in fours from the right; each group is one hex digit. 1010 = A, 1111 = F, 0001 0011 = 13 hex = 19 decimal.
Inputs
Enter binary numbers using only 0s and 1s. For two's complement (negative numbers), pick a bit width (8, 16, 32, 64) — the leftmost bit is the sign bit, and negative values are stored as the bitwise complement plus one.
Example
Addition: 1010 + 0011 = 1101 (10 + 3 = 13). Subtraction: 1100 - 0101 = 0111 (12 - 5 = 7). Multiplication: 1011 × 11 = 100001 (11 × 3 = 33). Conversion: 11111111 binary = 255 decimal = FF hex. Two's complement: -5 in 8-bit two's complement is 11111011.
FAQ
How does binary addition work?
Add column by column from the right, like decimal — but carry on 2 instead of 10. 0+0=0, 0+1=1, 1+1=10 (write 0 carry 1), 1+1+1=11 (write 1 carry 1). Example: 1010 + 0011: column-by-column gives 1101.
How do I convert binary to decimal?
From the right, label the bits with place values 1, 2, 4, 8, 16, 32, … Sum the place values where the bit is 1. Example: 1101 = 8 + 4 + 0 + 1 = 13.
How do I convert decimal to binary?
Repeatedly divide by 2 and record the remainder. Read remainders bottom-up. Example: 13 → 13/2=6 r1, 6/2=3 r0, 3/2=1 r1, 1/2=0 r1, so 13 decimal = 1101 binary.
What is two's complement?
The standard way computers store signed integers. To represent a negative number, take the positive binary, invert every bit, and add 1. In 8-bit, -5 = invert(00000101) + 1 = 11111010 + 1 = 11111011. The leading bit acts as a sign bit (1 = negative).
Why is binary used in computers?
Digital circuits have two stable states — on and off, high and low voltage. Binary maps directly onto these two states, so each bit is a single transistor or storage cell. All higher-level data (text, images, instructions) is built from binary.
How does binary relate to hexadecimal?
Hex (base 16) is shorthand for binary: every 4 bits = 1 hex digit. 0000=0, 1010=A, 1111=F. So an 8-bit byte like 11111111 is FF in hex (255 in decimal). Hex is used in memory addresses, color codes (#FFFFFF), and machine instructions because it's shorter than binary but converts trivially.
Sources
Last reviewed: 2026-05-26
- academicReviewed 2026-06-23Computer Systems: A Programmer's Perspective — Chapter 2: Representing and Manipulating InformationCarnegie Mellon University. Authoritative reference on binary representation, two's complement, and integer arithmetic in computers.
- academicReviewed 2026-06-23Khan Academy: Binary NumbersKhan Academy. Beginner-friendly introduction to binary representation and conversion.
Disclaimer
Binary arithmetic results are bit-exact. Signed-number results assume two's complement representation at the selected bit width; overflow behavior follows standard wrap-around semantics.