In this post we will cover how to convert decimal number to binary number. For binary to decimal conversion refer - Binary to Decimal Number Conversion.
Procedure
To convert a decimal number to any other number system, follow these steps:
- Modulo Operation: Compute the remainder of the number when divided by the base, i.e., number % base.
- Record the Remainder: Write down the remainder obtained.
- Division Operation: Divide the number by the base, i.e., number / base.
- Repeat: Continue the above steps until the number becomes zero (number > 0).
Finally, write down all the remainders in reverse order to get the binary representation.
Example
Let’s convert $(22)_{10}$ into Binary format, where base
value is 2.
Pictorial Explanation
Video Explanation
More Examples
Here’s a quick reference table that shows the binary equivalents of decimal numbers from 0 to 9:
Decimal | Binary |
---|---|
0 | 0000 |
1 | 0001 |
2 | 0010 |
3 | 0011 |
4 | 0100 |
5 | 0101 |
6 | 0110 |
7 | 0111 |
8 | 1000 |
9 | 1001 |