Decimal to Binary Conversion Examples

Decimal-to-binary conversion is a core concept in computer science and digital electronics. Understanding how to convert base-10 numbers to base-2 helps students grasp how computers store and process data efficiently. This process converts numbers from base 10 (human-readable system) to base 2 (machine-readable system). This concept is essential for programming, digital logic design, and computer architecture.

List of methods and examples of decimal to binary conversion are given below.

1. Repeated Division by 2 Method

This is the most common and fundamental method used to convert decimal numbers into binary form. It involves dividing the number repeatedly by 2 and recording remainders.

Algorithm for Repeated Division by 2 Method

This algorithm clearly defines each step to ensure accuracy and avoid common mistakes during conversion.

  • Step 1: Start with the given decimal number N
  • Step 2: Divide by 2
  • Step 3: Record the remainder (it will always be 0 or 1)
  • Step 4: Update the quotient obtained from the division
  • Step 5: Repeat Steps 2 to 4 until N=0
  • Step 6: Write all recorded remainders in reverse order (from last to first)
  • Step 7: The resulting sequence is the binary equivalent

The following diagram explains the entire algorithm of decimal to binary conversion

Decimal to Binary Conversion Example Algorithm Process.

Important: The digits 0 and 1 represent the same numeric values in all number systems (including decimal, binary, octal, hexadecimal, etc.).

Decimal to Binary Conversion Examples

Here are the top 15 examples of Decimal to Binary conversions

Example 1: Convert Decimal (6)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (6)₁₀ into its equivalent binary

Decimal to Binary Conversion Examples - 01

Description:

6 is divided by 2, and the quotient is 3 with a remainder of 0.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top to get the final binary number. The binary representation of the decimal number (6)₁₀ is (110)₂.

Example 2: Convert Decimal (13)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (13)₁₀ into its equivalent binary

 

Description:

13 is divided by 2, and the quotient is 6 with a remainder of 1.
6 is divided by 2, and the quotient is 3 with a remainder of 0.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (13)₁₀ is (1101)₂.

Example 3: Convert Decimal (25)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (25)₁₀ into its equivalent binary

 

Description:

25 is divided by 2, and the quotient is 12 with a remainder of 1.
12 is divided by 2, and the quotient is 6 with a remainder of 0.
6 is divided by 2, and the quotient is 3 with a remainder of 0.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (25)₁₀ is (11001)₂.

Example 4: Convert Decimal (42)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (42)₁₀ into its equivalent binary

 

Description:

42 is divided by 2, and the quotient is 21 with a remainder of 0.
21 is divided by 2, and the quotient is 10 with a remainder of 1.
10 is divided by 2, and the quotient is 5 with a remainder of 0.
5 is divided by 2, and the quotient is 2 with a remainder of 1.
2 is divided by 2, and the quotient is 1 with a remainder of 0.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (42)₁₀ is (101010)₂.

Example 5: Convert Decimal (58)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (58)₁₀ into its equivalent binary

 

Description:

58 is divided by 2, and the quotient is 29 with a remainder of 0.
29 is divided by 2, and the quotient is 14 with a remainder of 1.
14 is divided by 2, and the quotient is 7 with a remainder of 0.
7 is divided by 2, and the quotient is 3 with a remainder of 1.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (58)₁₀ is (111010)₂.

Example 6: Convert Decimal (100)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (100)₁₀ into its equivalent binary

 

Description:

100 is divided by 2, and the quotient is 50 with a remainder of 0.
50 is divided by 2, and the quotient is 25 with a remainder of 0.
25 is divided by 2, and the quotient is 12 with a remainder of 1.
12 is divided by 2, and the quotient is 6 with a remainder of 0.
6 is divided by 2, and the quotient is 3 with a remainder of 0.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (100)₁₀ is (1100100)₂.

Example 7: Convert Decimal (156)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (156)₁₀ into its equivalent binary

 

Description:

156 is divided by 2, and the quotient is 78 with a remainder of 0.
78 is divided by 2, and the quotient is 39 with a remainder of 0.
39 is divided by 2, and the quotient is 19 with a remainder of 1.
19 is divided by 2, and the quotient is 9 with a remainder of 1.
9 is divided by 2, and the quotient is 4 with a remainder of 1.
4 is divided by 2, and the quotient is 2 with a remainder of 0.
2 is divided by 2, and the quotient is 1 with a remainder of 0.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (156)₁₀ is (10011100)₂.

Example 8: Convert Decimal (200)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (200)₁₀ into its equivalent binary

 

Description:

200 is divided by 2, and the quotient is 100 with a remainder of 0.
100 is divided by 2, and the quotient is 50 with a remainder of 0.
50 is divided by 2, and the quotient is 25 with a remainder of 0.
25 is divided by 2, and the quotient is 12 with a remainder of 1.
12 is divided by 2, and the quotient is 6 with a remainder of 0.
6 is divided by 2, and the quotient is 3 with a remainder of 0.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (200)₁₀ is (11001000)₂.

Example 9: Convert Decimal (255)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (255)₁₀ into its equivalent binary

 

Description:

255 is divided by 2, and the quotient is 127 with a remainder of 1.
127 is divided by 2, and the quotient is 63 with a remainder of 1.
63 is divided by 2, and the quotient is 31 with a remainder of 1.
31 is divided by 2, and the quotient is 15 with a remainder of 1.
15 is divided by 2, and the quotient is 7 with a remainder of 1.
7 is divided by 2, and the quotient is 3 with a remainder of 1.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (255)₁₀ is (11111111)₂.

Example 10: Convert Decimal (1024)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (1024)₁₀ into its equivalent binary

 

Description:

1024 is divided by 2, and the quotient is 512 with a remainder of 0.
512 is divided by 2, and the quotient is 256 with a remainder of 0.
256 is divided by 2, and the quotient is 128 with a remainder of 0.
128 is divided by 2, and the quotient is 64 with a remainder of 0.
64 is divided by 2, and the quotient is 32 with a remainder of 0.
32 is divided by 2, and the quotient is 16 with a remainder of 0.
16 is divided by 2, and the quotient is 8 with a remainder of 0.
8 is divided by 2, and the quotient is 4 with a remainder of 0.
4 is divided by 2, and the quotient is 2 with a remainder of 0.
2 is divided by 2, and the quotient is 1 with a remainder of 0.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Example 11: Convert Decimal (1150)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (1150)₁₀ into its equivalent binary

 

Description:

1150 is divided by 2, and the quotient is 575 with a remainder of 0.
575 is divided by 2, and the quotient is 287 with a remainder of 1.
287 is divided by 2, and the quotient is 143 with a remainder of 1.
143 is divided by 2, and the quotient is 71 with a remainder of 1.
71 is divided by 2, and the quotient is 35 with a remainder of 1.
35 is divided by 2, and the quotient is 17 with a remainder of 1.
17 is divided by 2, and the quotient is 8 with a remainder of 1.
8 is divided by 2, and the quotient is 4 with a remainder of 0.
4 is divided by 2, and the quotient is 2 with a remainder of 0.
2 is divided by 2, and the quotient is 1 with a remainder of 0.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (1150)₁₀ is (1000111111110)₂.

Example 12: Convert Decimal (11234)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (11234)₁₀ into its equivalent binary

 

Description:

11234 is divided by 2, and the quotient is 5617 with a remainder of 0.
5617 is divided by 2, and the quotient is 2808 with a remainder of 1.
2808 is divided by 2, and the quotient is 1404 with a remainder of 0.
1404 is divided by 2, and the quotient is 702 with a remainder of 0.
702 is divided by 2, and the quotient is 351 with a remainder of 0.
351 is divided by 2, and the quotient is 175 with a remainder of 1.
175 is divided by 2, and the quotient is 87 with a remainder of 1.
87 is divided by 2, and the quotient is 43 with a remainder of 1.
43 is divided by 2, and the quotient is 21 with a remainder of 1.
21 is divided by 2, and the quotient is 10 with a remainder of 1.
10 is divided by 2, and the quotient is 5 with a remainder of 0.
5 is divided by 2, and the quotient is 2 with a remainder of 1.
2 is divided by 2, and the quotient is 1 with a remainder of 0.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (11234)₁₀ is (10101011110010)₂.

Example 13: Convert Decimal (55890)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (55890)₁₀ into its equivalent binary

 

