Computer Science
Superfast Revision Guide
Definitions · Memory Tricks · Mnemonics · Key Tables
📚 Quick Navigation
Computer Systems & Organisation
🖥️ Core Concepts
Data → Process → Information = DPI (like screen DPI!)
⚙️ CPU Parts
PC, IR, MAR, MDR, Accumulator
📌 Key Registers
💾 Memory Types
RAM = Temp storage (like your desk) | ROM = Permanent (like a printed book)
⚡ Cache Memory
🔢 Number Systems
| System | Base | Digits |
|---|---|---|
| Binary | 2 | 0, 1 |
| Octal | 8 | 0–7 |
| Decimal | 10 | 0–9 |
| Hexadecimal | 16 | 0–9, A–F |
Binary → Hex: Group 4 bits from right (1111=F, 1010=A)
Binary → Octal: Group 3 bits from right (101=5, 110=6)
Decimal → Binary: Divide by 2, read remainders bottom-up
📏 Memory Units (Must Know!)
| Unit | Symbol | Size | Power of 2 |
|---|---|---|---|
| Bit | b | 0 or 1 | — |
| Nibble | — | 4 bits | 2⁴ = 16 values |
| Byte | B | 8 bits | 2⁸ = 256 values |
| Kilobyte | KB | 1,024 Bytes | 2¹⁰ |
| Megabyte | MB | 1,024 KB | 2²⁰ |
| Gigabyte | GB | 1,024 MB | 2³⁰ |
| Terabyte | TB | 1,024 GB | 2⁴⁰ |
Bite Nibble Byte, Kids Might Get Tired Playing
⚡ Logic Gates — Quick Reference
| Gate | Output Rule |
|---|---|
| NOT | Flips 0→1 or 1→0 |
| AND | Output 1 only if ALL inputs = 1 |
| OR | Output 1 if ANY input = 1 |
| NAND | Opposite of AND (universal gate) |
| NOR | Opposite of OR (universal gate) |
| XOR | Output 1 if inputs are DIFFERENT |
| XNOR | Output 1 if inputs are SAME |
NAND & NOR = "Universal Gates" — can build ANY other gate from them!
XOR Trick: X = eXclusive OR = "one or the other but NOT both"
📋 De Morgan's Laws
A·B̄ = Ā + B̄
Second Law: NOT(A OR B) = NOT A AND NOT B
A+B̄ = Ā · B̄
De Morgan = "Break the bar, change the operator"
Break the NOT bar → the AND flips to OR (or vice versa)
📐 Boolean Laws
🖥️ Operating System
OS Functions
OS Types
FCFS = First Come First Served | SJF = Shortest Job First
RISC — Reduced Instruction Set
- Few, SIMPLE instructions
- Fixed-length instructions
- 1 clock cycle per instruction
- Large number of registers
- Load/Store architecture
- Examples: ARM, MIPS, RISC-V
CISC — Complex Instruction Set
- Many, COMPLEX instructions
- Variable-length instructions
- Multiple clock cycles
- Fewer registers
- Many memory-access instructions
- Examples: Intel x86, x86-64
RISC = Simple & Fast (like a sprinter) | CISC = Complex & Powerful (like a weightlifter)
Mobile phones use RISC (ARM) — that's why they're power-efficient!
Application Software
📝 Word Processor
MS Word · LibreOffice Writer · Google Docs
📊 Spreadsheet
$A$1 = dollar signs = the cell address is "stuck/fixed" when you copy
=IF(A1>50,"Pass","Fail") ← logic
=VLOOKUP(val,range,col,0)
Compiler
- Translates ENTIRE program at once
- Creates executable (.exe) file
- FASTER execution
- Shows ALL errors at once
- Examples: C, C++
Interpreter
- Translates LINE BY LINE
- No separate output file
- SLOWER execution
- Stops at FIRST error
- Examples: Python, JavaScript
Compiler = Book translator (translates whole book first, then you read) | Interpreter = Live translator (translates each sentence as you speak)
Python Programming
🐍 Python Basics
Python = Pretty, Yet Tremendously Helpful, Open, Nested language 😄
📦 Data Types
| Type | Example | Key Trait |
|---|---|---|
| int | 42, -7 | Whole numbers |
| float | 3.14 | Decimal numbers |
| str | 'Hello' | Text (immutable) |
| bool | True/False | Logic values |
| list | [1,2,3] | Ordered, mutable |
| tuple | (1,2,3) | Ordered, immutable |
| dict | {'a':1} | Key-value pairs |
| set | {1,2,3} | Unordered, unique |
Can change: list, dict, set | Cannot change: str, tuple, int, float
🔢 Operators Cheatsheet
5 + 3 = 8 5 - 3 = 2
5 * 3 = 15 5 / 2 = 2.5 (float!)
5 // 2 = 2 5 % 2 = 1 2**3 = 8
# Comparison → returns True/False
== != > < >= <=
# Logical
and or not
// = floor division (drops decimal) | / = always gives float
5//2 = 2 5/2 = 2.5
🔁 Loops & Control
for i in range(1, 6):
print(i) # prints 1 to 5
# while loop
while x > 0:
x -= 1
break ← exit loop now
continue ← skip this iteration
pass ← placeholder (do nothing)
range(5) = 0,1,2,3,4 | range(1,6) = 1,2,3,4,5 | range(0,10,2) = 0,2,4,6,8
📋 List Methods
lst.append(9) # add to end
lst.insert(0, 7) # insert at index 0
lst.remove(1) # remove first '1'
lst.pop(2) # remove at index 2
lst.sort() # sort in place
lst.reverse() # reverse in place
len(lst) # length
lst[1:4] = elements at index 1,2,3 (stop not included!)
lst[-1] = last element
⚠️ Exception Handling
x = 10 / 0
except ZeroDivisionError:
print("Can't divide by zero!")
else:
print("Success!")
finally:
print("Always runs")
| Error | Cause |
|---|---|
| ZeroDivisionError | Division by zero |
| ValueError | int('abc') |
| IndexError | List index out of range |
| KeyError | Dict key not found |
| FileNotFoundError | File doesn't exist |
🐛 Types of Errors
📐 Operator Precedence (High → Low)
Data Structures
📚 Stack — LIFO
Undo button · Browser back button · Function calls · Expression evaluation
🚶 Queue — FIFO
Print spooling · CPU scheduling · Keyboard buffer · BFS algorithm
Stack = Plates on a table (top only) | Queue = People in a line (join back, leave front)
🔗 Linked List
Array: Fixed size, contiguous memory | Linked List: Dynamic size, scattered memory connected by pointers
Computer Networks
🌐 Network Types
| Type | Range | Example |
|---|---|---|
| PAN | Few meters | Bluetooth |
| LAN | Building/Campus | Office network |
| MAN | City | Cable TV network |
| WAN | Country/World | The Internet |
PAN → LAN → MAN → WAN (size increases!)
🔧 Network Devices
Hub = Shouts (everyone hears) | Switch = Whispers (only target hears) | Router = GPS (finds the path)
📡 OSI Model — 7 Layers
Application · Presentation · Session · Transport · Network · Data Link · Physical
📋 Key Networking Protocols
| Protocol | Full Form | Purpose |
|---|---|---|
| HTTP | HyperText Transfer Protocol | Web page transfer |
| HTTPS | HTTP Secure | Encrypted web (uses SSL/TLS) |
| FTP | File Transfer Protocol | Transfer files between computers |
| SMTP | Simple Mail Transfer Protocol | SEND email |
| POP3 | Post Office Protocol 3 | RECEIVE email (downloads to device) |
| IMAP | Internet Message Access Protocol | RECEIVE email (stays on server) |
| DNS | Domain Name System | Domain name → IP address |
| DHCP | Dynamic Host Config Protocol | Auto-assign IP addresses |
| TCP | Transmission Control Protocol | Reliable, ordered delivery |
| UDP | User Datagram Protocol | Fast but unreliable (video calls, gaming) |
POP3 = Downloads email to your device (like picking up your mail) | IMAP = Keeps on server, syncs everywhere (like reading mail online)
Database Management & SQL
🗃️ Key Terms
Cardinality = Cars in a parking lot (rows, can change) | Degree = Degrees/angles (columns, structure)
📊 SQL Command Types
| Category | Commands | Purpose |
|---|---|---|
| DDL | CREATE, ALTER, DROP | Define structure |
| DML | SELECT, INSERT, UPDATE, DELETE | Work with data |
| DCL | GRANT, REVOKE | Permissions |
| TCL | COMMIT, ROLLBACK | Transactions |
💻 SQL Commands — Quick Reference
CREATE TABLE
RollNo INT PRIMARY KEY,
Name VARCHAR(50),
Marks INT
);
SELECT with conditions
FROM Students
WHERE Marks > 80
ORDER BY Marks DESC;
Aggregate Functions
MAX(Marks), MIN(Marks)
FROM Students
GROUP BY City
HAVING COUNT(*) > 2;
LIKE & BETWEEN
WHERE Name LIKE 'R%'
-- _ = any ONE character
WHERE Marks BETWEEN 60 AND 90
WHERE filters individual ROWS (before grouping) | HAVING filters GROUPS (after GROUP BY) — "Having filters the groups you've grouped!"
🔗 SQL Joins
Cybersecurity
🦠 Malware Types
Virus = Needs a HOST to spread (like a biological virus) | Worm = Spreads ALONE through networks (like a worm in soil!)
⚔️ Cyber Attacks
🔐 Cryptography
Symmetric = Same key (like one key opens both lock & unlock) | Asymmetric = Public key is a padlock you can share; Private key opens it
🛡️ Security Measures
Emerging Technologies
🤖 AI & Machine Learning
Supervised = Teacher gives answers | Unsupervised = Self-study | Reinforcement = Learn from mistakes (like a game)
☁️ Cloud Computing
| Model | What You Get | Example |
|---|---|---|
| SaaS | Ready software via browser | Gmail, Google Docs |
| PaaS | Dev tools & environment | Heroku, App Engine |
| IaaS | Virtual machines, storage | AWS EC2, Azure VMs |
SaaS = Someone else handles everything (just use) | PaaS = Platform provided, you build app | IaaS = Raw infrastructure, you manage everything
📡 IoT & Blockchain
Volume · Velocity · Veracity · Value · Variety
🥽 Immersive Technologies
AR = Adds to reality (you still see the real world + digital overlay) | VR = Replaces reality (you're in a completely virtual world)
Society, Law & Ethics
👣 Digital Footprint
⚖️ IT Act 2000 (India)
| Section | Deals With |
|---|---|
| 43 | Unauthorised access (civil penalty) |
| 66 | Hacking — criminal penalty |
| 66C | Identity theft — up to 3 years jail |
| 66D | Cheating by impersonation |
| 66E | Privacy violation — private images |
| 67 | Publishing obscene material |
©️ Intellectual Property
GPL = "Virus-like licence" — any modification MUST also be open source (spreads openness!)
Quick Reference & Exam Tips
📖 Important Abbreviations
🎯 Exam Priority — What to Focus On
| Topic | Expected Marks | Priority |
|---|---|---|
| Python Programming (all concepts) | 15–20 marks | ★★★ VERY HIGH |
| SQL Queries & Database | 8–10 marks | ★★★ VERY HIGH |
| Computer Networks (OSI, protocols) | 8–10 marks | ★★ HIGH |
| Data Structures (Stack, Queue, Linked List) | 5–8 marks | ★★ HIGH |
| Number Systems & Boolean Logic | 5–8 marks | ★★ HIGH |
| Cybersecurity (threats, encryption) | 5 marks | ★ MEDIUM |
| Emerging Technologies (AI, IoT, Cloud) | 4–5 marks | ★ MEDIUM |
| CPU, Memory, OS concepts | 4–5 marks | ★ MEDIUM |
🧠 Master Mnemonics Summary
Application · Presentation · Session · Transport · Network · Data Link · Physical
Kilo · Mega · Giga · Tera · Peta
PC · IR · MAR · MDR · Accumulator
PAN · LAN · MAN · WAN
Volume · Velocity · Veracity · Value · Variety
DDL=Structure · DML=Data · DCL=Access · TCL=Transactions
Stack LIFO (top only) · Queue FIFO (join back, leave front)
All are faster than RAM!