- Divide by 2: Continuously divide the decimal number by 2 until the quotient is 0.
- Record the remainder: Record the remainder (either 0 or 1) after each division.
- Reverse the order of the remainders: Arrange all the remainders in reverse order of the divisions; this will give you the binary representation of the decimal number.
Example
Converting decimal 13 to binary:
- 13 ÷ 2 = 6, remainder 1
- 6 ÷ 2 = 3, remainder 0
- 3 ÷ 2 = 1, remainder 1
- 1 ÷ 2 = 0, remainder 1
Reversing the remainders gives: 1101, so the binary representation of decimal 13 is 1101.
You can use this method to convert any decimal number!NOTHING