EasyUnitConverter.com

Decimal To Binary Converter

Enter the decimal value to convert to binary or Binary to Decimal.

10
10
10
16

Decimal:

The decimal (Base-10) number system uses digits 0-9 and is the most commonly used number system in everyday life.

Binary:

The binary (Base-2) number system uses only 0 and 1. It is the foundation of all digital computing and electronic circuits.

How to Convert Decimal to Binary — Formula:

Repeatedly divide the decimal number by 2 and record the remainders. Read remainders from bottom to top.

Example: 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1 → Binary: 1101.

Technical Details:

Common decimal-to-binary conversions: 0=0, 1=1, 2=10, 4=100, 8=1000, 16=10000, 32=100000, 64=1000000, 128=10000000, 255=11111111, 256=100000000.

Decimal To Binary Converter:

Convert any decimal number to its binary equivalent instantly. Supports both integer and fractional numbers with detailed conversion steps.

How to Convert Decimal to Binary

  1. Divide the decimal number by 2
  2. Write down the remainder (0 or 1)
  3. Divide the quotient by 2 again
  4. Repeat until the quotient is 0
  5. Read the remainders from bottom to top

Example

Convert decimal 156 to binary:

156 ÷ 2 = 78 remainder 0

78 ÷ 2 = 39 remainder 0

39 ÷ 2 = 19 remainder 1

19 ÷ 2 = 9 remainder 1

9 ÷ 2 = 4 remainder 1

4 ÷ 2 = 2 remainder 0

2 ÷ 2 = 1 remainder 0

1 ÷ 2 = 0 remainder 1

Read bottom to top: 10011100₂

Frequently Asked Questions

How do I convert Decimal to Binary?

Repeatedly divide the decimal number by 2 and record the remainders. Read remainders from bottom to top.

What is the Decimal number system?

The decimal (Base-10) number system uses digits 0-9 and is the most commonly used number system in everyday life.

What is the Binary number system?

The binary (Base-2) number system uses only 0 and 1. It is the foundation of all digital computing and electronic circuits.

Where is Decimal to Binary conversion used?

Common decimal-to-binary conversions: 0=0, 1=1, 2=10, 4=100, 8=1000, 16=10000, 32=100000, 64=1000000, 128=10000000, 255=11111111, 256=100000000.

Can I convert large decimal numbers?

Yes. This converter handles numbers of any practical size. For very large numbers, the conversion is performed using arbitrary-precision arithmetic to ensure accuracy.

How to Convert Decimal to Binary (Base-10 to Base-2)

Converting decimal to binary is fundamental in programming, digital electronics, and computer science education. The repeated division method systematically extracts binary digits from any decimal number.

  1. Divide the decimal number by 2. Record the remainder (0 or 1).
  2. Divide the quotient by 2 again. Record the remainder.
  3. Repeat until the quotient is 0.
  4. Read the remainders from bottom to top — that is the binary number.
  5. Example: 13 ÷ 2 = 6 R1, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1 → 1101₂.
💡 Tip: For quick conversion of small numbers, subtract the largest power of 2 that fits, mark a 1 in that position, and repeat with the remainder. For 45: 32 fits (1), remainder 13; 8 fits (1), remainder 5; 4 fits (1), remainder 1; 1 fits (1). Result: 101101₂.

Decimal to Binary: Common Programming Values

Decimal values frequently encountered in programming and their binary equivalents:

InputOutput
00000 0000
10000 0001
100000 1010
480011 0000
1270111 1111
1281000 0000
2551111 1111
1024100 0000 0000

Solved Examples: Decimal to Binary

Question 1: Convert decimal 200 to binary.

Solution:

200 ÷ 2 = 100 R0

100 ÷ 2 = 50 R0, 50 ÷ 2 = 25 R0, 25 ÷ 2 = 12 R1

12 ÷ 2 = 6 R0, 6 ÷ 2 = 3 R0, 3 ÷ 2 = 1 R1, 1 ÷ 2 = 0 R1

Read remainders bottom-to-top: 11001000

Answer: 200₁₀ = 11001000₂ — this is 0xC8 in hex.

Question 2: An IP address octet is 192. Convert to binary.

Solution:

192 = 128 + 64 = 2⁷ + 2⁶

Set bits 7 and 6: 11000000

Verify: 128 + 64 = 192 ✓

Answer: 192₁₀ = 11000000₂ — the first octet of the 192.168.x.x private network.

Question 3: Convert the subnet mask 255.255.255.0 — specifically the "0" octet — to binary.

Solution:

0₁₀ = 00000000₂

Full mask in binary: 11111111.11111111.11111111.00000000

This is a /24 network (24 ones followed by 8 zeros)

Answer: Each octet converts independently: 255 = 11111111, 0 = 00000000. A /24 subnet has 254 usable host addresses.

Practice: Decimal to Binary

Try solving these on your own to test your understanding:

  1. Convert 42 to binary. (Answer: 101010)
  2. Convert 100 to binary. (Answer: 1100100)
  3. Convert 7 to binary. (Answer: 111)
  4. Convert 168 to binary. (Answer: 10101000)
  5. Convert 500 to binary. (Answer: 111110100)

Subnet Masks and Binary Thinking

Network engineers think in binary when designing subnets. A /26 subnet mask (255.255.255.192) in binary is 11111111.11111111.11111111.11000000 — twenty-six 1s followed by six 0s. The six host bits give 2⁶ - 2 = 62 usable addresses. Converting the decimal mask to binary reveals the network/host boundary instantly. Tools automate this, but understanding binary subnetting is required for CCNA and network engineering interviews.

Bitwise Operations in Programming

Languages like C, Python, and JavaScript use bitwise operators (&, |, ^, ~, <<, >>) that work on binary representations. To set bit 5 of a register: value |= (1 << 5) adds 32 (100000₂). To check if bit 3 is set: (value & 8) !== 0 tests the 1000₂ position. Understanding decimal-to-binary conversion makes these operations intuitive rather than magical.

Key Takeaways

  • Repeatedly divide by 2 and read remainders bottom-to-top.
  • Alternative: subtract largest fitting power of 2, mark 1, repeat.
  • Key boundaries: 127 (7-bit max), 255 (8-bit max), 65535 (16-bit max).
  • IP addressing and subnetting require fluent decimal-to-binary conversion.
  • Bitwise programming operations directly manipulate binary representations.

Related Number System Converters: