Hardware, Memory & Number Systems
🔒 Log in to trackNumber systems: binary, octal, decimal, hexadecimal
🔒 Log in to track| System | Base | Digits | Example |
|---|---|---|---|
| Binary | 2 | 0,1 | 1101 |
| Octal | 8 | 0-7 | 65 |
| Decimal | 10 | 0-9 | 91 |
| Hexadecimal | 16 | 0-9, A-F (A=10 ... F=15) | 2F |
Any base -> decimal: multiply each digit by (base)^position, counting positions from 0 at the right. Example: 1011011 = 1x2^6 + 0x2^5 + 1x2^4 + 1x2^3 + 0x2^2 + 1x2^1 + 1x2^0 = 64+16+8+2+1 = 91.
Decimal -> base b: repeatedly divide by b and read remainders bottom to top. 58 -> binary: 58/2=29 r0, 29/2=14 r1, 14/2=7 r0, 7/2=3 r1, 3/2=1 r1, 1/2=0 r1 -> 111010.
Binary -> octal: group bits in 3s from the right (each octal digit = 3 bits). 11010111 -> 011 010 111 -> 327.
Binary -> hexadecimal: group bits in 4s from the right. 10101111 -> 1010 1111 -> AF.
Hex/octal -> binary: expand each digit into 4/3 bits. Hex -> decimal: digits x 16^position (2F = 2x16 + 15 = 47).
ASCII anchors: 'A'=65, 'B'=66, ..., 'Z'=90; 'a'=97; '0'=48. Largest 8-bit binary value 11111111 = 255.
The four systems
| System | Base | Digits used | Example |
|---|---|---|---|
| Binary | 2 | 0, 1 | 1101 |
| Octal | 8 | 0–7 | 65 |
| Decimal | 10 | 0–9 | 91 |
| Hexadecimal | 16 | 0–9, A–F (A=10 … F=15) | 2F |
A digit's value = digit × (base ^ position), counting positions from 0 at the right.
Any base → decimal (multiply and add)
(1101)₂ = 1×2³ + 1×2² + 0×2¹ + 1×2⁰ = 8 + 4 + 0 + 1 = 13. (2F)₁₆ = 2×16 + 15 = 47 (F = 15). (67)₈ = 6×8 + 7 = 55.
Decimal → any base (divide and read upward)
Divide repeatedly by the base and read the remainders bottom to top: 45 ÷ 2 = 22 r 1 → 22 ÷ 2 = 11 r 0 → 11 ÷ 2 = 5 r 1 → 5 ÷ 2 = 2 r 1 → 2 ÷ 2 = 1 r 0 → 1 ÷ 2 = 0 r 1; reading up: (101101)₂ = 45. ✔ (32+8+4+1 = 45)
The grouping shortcuts (seconds-saving)
- 1 octal digit = 3 bits, 1 hex digit = 4 bits; make groups from the right, padding the left with zeros.
- (1101011)₂ → 001 101 011 → 153₈; (11011011)₂ → 1101 1011 → DB₁₆.
- Hex letters: A=10, B=11, C=12, D=13, E=14, F=15; FF = 255 = the largest 8-bit value.
Ranges and validity
- n bits hold 2ⁿ different values, from 0 to 2ⁿ − 1: 8 bits → 256 values (0–255).
- Octal digits stop at 7 — any number containing 8 or 9 cannot be octal.
- Hex digits stop at F: 'G' or '2H' cannot be hexadecimal.
Exam workflow
- Read the stem: which base to which base?
- Conversions through binary are fastest for octal/hex (grouping), direct division/multiplication for decimal.
- Always check: does each digit exist in the source base? Is the remainder order bottom-to-top?
More worked pairs you can reuse
- (1010)₂ = 8 + 2 = 10; (1111)₂ = 8+4+2+1 = 15; (10000)₂ = 16.
- (255)₁₀ = FF₁₆ (15×16 + 15); (128)₁₀ = (10000000)₂.
- (777)₈ = 7×64 + 7×8 + 7 = 511 — the largest 3-digit octal, exactly like FF caps hex.
- (100)₈ = 64, (20)₁₆ = 32, (11)₂ = 3 — small anchors to sanity-check options.
Powers of 2 worth memorising
2⁰=1, 2¹=2, 2²=4, 2³=8, 2⁴=16, 2⁵=32, 2⁶=64, 2⁷=128, 2⁸=256, 2⁹=512, 2¹⁰=1024. Ten lines that answer half the number-system paper: binary→decimal becomes addition, ranges become 2ⁿ, and KB/MB conversions reuse the same ladder.
Two elimination shortcuts
- Digit validity: an option with 8 or 9 is never octal; one with G or beyond is never hexadecimal — strike it out before computing.
- Parity check: a binary number ending in 0 is even, ending in 1 is odd — if the decimal in the stem is even, the correct binary must end in 0.
Question types you will see
Each type: how to recognise it, the method step by step, and one question to try.
Any base → decimal conversion
'The decimal value of (1101)₂ is', '(2F)₁₆ in decimal is', '(67)₈ equals' — a number with a base subscript and four plain decimals.
Multiply each digit by base^position, positions counted from 0 at the right.
Hex: convert letters first (A=10 … F=15) — 2F = 2×16 + 15 = 47.
Sanity-check with the binary powers 1, 2, 4, 8, 16, 32, 64, 128.
The decimal value of the binary number 110101 is —
Show solutionHide solution
1×32 + 1×16 + 0×8 + 1×4 + 0×2 + 1×1 = 53. Pick the positions where 1s sit (32, 16, 4, 1) and add.
Decimal → any base conversion
'The binary equivalent of 45 is', '100 in hexadecimal is', '58 in octal is' — a plain decimal and four base-tagged options.
Divide repeatedly by the target base, writing each remainder.
Read the remainders bottom to top — the top-to-bottom reading is the standard trap.
Verify by converting back: expand your answer's digits by powers of the base; it must return the original number.
The binary equivalent of decimal 45 is —
Show solutionHide solution
Repeated division by 2 gives remainders 1, 0, 1, 1, 0, 1 read upward → 101101. Check: 32+8+4+1 = 45. ✔
Binary ↔ octal / hex by grouping
'1101011 in octal', '11011011 in hexadecimal', 'convert binary using grouping' — a long binary string and base-8 or base-16 options.
Octal: group the bits in 3s from the right; hex: group in 4s from the right; pad the left with zeros.
Convert each group separately: 001 101 011 → 1 5 3 → 153₈.
Cross-check the hex letters: 10–15 map to A–F.
The binary number 1101011 in octal is —
Show solutionHide solution
Group in 3s from the right: 001 101 011 → 1, 5, 3 → 153₈. (Each octal digit is exactly 3 bits.)
n-bit range and digit validity
'How many values can 8 bits represent?', 'largest number in n bits', 'which of these cannot be an octal/hexadecimal number'.
n bits → 2ⁿ values, spanning 0 to 2ⁿ − 1: 8 bits = 256 values, largest 255.
Digit check: octal allows only 0–7; hexadecimal only 0–9 and A–F.
An option containing 8 or 9 cannot be octal; one containing G or H cannot be hex.
How many different values can be represented by 8 bits?
Show solutionHide solution
2⁸ = 256 different values (0 to 255). The largest value is one less: 2⁸ − 1 = 255.
Formula sheet
digit d_i at position i (from 0, rightmost), base b
read remainders bottom to top
group binary from the RIGHT; pad with leading zeros
Shortcuts that save time
Octal = 3-bit groups, Hex = 4-bit groups, always made from the right (pad the left with zeros). Binary -> octal/hex needs no division at all.
11010111 in octal?
Show solutionHide solution
011 010 111 -> 3 2 7 = 327.
A=10, B=11, C=12, D=13, E=14, F=15. So 2F = 2x16+15 = 47; FF = 15x16+15 = 255 = 11111111. 'F fills: F=15, FF=255'.
Decimal value of C8?
Show solutionHide solution
12x16 + 8 = 200.
Memorise 1,2,4,8,16,32,64,128 - then any binary->decimal is just picking positions: 11010111 = 128+64+16+8+4+2+1 = 215. No working needed beyond addition.
111010 in decimal?
Show solutionHide solution
32+16+8+2 = 58.
Mistakes to avoid
Where most students lose marks on this subtopic.
Grouping binary digits from the LEFT for octal/hex - groups always start at the right end.
Treating hex A-F as invalid digits or computing 2F as 2x10+15.
Reading division remainders top-to-bottom - the answer reads bottom-to-top.
Forgetting 0-7 are legal octal digits; an option containing 8 or 9 cannot be octal.
Quick revision
Read this the night before the exam.
Bases: 2 (0,1), 8 (0–7), 10 (0–9), 16 (0–9, A–F).
Base→decimal: digit × base^position, right to left. Decimal→base: divide, read remainders upward.
Octal = 3-bit groups, hex = 4-bit groups, grouped from the right.
F = 15; FF = 255; 8 bits = 256 values (0–255).
Octal has no 8 or 9; hex has nothing after F.
Practice: 18 questions
Sets of 10, mixed across the question types above. Every answer has a step-by-step explanation.
Topic test · 10 questions
Suggested time 6 min · wrong answers go to your mistake notebook automatically.