📑 Topics on this page (Jump to Topic):
📌 1. Number Systems
| System | Base | Digits |
|---|---|---|
| Binary | 2 | 0, 1 |
| Octal | 8 | 0–7 |
| Decimal | 10 | 0–9 |
| Hexadecimal | 16 | 0–9, A(10)–F(15) |
Conversion methods
- Decimal → binary: divide by 2 repeatedly and read remainders from bottom to top. (25)10 = (11001)2.
- Binary → decimal: multiply by place values 2⁰, 2¹, 2²… and add. (1011)2 = 8+0+2+1 = 11.
- Binary → octal: groups of 3 bits from the right; binary → hex: groups of 4 bits. (101101)2 = (55)8 = (2D)16.
- (17)8 = 1×8+7 = 15; (1F)16 = 1×16+15 = 31.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 12 | 1100 | 14 | C |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
⚠️ Exam Traps:
- Octal has no digit 8 or 9; (19)8 is invalid.
- In hex F = 15 and A = 10.
📌 2. Binary Arithmetic, Complements & Codes
| Addition | Result |
|---|---|
| 0+0 | 0 |
| 0+1 | 1 |
| 1+1 | 0, carry 1 (=10) |
| 1+1+1 | 1, carry 1 (=11) |
- Example: 1011 + 0110 = 10001 (11 + 6 = 17).
- 1's complement = invert every bit (0↔1): 1010 → 0101.
- 2's complement = 1's complement + 1: 0101 → 1010 + 1 = 1011. Computers represent negative numbers this way.
| Code | Fact |
|---|---|
| ASCII | American Standard Code for Information Interchange — 7-bit (128 characters); extended 8-bit (256). A = 65, a = 97, 0 = 48 |
| Unicode | All the world's scripts (including Hindi); UTF-8, UTF-16 |
| EBCDIC | 8-bit, IBM mainframes |
| BCD | Each decimal digit in 4 bits |
⚠️ Exam Traps:
- ASCII is 7-bit; Hindi/Devanagari needs Unicode.
📌 3. Logic Gates & Boolean Algebra
| Gate | Output is 1 when | Expression |
|---|---|---|
| AND | All inputs are 1 | A·B |
| OR | Any input is 1 | A+B |
| NOT | Input is 0 | A′ |
| NAND | Not all inputs are 1 (inverse of AND) | (A·B)′ |
| NOR | All inputs are 0 | (A+B)′ |
| XOR | Inputs are different | A⊕B |
| XNOR | Inputs are the same | (A⊕B)′ |
- NAND and NOR are universal gates — any gate can be built from them.
- De Morgan: (A·B)′ = A′+B′ and (A+B)′ = A′·B′.
- Boolean algebra — George Boole. A+A = A, A·A = A, A+1 = 1, A·0 = 0.
⚠️ Exam Traps:
- Universal gates = NAND, NOR (not XOR).
- In Boolean algebra 1 + 1 = 1 (OR); in binary addition 1 + 1 = 10.
📌 4. Practice MCQs
📝 Practice MCQs (prepared by SF Prep — not PYQs)
Q1. The base of the binary number system is: Practice
Correct answer: (B)
Binary uses only 0 and 1.
Binary uses only 0 and 1.
Q2. How many digits/symbols are there in the hexadecimal system? Practice
Correct answer: (C)
0–9 and A–F = 16.
0–9 and A–F = 16.
Q3. The binary form of (25)10 is: Practice
Correct answer: (D)
16+8+1 = 25 → 11001.
16+8+1 = 25 → 11001.
Q4. The decimal value of (1011)2 is: Practice
Correct answer: (A)
8+0+2+1 = 11.
8+0+2+1 = 11.
Q5. The decimal value of (1F)16 is: Practice
Correct answer: (B)
1×16 + 15 = 31.
1×16 + 15 = 31.
Q6. The decimal value of (17)8 is: Practice
Correct answer: (C)
1×8 + 7 = 15.
1×8 + 7 = 15.
Q7. The hexadecimal form of (101101)2 is: Practice
Correct answer: (D)
4-bit groups: 0010 1101 = 2 D.
4-bit groups: 0010 1101 = 2 D.
Q8. The octal form of (101101)2 is: Practice
Correct answer: (A)
3-bit groups: 101 101 = 5 5.
3-bit groups: 101 101 = 5 5.
Q9. Which of these is not a valid octal number? Practice
Correct answer: (B)
Octal uses digits 0–7 only; 9 is not allowed.
Octal uses digits 0–7 only; 9 is not allowed.
Q10. Binary addition 1011 + 0110 = ? Practice
Correct answer: (C)
11 + 6 = 17 = 10001.
11 + 6 = 17 = 10001.
Q11. The 2's complement of 0101 is: Practice
Correct answer: (D)
1's complement = 1010; +1 = 1011.
1's complement = 1010; +1 = 1011.
Q12. The 1's complement of 1010 is: Practice
Correct answer: (A)
Invert every bit.
Invert every bit.
Q13. Standard ASCII is a code of how many bits? Practice
Correct answer: (B)
7-bit = 128 characters; extended ASCII = 8-bit.
7-bit = 128 characters; extended ASCII = 8-bit.
Q14. In ASCII, the decimal value of capital "A" is: Practice
Correct answer: (C)
A = 65, a = 97, digit 0 = 48.
A = 65, a = 97, digit 0 = 48.
Q15. The coding system that represents all scripts of the world, including Hindi, is: Practice
Correct answer: (D)
Unicode (UTF-8/16) assigns codes to characters of all languages.
Unicode (UTF-8/16) assigns codes to characters of all languages.
Q16. Which gates are called "universal gates"? Practice
Correct answer: (A)
Any logic circuit can be built using only NAND or only NOR.
Any logic circuit can be built using only NAND or only NOR.
Q17. Which gate gives output 1 only when the two inputs are different? Practice
Correct answer: (B)
XOR = exclusive OR.
XOR = exclusive OR.
Q18. When is the output of an AND gate 1? Practice
Correct answer: (C)
AND = multiplication; any 0 makes the output 0.
AND = multiplication; any 0 makes the output 0.
Q19. By De Morgan's law, (A·B)′ = ? Practice
Correct answer: (D)
(A·B)′ = A′ + B′ and (A+B)′ = A′·B′.
(A·B)′ = A′ + B′ and (A+B)′ = A′·B′.
Q20. Who developed Boolean algebra? Practice
Correct answer: (A)
George Boole (19th century). Claude Shannon later applied it to circuits.
George Boole (19th century). Claude Shannon later applied it to circuits.