Converting between decimal and binary involves a few steps. Here’s a quick guide for each conversion:
### Decimal to Binary
1. **Divide the decimal number by 2.**
2. **Record the remainder.** This will be either 0 or 1.
3. **Update the decimal number** to the quotient from step 1.
4. **Repeat** steps 1-3 until the quotient is 0.
5. **The binary representation** is the remainders read from bottom to top.
**Example: Convert 13 to binary.**
1. 13 ÷ 2 = 6 remainder 1
2. 6 ÷ 2 = 3 remainder 0
3. 3 ÷ 2 = 1 remainder 1
4. 1 ÷ 2 = 0 remainder 1
Reading the remainders from bottom to top gives 1101. So, 13 in binary is 1101.
### Binary to Decimal
1. **Write down the binary number.**
2. **Assign powers of 2** to each digit, starting from 0 on the right.
3. **Multiply each digit** by its corresponding power of 2.
4. **Sum all the results.**
**Example: Convert 1011 to decimal.**
1. Write the binary number: 1011
2. Powers of 2: 2^3, 2^2, 2^1, 2^0
3. Multiply each digit by its power of 2:
- 1 × 2^3 = 8
- 0 × 2^2 = 0
- 1 × 2^1 = 2
- 1 × 2^0 = 1
4. Sum the results: 8 + 0 + 2 + 1 = 11
So, 1011 in binary is 11 in decimal.
Feel free to ask if you need more details or examples!