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: 01001000 → 0100 = 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
- 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.
- 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.
- Click Convert (or use Live mode) — the decimal result appears instantly in the large display, alongside hexadecimal, octal, bit length, and Base64 representations.
- 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.
- 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
1011 = 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11.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'.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.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¹⁸
01001000 → 0100 = 4, 1000 = 8 → 0x48.<< 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.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.| 2ⁿ | Decimal | Hex |
|---|
= 8 + 0 + 2 + 1
= 11
MSB has weight −2ⁿ⁻¹ instead of +2ⁿ⁻¹