Description:

55890 is divided by 2, and the quotient is 27945 with a remainder of 0.
27945 is divided by 2, and the quotient is 13972 with a remainder of 1.
13972 is divided by 2, and the quotient is 6986 with a remainder of 0.
6986 is divided by 2, and the quotient is 3493 with a remainder of 0.
3493 is divided by 2, and the quotient is 1746 with a remainder of 1.
1746 is divided by 2, and the quotient is 873 with a remainder of 0.
873 is divided by 2, and the quotient is 436 with a remainder of 1.
436 is divided by 2, and the quotient is 218 with a remainder of 0.
218 is divided by 2, and the quotient is 109 with a remainder of 0.
109 is divided by 2, and the quotient is 54 with a remainder of 1.
54 is divided by 2, and the quotient is 27 with a remainder of 0.
27 is divided by 2, and the quotient is 13 with a remainder of 1.
13 is divided by 2, and the quotient is 6 with a remainder of 1.
6 is divided by 2, and the quotient is 3 with a remainder of 0.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (55890)₁₀ is (1101010010100101)₂.

Example 14: Convert Decimal (881123)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (881123)₁₀ into its equivalent binary

 

Description:

881123 is divided by 2, and the quotient is 440561 with a remainder of 1.
440561 is divided by 2, and the quotient is 220280 with a remainder of 1.
220280 is divided by 2, and the quotient is 110140 with a remainder of 0.
110140 is divided by 2, and the quotient is 55070 with a remainder of 0.
55070 is divided by 2, and the quotient is 27535 with a remainder of 0.
27535 is divided by 2, and the quotient is 13767 with a remainder of 1.
13767 is divided by 2, and the quotient is 6883 with a remainder of 1.
6883 is divided by 2, and the quotient is 3441 with a remainder of 1.
3441 is divided by 2, and the quotient is 1720 with a remainder of 1.
1720 is divided by 2, and the quotient is 860 with a remainder of 0.
860 is divided by 2, and the quotient is 430 with a remainder of 0.
430 is divided by 2, and the quotient is 215 with a remainder of 0.
215 is divided by 2, and the quotient is 107 with a remainder of 1.
107 is divided by 2, and the quotient is 53 with a remainder of 1.
53 is divided by 2, and the quotient is 26 with a remainder of 1.
26 is divided by 2, and the quotient is 13 with a remainder of 0.
13 is divided by 2, and the quotient is 6 with a remainder of 1.
6 is divided by 2, and the quotient is 3 with a remainder of 0.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (881123)₁₀ is (1010111000111100011)₂.

Example 15: Convert Decimal (789009)₁₀ to Binary

Solution:

The following diagram shows the conversion of the decimal number (789009)₁₀ into its equivalent binary

 

Description:

789009 is divided by 2, and the quotient is 394504 with a remainder of 1.
394504 is divided by 2, and the quotient is 197252 with a remainder of 0.
197252 is divided by 2, and the quotient is 98626 with a remainder of 0.
98626 is divided by 2, and the quotient is 49313 with a remainder of 0.
49313 is divided by 2, and the quotient is 24656 with a remainder of 1.
24656 is divided by 2, and the quotient is 12328 with a remainder of 0.
12328 is divided by 2, and the quotient is 6164 with a remainder of 0.
6164 is divided by 2, and the quotient is 3082 with a remainder of 0.
3082 is divided by 2, and the quotient is 1541 with a remainder of 0.
1541 is divided by 2, and the quotient is 770 with a remainder of 1.
770 is divided by 2, and the quotient is 385 with a remainder of 0.
385 is divided by 2, and the quotient is 192 with a remainder of 1.
192 is divided by 2, and the quotient is 96 with a remainder of 0.
96 is divided by 2, and the quotient is 48 with a remainder of 0.
48 is divided by 2, and the quotient is 24 with a remainder of 0.
24 is divided by 2, and the quotient is 12 with a remainder of 0.
12 is divided by 2, and the quotient is 6 with a remainder of 0.
6 is divided by 2, and the quotient is 3 with a remainder of 0.
3 is divided by 2, and the quotient is 1 with a remainder of 1.
1 is divided by 2, and the quotient is 0 with a remainder of 1.

