Logo

MonoCalc

/

Binary to Decimal Converter

Converter
Binary → DecimalDecimal → Binary

Signed (Two's Complement)

Show Step-by-Step

About This Tool

Binary to Decimal Converter – Instant Number System Translation

Binary and decimal are the two number systems you encounter most in computing. Decimal (base 10) is what humans use every day; binary (base 2) is what every computer, microcontroller, and digital circuit operates on internally. This converter bridges the gap instantly — enter a binary string to get its decimal value, or flip the direction to convert decimal back to binary. It also shows the equivalent octal and hexadecimal representations in one step.

How Binary and Decimal Differ

Decimal uses ten digits (0–9); each position represents a power of 10. Binary uses only two digits (0 and 1); each position represents a power of 2. The rightmost bit (the least significant bit) has weight 2⁰ = 1, the next has weight 2¹ = 2, then 2² = 4, 2³ = 8, and so on. To convert binary to decimal you multiply each bit by its weight and sum the results. For example:

101101 = 1×32 + 0×16 + 1×8 + 1×4 + 0×2 + 1×1 = 45

To convert decimal to binary, repeatedly divide by 2 and collect the remainders in reverse order. 45 ÷ 2 = 22 R 1, 22 ÷ 2 = 11 R 0, 11 ÷ 2 = 5 R 1, 5 ÷ 2 = 2 R 1, 2 ÷ 2 = 1 R 0, 1 ÷ 2 = 0 R 1 → reading remainders bottom-up: 101101.

Fractional Binary Numbers

You can include a binary point (analogous to a decimal point) to convert non-integer values. Digits after the binary point use negative powers of 2: the first fractional bit is 2⁻¹ = 0.5, the second is 2⁻² = 0.25, the third is 2⁻³ = 0.125, and so on. For example:

1011.101 = 8 + 2 + 1 + 0.5 + 0.125 = 11.625

Note that most decimal fractions (such as 0.1) cannot be represented exactly in a finite number of binary digits — this is the same rounding phenomenon that affects all floating-point arithmetic. The converter uses up to 8 fractional digits by default, which is sufficient for most practical purposes.

Two's Complement Signed Integers

Modern processors store negative integers in two's complement form. In this representation a binary string is interpreted as negative if its most significant bit (MSB) is 1. Enable Signed mode and choose a bit width (8, 16, 32, or 64) to see the signed decimal value. For an N-bit signed integer the formula is:

signed value = unsigned value − 2ᴺ (when MSB = 1)

For example, 11110011 in 8-bit two's complement = 243 − 256 = −13. This mode is essential when reading CPU registers, debugging low-level code, or working with network packet fields that use signed integers.

Bit-Weight Visualization

The bit-weight table shows each digit aligned under its power-of-2 value. Bits set to 1 are highlighted; the sum of their weights equals the decimal result. This visual makes it easy to verify a conversion at a glance and is particularly helpful for students learning positional notation for the first time.

Why See Octal and Hexadecimal Too?

Binary, octal, and hexadecimal are closely related. Every three binary digits correspond to exactly one octal digit; every four binary digits correspond to exactly one hexadecimal digit. Programmers routinely switch between these representations when working with memory addresses, file permissions (Unix chmod uses octal), HTML/CSS color codes (hex), network protocol fields, and assembly or machine code. Displaying all four bases simultaneously saves multiple conversion steps.

Common Use Cases

Students in computer science and digital electronics courses use this tool to verify manual calculations and build intuition for positional number systems. Programmers reach for it when decoding raw binary data from embedded systems, serial ports, or file formats. Network engineers convert subnet masks and IP address octets. Security analysts decode binary-encoded packet fields. The step-by-step breakdown makes it a useful teaching aid for explaining how number system conversion works to others.

Accuracy and Limitations

Integer conversions are exact for all values within JavaScript's safe integer range (2⁵³ − 1, approximately 9 quadrillion). This covers 8-bit, 16-bit, 32-bit, and even most 64-bit use cases encountered in practice. Fractional conversions may have small rounding errors beyond 8 significant digits, which is standard behavior for floating-point arithmetic. A warning is displayed when the input exceeds the safe integer range.

Frequently Asked Questions

Is the Binary to Decimal Converter free?

Yes, Binary to Decimal Converter is totally free :)

Can I use the Binary to Decimal Converter offline?

Yes, you can install the webapp as PWA.

Is it safe to use Binary to Decimal Converter?

Yes, any data related to Binary to Decimal Converter only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does the Binary to Decimal Converter work?

Enter a binary number (digits 0 and 1 only) and the converter instantly calculates its decimal equivalent using positional weighted-sum expansion. Each bit is multiplied by its corresponding power of 2, and all products are summed. For example, binary 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11 in decimal. You can also convert decimal back to binary.

Can I convert fractional binary numbers?

Yes. Enter a binary point (.) to include a fractional part, for example 1011.101. The integer and fractional parts are converted separately: fractional bits use negative powers of 2 (2⁻¹ = 0.5, 2⁻² = 0.25, etc.). So 1011.101 = 11 + 0.5 + 0.125 = 11.625 in decimal.

What is two's complement signed mode?

Two's complement is how computers store negative integers in binary. Enable Signed mode and choose a bit width (8, 16, 32, or 64 bits). If the most significant bit is 1, the value is negative: its decimal value equals the unsigned value minus 2ᴺ (where N is the bit width). For example, 11110011 in 8-bit signed = 243 − 256 = −13.

What is the maximum binary number I can convert?

The converter handles integers up to JavaScript's safe integer limit of 2⁵³ − 1 (about 9 quadrillion). For standard use cases such as 8-bit, 16-bit, or 32-bit values, results are always exact. A warning is shown if precision may be affected for very large inputs.

Why do I see octal and hexadecimal results as well?

Binary, octal, and hexadecimal are closely related number systems: every 3 binary digits map to one octal digit, and every 4 binary digits map to one hexadecimal digit. Displaying all four bases at once lets programmers quickly cross-check values, which is especially useful when working with memory addresses, CPU registers, or bitwise operations.

How does the step-by-step breakdown help?

The step-by-step panel shows each bit aligned under its power-of-2 weight, making it easy to verify or learn the conversion manually. For decimal-to-binary direction it shows the repeated division-by-2 steps. This is useful for students learning positional notation and for anyone wanting to double-check their work.