Binary to Decimal Calculator

Paste a binary value and choose your format. See decimal output, steps, and saved history. Export calculations, share tables, and learn faster daily online.

White theme Validation Steps History CSV & PDF export
Binary input
Accepts 10101 or 101.011.
Tips: spaces and underscores are ignored. Optional leading - works in unsigned mode.
Two's complement treats the leftmost bit as the sign bit.
Options
Precision, bit width, and limits.
Pads with leading zeros when width is larger.

Higher scale shows more decimal digits for fractions.
Limits long fractional inputs to keep output readable.
Actions
Calculate, reset, and examples.
Reset
Suggested examples:
  • 101101 → 45
  • 11111111 (8-bit two's) → -1
  • 10.101 → 2.625
Exports use your saved history table below.
Example data table
Common binary values and their decimal equivalents.
Binary Mode Bit width Decimal Use case
101101 Unsigned 45 General conversion
11111111 Two's complement 8 -1 Signed byte representation
10000000 Two's complement 8 -128 Smallest 8-bit integer
10.101 Unsigned 2.625 Fixed-point style fractions
Saved history
Up to 25 recent calculations in this browser session.
Download CSV
Time Binary Mode Width Scale Decimal Notes
No calculations yet. Convert a value to populate this table.
Formula used
Binary positional weights for integer and fractional parts.

For an unsigned binary number with bits bn-1 … b0, the decimal value is:

V = Σ (bi · 2i) , for i = 0 … n-1

If a fractional part exists, .f1 f2 … fm, it adds:

F = Σ (fk · 2-k) , for k = 1 … m

Two’s complement integers use the same weights, but the top bit is negative: V = -bn-1·2n-1 + Σ (bi·2i).

How to use this calculator
A quick workflow for accurate results.
  1. Enter a binary value (optionally with a decimal point).
  2. Select Unsigned or Two’s complement interpretation.
  3. If using two’s complement, choose a bit width (or auto).
  4. Adjust Fraction display scale for longer decimals.
  5. Click Convert to decimal to see the result and steps.
  6. Use Download CSV or Download PDF to export history.

Binary place values and practical ranges

Each left shift doubles value, so bit positions grow quickly. A 10-bit unsigned number spans 0–1023, while 16-bit spans 0–65,535. This calculator displays positional weights as 2^i, helping you verify where magnitude comes from before trusting the final decimal output.

Unsigned conversion with stepwise doubling

The integer engine uses repeated doubling: acc = acc×2 + bit. This is stable for long inputs because it avoids floating arithmetic. For example, 101101 converts as (((((0×2+1)×2+0)×2+1)×2+1)×2+0)×2+1 = 45, matching the weight-sum method.

Fractional bits and fixed decimal precision

Fractional weights are 2^-k, so 0.1₂ = 0.5 and 0.01₂ = 0.25. With scale set to 20 digits, 10.101₂ becomes 2.625 exactly. When fractions repeat in base-10, scale controls display length, and the history table keeps a consistent precision record.

Two’s complement interpretation and bit width

Signed integers depend on width. With 8-bit two’s complement, 11111111₂ is −1 and 10000000₂ is −128. If you choose 16-bit, the same pattern is padded and represents a different magnitude. Width selection prevents accidental misreads when copying values from bytes, words, or registers.

Validation rules that prevent silent mistakes

Inputs accept only 0, 1, and one decimal point; spaces and underscores are ignored. Two’s complement mode blocks fractions to avoid ambiguous signed fixed-point assumptions. A configurable fractional-bit limit keeps results readable, especially when users paste long binary strings from logs or exports.

Exports, reproducibility, and review workflow

CSV export captures timestamp, mode, width, scale, and the computed decimal value for audit trails. PDF export prints your latest result plus the session history table, supporting quick reviews. For best practice, convert, scan the Plotly contribution bars, then export the record you used for decisions.

FAQs
Quick answers to common usage questions.

Does this support very large binary integers?

Yes. Integer conversion uses decimal-string arithmetic, so long unsigned inputs are handled without integer overflow. The Plotly chart may approximate very large contributions because it uses floating values for visualization.

Why does two’s complement require a bit width?

Signed meaning depends on the sign bit’s position. With 8 bits, 10000000₂ equals −128; with 16 bits, 10000000₂ equals 128. Selecting width aligns the calculation with your data source.

How accurate are fractional conversions?

Fractional bits are converted using scaled integer terms based on 10^scale / 2^k. Exact results appear when the decimal terminates; repeating decimals are displayed up to your selected scale.

Can I enter separators like spaces or underscores?

Yes. The input cleaner removes spaces and underscores, so values like 1101_0010 or 1101 0010 are accepted. Characters other than 0, 1, and a single dot are rejected.

What happens if my fractional part is very long?

The calculator enforces a fractional-bit limit you can adjust. If the fraction exceeds the limit, it shows an error instead of producing an unreadably long decimal expansion.

How do the CSV and PDF exports differ?

CSV is best for spreadsheets and automated checks, containing structured columns for each run. PDF is best for sharing and printing, summarizing the latest result plus the on-page history table.

Related Calculators

percent to decimal calculatordecimal equivalent calculatorwords to decimal calculatordecimal to octal calculatordecimal to inch converteroctal to decimal calculatorhexadecimal to decimal calculatordecimal to hexadecimal calculatordecimal square root calculatordivide decimals calculator

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.