Decimal to Binary is the process of converting a number from the decimal number system (base 10) to the binary number system (base 2).
Decimal uses digits 0–9.
Binary uses only digits 0 and 1.
Example:
Decimal 10 → Binary 1010
We use Decimal to Binary conversion mainly because:
Computers use binary to process data (all operations are done using 0s and 1s).
It's essential in low-level programming, digital electronics, and computer architecture.
Helps in data encoding, networking, and logic circuit design.
To convert a decimal number to binary:
Divide the number by 2.
Record the remainder (0 or 1).
Repeat the process with the quotient until the quotient is 0.
Read the remainders in reverse to get the binary number.
Example: Convert 13 to binary
13 ÷ 2 = 6 remainder 1
6 ÷ 2 = 3 remainder 0
3 ÷ 2 = 1 remainder 1
1 ÷ 2 = 0 remainder 1
→ Binary = 1101
Use Decimal to Binary conversion:
When programming at a low level (like assembly or embedded systems).
When designing digital systems or logic gates.
In computer science education and theory.
When debugging or interpreting binary data stored or transferred by computers.