Binary Converter & Calculator

Convert binary to decimal or decimal to binary, calculate with binary numbers, and get exact hexadecimal, octal, bit-length, and step-by-step results.

Binary ↔ Decimal
Exact BigInt
4 Binary Operations
01

Binary Calculator

Optional leading signs, 0b prefixes, spaces, and underscores are supported.

Try an example
Calculation

1011₂ + 1101₂ = 11000₂ (24₁₀)

=

Live Results

Binary result
11000
Decimal
24
Hexadecimal
18
Octal
30
5 bits for the magnitude
Grouped binary
1 1000
groups of four bits

How to Convert Binary to Decimal

Binary is a base-2 number system. Starting at the right, each bit represents a power of 2. Multiply every bit by its place value and add the results.

decimal = bₙ₋₁ × 2ⁿ⁻¹ + … + b₂ × 2² + b₁ × 2¹ + b₀ × 2⁰
1010₂

1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 10₁₀

101101₂

1×2⁵ + 1×2³ + 1×2² + 1×2⁰ = 45₁₀

11111111₂

128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255₁₀

Binary to decimal by place value

Write the powers of two below the bits, keep the powers whose bit is 1, and add them. For 101101₂, add 32 + 8 + 4 + 1 to get 45₁₀.

Decimal to binary by division

Repeatedly divide the decimal integer by 2 and record each remainder. Read the remainders from bottom to top. For 45, the result is 101101₂.

± Binary Arithmetic Rules

Binary addition

0+0=0 · 0+1=1 · 1+1=10

When a column totals two, write 0 and carry 1. A total of three is written 11: write 1 and carry 1.

Binary subtraction

1−0=1 · 1−1=0 · 10−1=1

Borrowing 1 from the next binary column gives 10₂, which is worth two in the current column.

Binary multiplication

101₂ × 11₂ = 1111₂

Multiply by each bit, shift each partial product left by its position, then add the partial products.

Binary division

1010₂ ÷ 11₂ = 11₂ R1₂

Compare the divisor with leading groups, subtract when it fits, bring down the next bit, and keep any final remainder.

# Binary, Decimal, Hex & Octal Table

Use this quick-reference chart for common base-2 values. Four binary bits make one hexadecimal digit.

DecimalBinaryHexOctal
0000
1111
21022
31133
410044
510155
611066
711177
81000810
91001911
101010A12
111011B13
121100C14
131101D15
141110E16
151111F17
16100001020
17100011121
18100101222
19100111323
20101001424

Where Binary Conversion Is Used

Programming

Inspect bitmasks, flags, shifts, permissions, and low-level integer values.

Networking

Understand subnet masks, IPv4 octets, protocol fields, and packet data.

Digital electronics

Work with logic gates, registers, microcontrollers, and hardware states.

Learning

Check homework and practice base conversion or binary arithmetic step by step.

? Binary Converter FAQ

How do I convert binary to decimal?

Multiply each bit by 2 raised to its position, starting with position 0 at the right, then add the values. For example, 1010₂ = 8 + 2 = 10₁₀.

How do I convert decimal to binary?

Divide the decimal integer by 2 repeatedly and record each remainder. Read the remainders from bottom to top. For example, 45₁₀ = 101101₂.

How do I add binary numbers?

Add from right to left. The key rule is 1 + 1 = 10₂: write 0 and carry 1 to the next column. The calculator performs this exactly for positive or negative integers.

How do I subtract binary numbers?

Subtract from right to left. When subtracting 1 from 0, borrow from the next bit: 10₂ − 1₂ = 1₂. A negative result is displayed with a leading minus sign.

How do I multiply binary numbers?

Binary multiplication uses the same shift-and-add method as decimal long multiplication, but each partial product is either 0 or the first number because every multiplier bit is 0 or 1.

How do I divide binary numbers?

Binary long division repeatedly compares, subtracts, and shifts. This tool returns an integer quotient and remainder, so 1010₂ ÷ 11₂ gives quotient 11₂ and remainder 1₂.

What is 1010 in decimal?

1010₂ is 10₁₀ because 1×2³ + 0×2² + 1×2¹ + 0×2⁰ = 8 + 2.

How do I convert binary to hexadecimal?

Group bits into sets of four from the right, then convert each group to one hex digit. For example, 1111 1010₂ becomes FA₁₆. The live result panel does this automatically.

Does the binary converter support negative numbers?

Yes. You can enter a leading minus sign. Negative values are displayed in sign-magnitude notation with a leading minus; the tool does not assume a fixed bit width for two’s complement.

What is the difference between a binary converter and binary calculator?

A binary converter changes a value between number bases. A binary calculator performs arithmetic on two base-2 values. This page includes both tools in separate modes.