Now, we write all remainders from bottom to top. The binary representation of the decimal number (789009)₁₀ is (11000001010000000001)₂.

2. Positional Weight (Sum of Powers of 2) Method

This method converts decimal numbers by expressing them as the sum of powers of 2. It helps in understanding how binary values are structured.

Algorithm for Positional Weight (Sum of Powers of 2) Method

This structured algorithm helps students accurately convert decimal numbers using powers of 2.

  • Step 1: Start with the given decimal number N
  • Step 2: Find the largest power of 2 less than or equal to N
  • Step 3: Subtract this value from N
  • Step 4: Mark 1 for that power of 2 position
  • Step 5: Repeat Steps 2–4 with the remaining value
  • Step 6: For powers of 2 not used, mark 0
  • Step 7: Continue until all powers down to 2^0 are covered
  • Step 8: Write the binary number from the highest power to the lowest

Example:

  • Convert 19 to binary
  • 19 = 16 + 2 + 1
  • Binary = 10011

Table representation:

Power of 2 Value Used (1/0)
2⁴ 16 1
8 0
4 0
2 1
2⁰ 1 1

This method is conceptually strong and useful for understanding binary representation.

Decimal Fraction to Binary Conversion

Decimal fractions (numbers with decimal points) require a different method involving multiplication. This is crucial for representing real numbers in computing.
List of fractional conversion steps and examples are given below.

1. Multiplication by 2 Method (Fractional Part)

This method converts decimal fractions into binary by repeatedly multiplying by 2 and extracting integer parts.

  • Steps:
    • Multiply the fraction by 2
    • Record integer part (0 or 1)
    • Continue with fractional part
    • Repeat until fraction becomes 0 or reaches precision limit
  • Example:
    • Convert 0.625 to binary
    • 0.625 × 2 = 1.25 → 1
    • 0.25 × 2 = 0.5 → 0
    • 0.5 × 2 = 1.0 → 1
    • Binary = 0.101
  • Table representation:
Step Calculation Integer Part
1 0.625×2 1
2 0.25×2 0
3 0.5×2 1

This method is widely used for floating-point number conversion.

2. Mixed Number Conversion (Integer + Fraction)

When a decimal number has both integer and fractional parts, convert them separately and combine results.

  • Steps:
    • Convert integer part using division method
    • Convert fractional part using multiplication method
    • Combine both results
  • Example:
    • Convert 10.75 to binary
    • Integer part (10) = 1010
    • Fractional part (0.75) = 0.11
    • Binary = 1010.11

This method is essential for representing real-world numerical data in binary systems.

Quick Conversion Examples for Practice

Practicing different decimal values improves speed and accuracy in conversions. A list of decimal to binary examples is given below.

Decimal Binary Decimal Binary Decimal Binary Decimal Binary
0 0 25 11001 50 110010 75 1001011
1 1 26 11010 51 110011 76 1001100
2 10 27 11011 52 110100 77 1001101
3 11 28 11100 53 110101 78 1001110
4 100 29 11101 54 110110 79 1001111
5 101 30 11110 55 110111 80 1010000
6 110 31 11111 56 111000 81 1010001
7 111 32 100000 57 111001 82 1010010
8 1000 33 100001 58 111010 83 1010011
9 1001 34 100010 59 111011 84 1010100
10 1010 35 100011 60 111100 85 1010101
11 1011 36 100100 61 111101 86 1010110
12 1100 37 100101 62 111110 87 1010111
13 1101 38 100110 63 111111 88 1011000
14 1110 39 100111 64 1000000 89 1011001
15 1111 40 101000 65 1000001 90 1011010
16 10000 41 101001 66 1000010 91 1011011
17 10001 42 101010 67 1000011 92 1011100
18 10010 43 101011 68 1000100 93 1011101
19 10011 44 101100 69 1000101 94 1011110
20 10100 45 101101 70 1000110 95 1011111
21 10101 46 101110 71 1000111 96 1100000
22 10110 47 101111 72 1001000 97 1100001
23 10111 48 110000 73 1001001 98 1100010
24 11000 49 110001 74 1001010 99 1100011

Common Mistakes in Decimal to Binary Conversion

