Convert between positive denary and positive binary
🔢 Data Representation: Converting Between Positive Denary and Positive Binary
What is Denary (Decimal)?
Denary is the number system we use every day. It has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9. Think of it as a “10‑base” system because each place value is a power of 10. For example, the number 345 means: $$3 \times 10^2 + 4 \times 10^1 + 5 \times 10^0.$$
What is Binary?
Binary uses only two digits: 0 and 1. It’s a “2‑base” system, so each place value is a power of 2. For instance, the binary number 1011 means: $$1 \times 2^3 + 0 \times 2^2 + 1 \times 2^1 + 1 \times 2^0.$$
Why Convert?
Computers store everything in binary, but we humans read decimal. Converting lets us understand how a computer represents the numbers we use every day. It’s like translating a message from one language to another.
Converting Denary ➜ Binary
- Take the denary number you want to convert.
- Divide it by 2. Write down the remainder (0 or 1).
- Replace the number with the quotient and repeat step 2 until the quotient is 0.
- Read the remainders from bottom to top – that’s the binary number.
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
Converting Binary ➜ Denary
- Write the binary digits with their place values (powers of 2).
- Multiply each digit by its power of 2.
- Sum all the products to get the denary value.
Example: Convert 1101 to denary.
- $1 \times 2^3 = 8$
- $1 \times 2^2 = 4$
- $0 \times 2^1 = 0$
- $1 \times 2^0 = 1$
- Sum: $8 + 4 + 0 + 1 = 13$
Practice Problems
- Convert 27 to binary.
- Convert 1010 to denary.
- Convert 45 to binary.
- Convert 111100 to denary.
Answers
| Problem | Answer |
|---|---|
| 27 ➜ binary | 11011 |
| 1010 ➜ denary | 10 |
| 45 ➜ binary | 101101 |
| 111100 ➜ denary | 60 |
Revision
Log in to practice.