# How to Convert from Decimal to Binary?

The number system is one of the ways to represent numbers. Every number system has its own base or radix. For example, Binary, Octal, Decimal, and Hexadecimal Number systems are some of the number systems and are also used in microprocessor programming.

- Binary Numbers – Base 2
- Octal Numbers – Base 8
- Decimal Numbers – Base 10
- Hexadecimal Numbers – Base 16

These numbers are easy to convert from one system to other systems. One can convert decimal to binary, decimal to hex, decimal to octal, and vice versa. Here let’s learn how to convert decimal to binary number systems along with the conversion steps and examples.

### Decimal to Binary Conversion

Before learning how to convert decimal to binary in a number system, let’s first understand what is a decimal number system and what is a binary number system.

**Decimal Number System**

The number system that has a base value of 10 is called Decimal Number System. Decimal Numbers are consist of the following digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9.

**Binary Number System**

A binary Number System is a base-2 number system that uses two states 0 and 1 to represent a number. For example: 01, 111, etc.

All the decimal numbers have their corresponding binary numbers. These binary numbers are used in computer applications and used for programming or coding purposes. This is because binary digits, 0 and 1 are only understood by computers.

**Steps for Decimal to Binary Conversion**

For converting Decimal numbers into binary numbers, use different methods such as formula, division method, and so on. Here, use the remainder formula. Steps to convert decimal number to binary number using decimal to the binary formula are as follow,

**Step 1: **Divide the given decimal number by 2, find the remainder (R_{i}).

**Step 2:** Now divide the quotient (Q_{i}) that is obtained in the above step by 2, find the remainder.

**Step 3:** Repeat the above steps 1 and 2, until 0 is obtained as a quotient.

**Step 4:** Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (R_{n}, R_{(n – 1)} …. R_{1}). thus binary conversion of the given decimal number will be obtained.

Let’s learn how to convert decimal to binary numbers using the Decimal to Binary formula with some examples.

### Sample Problems

**Question 1: Using decimal to binary formula, convert 2 decimal into a binary number.**

**Solution: **

Using decimal to binary formula,

Step 1:Divide the number by 2, find the remainder:2 ÷ 2 gives Q

_{1}= 1, R_{1}= 0

Step 2:Divide Q_{1}by 2, find the remainder:1 ÷ 2 gives Q

_{2}= 0, R_{2}= 1

Step 3:Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (R_{n}, R_{(n – 1)}…. R_{1}), this is the binary conversion of the given decimal number: 10Answer: Hence, 2 as binary is (10)

_{2}

**Question 2: Using decimal to binary formula, convert 3 decimal into a binary number.**

**Solution: **

Using decimal to binary formula,

Step 1:Divide the number by 3, find the remainder.3 ÷ 2 gives Q

_{1}= 1, R_{1}= 1

Step 2:Divide Q_{1}by 2, find the remainder.1 ÷ 2 gives Q

_{2}= 0, R_{2}= 1

Step 3:Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (R_{n}, R_{(n – 1)}…. R_{1}), this is the binary conversion of the given decimal number: 11Answer: Hence, 3 as binary is (11)

_{2}

**Question 3: Using decimal to binary formula, convert 4 decimal into a binary number.**

**Solution:**

Using decimal to binary formula,

Step 1:Divide the number by 4, find the remainder.4 ÷ 2 gives Q

_{1}= 2, R_{1 }= 0

Step 2:Divide Q_{1}by 2, find the remainder.2 ÷ 2 gives Q

_{2}= 1, R_{2}= 0

Step 3:Divide Q_{2}by 2, find the remainder.1 ÷ 2 gives Q

_{3}= 0, R_{3}= 1

Step 4:Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (R_{n}, R_{(n – 1)}…. R_{1}), this is the binary conversion of the given decimal number: 100Answer: Hence, 4 as binary is (100)

_{2}

**Question 4: Using decimal to binary formula, convert 5 decimal into a binary number.**

**Solution:**

Using decimal to binary formula,

Step 1:Divide the number by 5, find the remainder.5 ÷ 2 gives Q

_{1}= 1, R_{1}= 1

Step 2:Divide Q_{1}by 2, find the remainder.2 ÷ 2 gives Q

_{2}= 1, R_{2}= 0

Step 3:Divide Q2 by 2, find the remainder.1 ÷ 2 gives Q3 = 0, R3 = 1

Step 4:Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (R_{n}, R_{(n – 1)}…. R_{1}), this is the binary conversion of the given decimal number: 101Answer: Hence, 5 as binary is (101)

_{2}

**Question 5: Using decimal to binary formula, convert 6 decimal into a binary number.**

**Solution:**

Using decimal to binary formula,

Step 1:Divide the number by 6, find the remainder.6 ÷ 2 gives Q

_{1}= 2, R_{1}= 0

Step 2:Divide Q_{1}by 2, find the remainder.3 ÷ 2 gives Q

_{2}= 1, R_{2}= 1

Step 3:Divide Q_{2}by 2, find the remainder.1 ÷ 2 gives Q

_{3 }= 0, R_{3}= 1

Step 4:Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (R_{n}, R_{(n – 1)}…. R_{1}), this is the binary conversion of the given decimal number: 110Answer: Hence, 6 as binary is (110)

_{2}

**Question 6: Using decimal to binary formula, convert 7 decimal into a binary number.**

**Solution:**

Using decimal to binary formula,

Step 1:Divide the number by 7, find the remainder.7 ÷ 2 gives Q

_{1 }= 3, R_{1}= 1

Step 2:Divide Q1 by 2, find the remainder.3 ÷ 2 gives Q

_{2}= 1, R_{2 }= 1

Step 3:Divide Q_{2}by 2, find the remainder.1 ÷ 2 gives Q

_{3}= 0, R_{3 }= 1

Step 4:Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (R_{n}, R_{(n – 1)}…. R_{1}), this is the binary conversion of the given decimal number: 111Answer: Hence, 7 as binary is (111)

_{2.}

**Question 7: Using decimal to binary formula, convert 8 decimal into a binary number.**

**Solution:**

Using decimal to binary formula,

Step 1:Divide the number by 8, find the remainder.8 ÷ 2 gives Q

_{1}= 2, R_{1}= 0

Step 2:Divide Q1 by 2, find the remainder.4 ÷ 2 gives Q

_{2}= 1, R_{2}= 0

Step 3:Divide Q2 by 2, find the remainder.2 ÷ 2 gives Q

_{3}= 0, R_{3}= 0

Step 4:Divide Q3 by 2, find the remainder.1 ÷ 2 gives Q

_{4}= 0, R_{4}= 1

Step 5:Write down the remainder in the following manner: the last remainder is written first, followed by the rest in the reverse order (R_{n}, R_{(n – 1)}…. R_{1}), this is the binary conversion of the given decimal number: 1000Answer: Hence, 8 as binary is (1000)

_{2}