Decimal to Binary Converter
To convert a decimal number to binary, you can use the method of repeated division by 2. Here's how to do it step by step:
- Divide the decimal number by 2.
- Record the remainder. This will be either 0 or 1.
- Update the decimal number. Take the quotient (the result of the division) as your new number.
- Repeat steps 1-3 until the quotient is 0.
- Read the remainders in reverse order. The first remainder will be the least significant bit (rightmost), and the last remainder will be the most significant bit (leftmost).
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
Now, reading the remainders from bottom to top, we get 1101. So, the decimal number 13 in binary is 1101.