20 in Binary
20 in binary is 10100. It takes 5 bits to write, and as a full byte it is 00010100.
How to convert 20 to binary
Divide by 2, write down the remainder, and repeat with the quotient until it reaches 0. The remainders, read from the last row up to the first, spell out 10100.
| Division | Quotient | Remainder |
|---|---|---|
| 20 ÷ 2 | 10 | 0 |
| 10 ÷ 2 | 5 | 0 |
| 5 ÷ 2 | 2 | 1 |
| 2 ÷ 2 | 1 | 0 |
| 1 ÷ 2 | 0 | 1 |
Check it the other way
To verify, read 10100 left to right, giving each digit its place value and adding up the places that hold a 1.
| Bit | Place value | Contributes |
|---|---|---|
| 1 | 24 = 16 | 16 |
| 0 | 23 = 8 | 0 |
| 1 | 22 = 4 | 4 |
| 0 | 21 = 2 | 0 |
| 0 | 20 = 1 | 0 |
Adding the contributions: 16 + 0 + 4 + 0 + 0 = 20. The conversion checks out.
20 in every base
| Format | Value |
|---|---|
| Binary | 10100 |
| Decimal | 20 |
| Hexadecimal | 14 |
| Octal | 24 |
| As a byte (8-bit) | 00010100 |
Worth knowing about 20
Twenty is a score, the counting word in four score and seven years ago, and the base of vigesimal systems like Maya numerals that grew from counting fingers and toes together.
Convert another number
- Binary
- Hex
- Octal
Nearby numbers
Or browse the full table at numbers in binary.
FAQ
What is 20 in binary?
20 converts to 10100 in binary. Every 1 in the pattern marks a power of two that is part of the total, and every 0 marks one that is skipped. Add the marked powers and the sum is exactly 20. Padded to a byte, it reads 00010100.
How many bits does 20 need?
10100 is 5 bits long, so 20 needs 5 bits at minimum. The count grows by one whenever a number reaches the next power of two. Inside a byte, the leftover positions are filled with zeros, which is why 20 appears as 00010100 in most computer contexts.
What is 20 in hex?
20 written in base 16 is 14. Programmers lean on hex because each digit maps to exactly four bits, turning long binary strings into short codes. For completeness, 20 in octal is 24 and in binary it is 10100. They all name the same quantity.