Done

🔢 Binary to Decimal Converter

Convert binary numbers to decimal, hex, octal, and more — with interactive bit-toggle input, live positional breakdown, signed integer support, and batch mode.

Binary Input
Integer type:
Interactive Bit Toggle (click to flip)
Batch Converter

Understanding Binary to Decimal Conversion

Positional Notation

Binary uses base-2 positional notation. Each bit position represents a successive power of 2, starting from 2⁰ = 1 at the rightmost position (LSB). To convert to decimal, multiply each bit (0 or 1) by its positional value and sum all non-zero contributions. Example: 1011 = 8 + 0 + 2 + 1 = 11.

Two's Complement (Signed Integers)

Two's complement is the universally adopted method for representing negative integers in binary. The most significant bit (MSB) is given a negative weight — for an n-bit number the MSB carries the value −2n−1. This means a processor can use the same addition circuit for both positive and negative numbers, making it extremely efficient.

Hexadecimal Shorthand

Every group of 4 binary digits maps directly to a single hexadecimal digit (0–F). This one-to-one correspondence makes hex the preferred shorthand for binary in programming, memory addresses, and colour codes. Example: 010010000100 = 4, 1000 = 8 → 0x48.

Overflow & Integer Ranges

An n-bit unsigned integer holds values 0 to 2ⁿ−1. An n-bit signed two's complement integer holds −2ⁿ⁻¹ to 2ⁿ⁻¹−1. Common sizes: 8-bit (0–255 / −128 to 127), 16-bit (0–65535 / −32768 to 32767), 32-bit (0 to ~4.3 billion / ~±2.1 billion). Overflow occurs when arithmetic results exceed these bounds.

When is Binary-to-Decimal Conversion Used?

Binary-to-decimal conversion is a foundational skill in computer science and engineering with many practical applications.

Embedded Systems

Microcontroller register values and sensor outputs arrive as raw binary. Converting to decimal allows engineers to verify values against datasheet specifications.

IP Address Subnetting

IPv4 addresses and subnet masks are 32-bit binary numbers. Subnet calculations require understanding decimal representations of binary octets like 11000000 = 192.

Computer Science Education

Converting binary to decimal is one of the first skills taught in data representation, number systems, and low-level programming courses worldwide.

Cybersecurity & CTF

Binary payloads in network captures, memory dumps, and CTF challenges must be decoded to decimal to identify values, port numbers, and embedded constants.

RGB Colour Codes

Each 8-bit colour channel (R, G, B) is a binary integer 00000000–11111111. Designers and developers frequently convert between binary, decimal, and hex colour representations.

Database & File Formats

Binary flags, bitmasks, and field widths in file headers are specified as binary patterns. Converting these to decimal enables human-readable interpretation of raw file data.

How to Use This Binary to Decimal Converter

  1. Enter your binary number — type or paste a binary string (e.g., 01001000). Spaces are automatically ignored. Use the interactive bit-toggle row to flip individual bits.
  2. Select the integer type — choose Unsigned, Signed (two's complement), or Sign-magnitude to control how the MSB is interpreted. Most standard conversions use Unsigned.
  3. Click Convert (or use Live mode) — the decimal result appears instantly in the large display, alongside hexadecimal, octal, bit length, and Base64 representations.
  4. Study the step-by-step breakdown — the Step-by-Step tab shows each bit multiplied by its power of 2. The Positional Table gives a row-per-bit breakdown with totals. The Arithmetic tab reveals bitwise NOT, shifts, and two's complement negation.
  5. Use Batch mode for multiple values — paste a list of binary numbers (one per line) and click Convert All to get decimal, hex, and octal for each. Download results as a CSV file.

Frequently Asked Questions

How do you convert binary to decimal?
Write out each bit and assign it a positional value equal to 2 raised to its position (starting at 0 from the right). Multiply each bit by its positional value and sum only the positions where the bit equals 1. For example: 1011 = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11.
What is 01001000 in decimal?
The binary number 01001000 equals decimal 72. The 1-bits appear at positions 3 and 6 (counting from 0 on the right): 2³ + 2⁶ = 8 + 64 = 72. In hexadecimal this is 0x48, and in the ASCII table, 72 is the character 'H'.
What is 11111111 in decimal?
As an unsigned 8-bit integer, 11111111 equals 255 (the sum of all powers from 2⁰ to 2⁷ = 1+2+4+8+16+32+64+128 = 255). As a signed 8-bit two's complement integer, the same bit pattern represents −1.
What is two's complement and why do computers use it?
Two's complement assigns the MSB a negative weight (−2n−1). This allows a CPU to add positive and negative numbers using the same hardware circuit, eliminating the need for a separate subtraction unit. It also avoids the dual-zero problem of sign-magnitude representation. To negate a number: invert all bits, then add 1.
What is the range of 8-bit, 16-bit, and 32-bit integers?
8-bit unsigned: 0 to 255 · signed: −128 to 127
16-bit unsigned: 0 to 65,535 · signed: −32,768 to 32,767
32-bit unsigned: 0 to 4,294,967,295 · signed: −2,147,483,648 to 2,147,483,647
64-bit unsigned: 0 to ~1.8×10¹⁹ · signed: ~±9.2×10¹⁸
How do you convert binary to hexadecimal?
Group the binary digits into sets of 4 from the right, padding with leading zeros if needed. Replace each 4-bit group with its hex equivalent: 0000=0 through 1111=F. Example: 010010000100 = 4, 1000 = 8 → 0x48.
What does a left or right bit shift do?
A left shift (<< 1) multiplies by 2 — it appends a 0 on the right. Example: 0011 (3) → 0110 (6). A right shift (>> 1) divides by 2, discarding the remainder — it removes the rightmost bit. Example: 0110 (6) → 0011 (3). Shifts are faster than multiplication/division on most hardware.
What is sign-magnitude representation?
In sign-magnitude, the MSB is a sign flag (0 = positive, 1 = negative) and the remaining bits represent the magnitude. For example, 10000011 = −3 in sign-magnitude. This format is intuitive but has two zeros (+0 and −0) and requires separate addition/subtraction hardware, which is why modern processors use two's complement instead.
Quick Values
Powers of 2
2ⁿ Decimal Hex
How It Works
Formula:
d = Σ bᵢ × 2ⁱ
Example: 1011
1×2³ + 0×2² + 1×2¹ + 1×2⁰
= 8 + 0 + 2 + 1
= 11
Two's complement:
MSB has weight −2ⁿ⁻¹ instead of +2ⁿ⁻¹
Number Bases
BinaryBase 2 · digits 0,1
OctalBase 8 · digits 0–7
DecimalBase 10 · digits 0–9
HexBase 16 · 0–9, A–F