Binary to Decimal for CCNA: The Fast Method
One chart — 128-64-32-16-8-4-2-1 — converts any IP octet between binary and decimal in seconds. This is the 5-minute method every subnetting question depends on: worked conversions both directions, a drill table to practise with, and the exam shortcuts that turn slow conversions into reflex.
Try the converter
Check every conversion below instantly with our binary–decimal converter — type bits, get the decimal, and see the place-value breakdown. Use it while you practise the method below until the chart lives in your head.
The 128 chart: the whole method on one line
An IP octet is 8 bits, and each bit is worth double the one to its right. Memorise one row and you can convert any octet, in either direction, in seconds:
| Place value | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| Example bits | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
Binary → decimal: add the place values under every 1. Zeros contribute nothing. 11000000 = 128 + 64 = 192.
Decimal → binary: walk the chart left to right. If a value fits, write a 1 and subtract it; otherwise write 0. For 240: 128 fits (1, remainder 112), 64 fits (1, remainder 48), 32 fits (1, remainder 16), 16 fits (1, remainder 0), the rest are 0 → 11110000. Always write all 8 bits — leading zeros matter (00001111, not 1111).
Learn the row by halving: 128, half is 64, half is 32… Most people can recite it cold after about five minutes of repetition. Say it out loud three times, then drill below.
Worked conversions: binary to decimal
The exam loves mask and address octets. Work through these — cover the answer, compute, then check.
1. Convert 11100000 to decimal.
Ones sit under 128, 64 and 32. 128 + 64 + 32 = 224. You'll see this everywhere: it's the last octet of a /27 mask (255.255.255.224).
2. Convert 10101000 to decimal.
Ones under 128, 32 and 8. 128 + 32 + 8 = 168. This is the second octet of every 192.168.x.x address.
3. Convert 00001010 to decimal.
Ones under 8 and 2. 8 + 2 = 10. Leading zeros don't change the value — they just keep the octet at 8 bits.
Worked conversions: decimal to binary
4. Convert 240 to binary.
128 fits (1, rem 112). 64 fits (1, rem 48). 32 fits (1, rem 16). 16 fits (1, rem 0). Nothing else fits → 11110000. A /28 mask's interesting octet.
5. Convert 15 to binary.
128, 64, 32, 16 don't fit (0s). 8 fits (1, rem 7). 4 fits (1, rem 3). 2 fits (1, rem 1). 1 fits (1, rem 0) → 00001111. Small numbers need the leading zeros — without them you lose the octet.
The exam shortcut: memorise the mask octets
Subnet masks only ever use a handful of octet values — each is just the chart filled from the left. Memorise this row and most mask questions answer themselves:
| Decimal | Binary | Memory trick |
|---|---|---|
128 | 10000000 | Just the 128. |
192 | 11000000 | 128 + 64. |
224 | 11100000 | 128 + 64 + 32. |
240 | 11110000 | Four ones, half the octet. |
248 | 11111000 | 256 − 8. |
252 | 11111100 | 256 − 4. |
254 | 11111110 | 256 − 2. |
Notice the pattern: each step adds the next place value (or subtracts a smaller block from 256). Once you see 11111000 and instantly read 248, wildcard-mask questions (0.0.0.7 for 255.255.255.248) become trivial inversions.
Why binary fluency decides subnetting speed
Subnetting is binary arithmetic. Finding a network address means ANDing the IP octet against the mask octet bit by bit; the broadcast address means setting host bits to all ones; wildcard masks are binary inversions of subnet masks. Every one of those steps runs through the 128 chart.
- ANDing:
192.168.1.77 AND 255.255.255.192in the interesting octet is01001101 AND 11000000=01000000= 64 → network 192.168.1.64. Only the first two bits survive because only the mask has ones there. - Wildcard masks: 255.255.255.224 inverts to 0.0.0.31 — you can only be sure of that if 224 =
11100000is instant for you. - Exam timing: the CCNA gives you roughly a minute per question. If converting an octet costs 30 seconds, a single subnetting question eats your whole budget. Fast conversion turns timing pressure into headroom.
Drill the chart daily until you don't think in steps anymore — just see 11100000 and know it's 224. Then take that speed to the subnetting drill and the full CCNA subnetting cheat sheet.
Drill table: 12 conversions to practise
Cover the right column, convert, then check. Aim for under 10 seconds each.
| Binary | Decimal | Binary | Decimal |
|---|---|---|---|
| 10000000 | 128 | 11000000 | 192 |
| 11100000 | 224 | 11110000 | 240 |
| 11111000 | 248 | 11111100 | 252 |
| 10101000 | 168 | 10110000 | 176 |
| 00001111 | 15 | 00001010 | 10 |
| 11111111 | 255 | 00000000 | 0 |
Quick-fire practice: click to reveal
Five exam-style conversions. Convert from memory first, then reveal.
Q1. Convert 11000000 to decimal.
192. Ones under 128 and 64: 128 + 64 = 192. The second octet of a /26 mask (255.255.255.192).
Q2. Convert 240 to binary.
11110000. 128 + 64 + 32 + 16 = 240 — the four leftmost bits, rest zeros. The /28 mask octet.
Q3. Convert 10101100 to decimal.
172. Ones under 128, 32, 8 and 4: 128 + 32 + 8 + 4 = 172. The first octet of the 172.16.x.x private range.
Q4. Convert 26 to binary.
00011010. 16 fits (rem 10), 8 fits (rem 2), 2 fits (rem 0): ones under 16, 8 and 2. Pad with leading zeros to keep 8 bits.
Q5. What is the binary for the wildcard mask octet of 255.255.255.240?
00001111 (15). Wildcard = 255 − 240 = 15 per octet, and 240 = 11110000 inverts bit-for-bit to 00001111. Knowing both directions of the chart makes this instant.
Binary conversion on the CCNA 200-301
Binary conversion rarely appears as a standalone question — it hides inside subnetting, wildcard mask, and ANDing questions across Network Fundamentals. The examiners assume you can flip between binary and decimal without thinking, so the skill is tested through everything else. Pair this page with the binary–decimal converter for checking your drills, the subnet calculator for verifying full breakdowns, and the subnetting drill to put the speed under exam pressure.
For the complete topic, see our CCNA subnetting cheat sheet.
More free tools: Subnetting drill Subnet calculator Binary–decimal converter Flashcards
Ready to test yourself?
Binary fluency is one building block of the CCNA 200-301. Take the free 25-question mock test — no sign-up — and find out where you stand. One subscription (£5/month or £39/year) unlocks all 370 exam-style questions, 20 in-browser labs and 300 flashcards across all 10 certifications.
Start the free mock test →