To convert a decimal number to binary, follow these steps:
- Divide the decimal number by 2.
- Write down the remainder (0 or 1).
- If the quotient is not zero, repeat step 1 with the quotient as the new decimal number. Otherwise, the binary number is complete.
- Read the sequence of remainders backwards (from the last remainder to the first) to get the binary equivalent.
Here’s an example of how to convert the decimal number 35 to binary:
- 35 / 2 = 17 remainder 1
- Write down “1”.
- 17 / 2 = 8 remainder 1
- Write down “1”.
- 8 / 2 = 4 remainder 0
- Write down “0”.
- 4 / 2 = 2 remainder 0
- Write down “0”.
- 2 / 2 = 1 remainder 0
- Write down “0”.
- 1 / 2 = 0 remainder 1
- Write down “1”.
Reading the remainders backwards, we get 100011 in binary. Therefore, 35 in decimal is equivalent to 100011 in binary.