Avoiding common mistakes in decimal to binary conversion is essential for achieving accurate results in exams and real-world applications. Even small errors can completely change the binary output.
List of common errors in conversion is given below.

1. Writing Remainders in Wrong Order

This is one of the most frequent mistakes where students write remainders from top to bottom instead of reversing them.

  • Explanation:
    • In the division method, remainders must be written from bottom to top
    • Writing them in the same order gives an incorrect binary number
  • Example:
    • Correct: 25 → 11001
    • Incorrect: 25 → 10011
  • Tip:
    • Always double-check the order of remainders before finalizing the answer

2. Skipping Steps in Division

Students sometimes skip intermediate division steps to save time, which often leads to calculation errors.

  • Explanation:
    • Each division step contributes a binary digit
    • Missing even one step results in an incomplete binary representation
  • Example:
    • Skipping 6 ÷ 2 step in conversion of 25 can produce wrong output
  • Tip:
    • Write all steps clearly, especially in exams, to avoid mistakes

3. Incorrect Fraction Handling

Handling decimal fractions incorrectly is a common issue, especially when mixing methods.

  • Explanation:
    • Integer part uses division by 2
    • Fractional part uses multiplication by 2
    • Confusing these methods leads to incorrect results
  • Example:
    • 0.75 should be converted using multiplication, not division
  • Tip:
    • Treat integer and fractional parts separately, then combine results

4. Misunderstanding Powers of 2

A weak understanding of powers of 2 can result in incorrect binary values.

  • Explanation:
    • Binary is based entirely on powers of 2 (1, 2, 4, 8, 16, …)
    • Choosing wrong powers leads to incorrect bit placement
  • Example:
    • 19 = 16 + 2 + 1 → 10011 (correct)
    • Wrong selection of powers gives incorrect binary
  • Tip:
    • Memorize basic powers of 2 up to at least 2¹⁰ for quick calculations

5. Ignoring Leading Zeros and Bit Length

Sometimes students ignore required bit lengths in problems, especially in digital systems.

  • Explanation:
    • Certain applications require fixed-bit representation (e.g., 8-bit, 16-bit)
    • Missing leading zeros changes the format
  • Example:
    • 5 = 101 (but in 8-bit → 00000101)
  • Tip:
    • Always check if a fixed number of bits is required

Applications of Decimal to Binary Conversion

Understanding decimal to binary conversion is essential for various real-world computing and digital system applications. It forms the foundation of how machines process and store data.
List of key applications is given below.

1. Digital Electronics

Binary numbers are the backbone of digital circuits and electronic systems.

  • Explanation:
    • Circuits use two states: ON (1) and OFF (0)
    • Logic gates (AND, OR, NOT) operate using binary inputs
  • Use Cases:
    • Microcontrollers
    • Embedded systems
    • Circuit design

2. Computer Programming

All high-level programming languages ultimately rely on binary instructions at the machine level.

  • Explanation:
    • Programs are converted into machine code (binary) before execution
    • Binary operations are used in algorithms and data manipulation
  • Use Cases:
    • Bitwise operations
    • Memory management
    • Low-level programming

3. Data Storage

Every type of data in a computer system is stored in binary format.

  • Explanation:
    • Text, images, audio, and video are all converted into binary
    • Storage devices use bits (0s and 1s) to represent information
  • Use Cases:
    • Hard drives and SSDs
    • RAM and cache memory
    • File encoding systems

4. Networking and Communication

Binary encoding is essential for transmitting data across networks and communication systems.

  • Explanation:
    • Data is sent as binary signals over cables or wireless systems
    • Encoding schemes convert data into binary streams
  • Use Cases:
    • Internet data transfer
    • Wireless communication
    • Protocols like TCP/IP

5. Cybersecurity and Encryption

Binary plays a crucial role in securing data through encryption techniques.

  • Explanation:
    • Encryption algorithms convert data into binary patterns
    • Security systems rely on binary-level operations
  • Use Cases:
    • Data encryption
    • Password hashing
    • Secure communications

Conclusion

Decimal to binary conversion is a fundamental skill in computer science that builds the foundation for understanding how computers work internally. By mastering different methods such as division, subtraction, and fractional conversion, students can confidently solve complex problems and apply these concepts in real-world scenarios.