Number Systems, Complements and Codes
1. Why does a computer understand only 0 and 1?
Inside a computer are millions of tiny switches. Each switch has only two states: off = 0, on = 1. So the computer keeps everything (numbers, letters, photos, instructions, memory addresses) as 0s and 1s. This is binary (base 2), and one 0 or 1 is a bit.
Base = how many different digits are used. Every day we use 10 digits (0–9), so our system is base 10 (decimal).
| System | Base | Digits |
|---|---|---|
| Binary | 2 | 0 1 |
| Octal | 8 | 0 – 7 |
| Decimal | 10 | 0 – 9 |
| Hexadecimal | 16 | 0 – 9, A – F |
- 2. Place value: like rupee notes
- 3. Decimal → binary: the divide-by-2 ladder
- 4. Octal and hex: bundles of bits
- 5. Complements: how negative numbers are written
- 6. Codes: other ways to write a number
- 7. Codes for letters: ASCII, EBCDIC, Unicode
- ⚠️ Where students go wrong most
The full note, 5 try-it tools and all 90 MCQs of this chapter come with the full subject: ₹99
or ⭐ all 14 subjects + every PYQ for ₹599 a year (Full GS Pass)
How the exam asked it
- Decimal of (11001)₂? 25 · (1010)₂? 10 · 101? 5 (Allahabad HC RO/ARO)
- Convert 35 to binary: 100011 · 0.8125 to binary: 0.1101 (Allahabad HC)
- Decimal of (456)₈: 302 · 759 in octal: 1367 (Allahabad HC)
- Fewest bits for one hex digit? 4 · MSD stands for? Most Significant Digit (Allahabad HC)
- Bits in each ASCII character? 8 (SSC CGL 2024) · In EBCDIC? 8 · Full form of BCD? Binary Coded Decimal
Check yourself
1. What is (25)₁₀ in binary?
Answer: B. 11001 · The divide-by-2 ladder for 25 gives remainders 1, 0, 0, 1, 1. Read bottom to top: 11001 (16 + 8 + 1 = 25). 10011 is the mistake of reading top to bottom.
2. What is the 2's complement of 1010?
Answer: B. 0110 · Flip: 0101, then +1: 0110. Shortcut: from the right keep “10” up to the first 1, flip the rest.
Asked in the exam (PYQ)
What is the size of each ASCII character in bits?
Answer: B. 8 bits · Standard ASCII is a 7-bit code (128 characters), but each character is stored in one byte, which is 8 bits. Extended ASCII uses all 8 bits (256 characters), so exams take 8 bits as the answer. 16 bits is the size of a UTF-16 (Unicode) code unit.
More PYQs from this chapter
- A parity bit is _______Allahabad High Court RO/ARO · 7 January 2022 · RO
- All the characters that a device can use are called :Allahabad High Court RO/ARO · 7 January 2022 · RO
- A hexadecimal number (digit) is represented byAllahabad High Court RO/ARO · 20 December 2021 · ARO
- Which decimal number does (11001)₂ represent?Allahabad High Court RO/ARO · 19 December 2021 · Shift 1
- What is the value of the binary number 101?Allahabad High Court RO/ARO · 19 December 2021 · Shift 1
- In EBCDIC, characters are represented by ______ bits.Allahabad High Court RO/ARO · 19 December 2021 · Shift 1
All 38 PYQs of this chapter are on the mind map and with the PYQ Pass.
