Computer Science & Number Systems

Decimal to Binary Converter & Binary to Decimal Calculator

Convert base-10 denary numbers to binary (base 2) and decode binary numbers back to decimal in real-time. Features step-by-step division by 2, nibble/byte/word grouping, synchronous multi-base representations, and a searchable decimal to binary conversion table (0–255).

Quick Presets:
Decimal (Base 10 / Denary)
Binary (Base 2)

Multi-Base Number System Representation

Binary (Base 2):
1111 1111
Decimal / Denary (10):
255
Hexadecimal (Base 16):
FF
Octal (Base 8):
377
Step-by-Step Division by 2 (Decimal → Binary):
Step Division Operation Quotient Remainder (Bit)

Decimal to Binary Conversion Table (0 to 255)

Complete 8-bit binary conversion chart. Search any decimal, binary, hex, or octal value.

Decimal (Denary) Binary (8-bit) Hexadecimal Octal Power of 2

Complete Guide to Decimal to Binary Conversion

The decimal (base 10) system — also called denary in British computer science curricula — is the everyday number system using digits 0 through 9. Binary (base 2) is the fundamental number system of all digital computing, using only two digits: 0 and 1. Every number, character, image, and sound in a computer is ultimately encoded as a sequence of binary digits called bits. Understanding decimal to binary conversion is foundational to computer science, programming, and digital electronics.

How to Convert Decimal to Binary (Division by 2 Method)

The standard algorithm to convert any positive decimal (denary) integer to binary is successive integer division by 2:

  1. Divide the decimal number by 2 using integer division.
  2. Write down the remainder — it will always be 0 or 1. This becomes a binary digit (bit).
  3. Replace the number with the integer quotient.
  4. Repeat steps 1–3 until the quotient is 0.
  5. Read the remainders from bottom to top (most significant bit to least significant bit).
Example: Convert Decimal 13 to Binary

• 13 ÷ 2 = 6 remainder 1
• 6 ÷ 2 = 3 remainder 0
• 3 ÷ 2 = 1 remainder 1
• 1 ÷ 2 = 0 remainder 1
Reading remainders in reverse order: 1101₂
Verification: 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13₁₀ ✓

Example: Convert Decimal 255 to Binary

255 divided successively by 2 yields 8 consecutive remainders of 1.
Result: 11111111₂ — the maximum value of an 8-bit unsigned byte.
Verification: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255₁₀ ✓

How to Convert Binary to Decimal (Powers of 2 Method)

To convert a binary number to decimal, assign a position index to each bit starting from 0 at the rightmost (least significant) bit. Multiply each bit by 2 raised to its position power and sum the results. Only bits with value 1 contribute to the sum.

Formula: Decimal = (b_n × 2ⁿ) + … + (b₁ × 2¹) + (b₀ × 2⁰)

Example: Convert binary 1101₂ to decimal:
• (1 × 2³) = 1 × 8 = 8
• (1 × 2²) = 1 × 4 = 4
• (0 × 2¹) = 0 × 2 = 0
• (1 × 2⁰) = 1 × 1 = 1
Sum = 8 + 4 + 0 + 1 = 13₁₀

Binary Powers of 2 Reference

Every binary bit position represents a power of 2. Memorizing these values allows quick mental binary decimal conversion:

Binary and Denary — What is the Difference?

Denary is a synonym for decimal (base-10) commonly used in British GCSE and A-Level computer science examinations. A binary and denary converter converts between base 2 and base 10. The terms are interchangeable: "convert binary to denary" means exactly the same as "convert binary to decimal." Our tool works as both a convert binary to denary calculator and a standard decimal to binary calculator.

Binary Grouping: Bits, Nibbles, and Bytes

Long binary strings are hard to read. Computer scientists group binary digits in standard units:

Our decimal to binary tool provides nibble (4-bit), byte (8-bit), and natural grouping options to format binary output for any use case.

Why Do Computers Use Binary?

Computers use binary (base 2) because their physical hardware — transistors, logic gates, and flip-flops — operate in two stable electrical states: low voltage (0) and high voltage (1). This maps directly to binary digits. Using more than two states would require hardware precision that is impractical at scale. All higher-level number systems (octal, decimal, hexadecimal) used in programming are human-readable abstractions that the processor ultimately converts back to binary machine code.

Frequently Asked Questions

How do you convert decimal to binary quickly?
Use our free real-time decimal to binary converter above — enter any decimal integer and the binary result appears instantly. For mental math, use the division by 2 method: divide the number by 2 repeatedly, write down each remainder (0 or 1), and read them from bottom to top. Alternatively, subtract the largest power of 2 that fits, place a 1 in that bit position, and repeat.
To convert a binary number to decimal: assign position values (powers of 2) to each bit from right to left starting at 2⁰, then multiply each bit by its position value and add them all together. Only the bits that are 1 contribute to the total. For example, binary 1010 = (1×8) + (0×4) + (1×2) + (0×1) = 8 + 2 = 10 in decimal. Switch our tool to "Binary → Decimal" mode for instant conversion.
Binary to base ten (binary to decimal) conversion is used whenever you need to read a binary value as a human-readable number. Common applications include: reading CPU register values in debuggers, interpreting network subnet masks (e.g. 11000000.10101000.00000001.00000001 = 192.168.1.1), reading pixel color channel values (00000000 to 11111111 = 0 to 255), checking file permission bits in Unix (e.g. rwx = 111 = 7), and understanding hardware sensor readings in embedded systems.
Decimal 128 in binary is 10000000. It is 2⁷ — the most significant bit of an 8-bit byte. As a signed 8-bit integer, 128 is the minimum negative value (−128) under two's complement. As an unsigned byte, it is the midpoint of the 0–255 range.
Negative integers in binary are represented using two's complement in modern computers: (1) Convert the positive magnitude to binary. (2) Flip all bits (invert 0s to 1s and 1s to 0s) — this is called the one's complement. (3) Add 1 to the result. For example, −13 in 8-bit two's complement: 13 = 00001101 → flip → 11110010 → +1 = 11110011. Our converter handles negative decimal inputs and shows the raw unsigned binary magnitude.
Our binary decimal conversion calculator works in both directions. Use the mode switch to toggle between "Decimal → Binary" and "Binary → Decimal," or click the swap arrow button to instantly flip the current output back as input for reverse conversion. The Multi-Base panel always shows the value in Binary, Decimal/Denary, Hexadecimal, and Octal simultaneously regardless of conversion direction.
Copied to clipboard!