Computer Science TGT/PGT — Superfast Revision Guide
ExamPill · EMRS / NVS · TGT / PGT

Computer Science
Superfast Revision Guide

Definitions · Memory Tricks · Mnemonics · Key Tables

14Units
200+Keywords
50+Memory Tricks
1

Computer Systems & Organisation

🖥️ Core Concepts

Computer
Takes input → processes it → gives output
Hardware
Physical parts you can touch (monitor, keyboard)
Software
Instructions that tell hardware what to do
Data
Raw facts — no meaning alone (e.g., 42, "A")
Information
Processed data that has meaning and is useful
💡 Trick

Data → Process → Information = DPI (like screen DPI!)

⚙️ CPU Parts

ALU
Does maths (+, -, ×, ÷) and logic (AND, OR, NOT)
CU (Control Unit)
The manager — fetches, decodes, executes instructions
Registers
Tiny super-fast memory INSIDE the CPU
Clock Speed
How many instructions per second (GHz). Higher = faster
🧠 Mnemonic — CPU Registers

PC, IR, MAR, MDR, Accumulator

"Please Immediately Make My Assignment"

📌 Key Registers

PC (Program Counter)
Points to NEXT instruction address
IR (Instruction Register)
Holds CURRENT instruction being executed
MAR
Memory Address Register — which address to access
MDR
Memory Data Register — holds data going to/from memory
Accumulator
Stores results of ALU operations

💾 Memory Types

RAM
Volatile (data lost on power off). Stores running programs
ROM
Non-volatile (permanent). Stores BIOS/firmware
DRAM
Needs constant refresh. Used as main RAM. Cheaper
SRAM
No refresh needed. Faster. Used in cache
EPROM
Erase with UV light and reprogram
EEPROM
Erase/reprogram electrically (pen drives use this concept)
💡 Trick

RAM = Temp storage (like your desk) | ROM = Permanent (like a printed book)

Cache Memory

Cache
Super-fast memory between CPU and RAM. Stores frequently used data
L1 Cache
Smallest + fastest. Directly on CPU chip
L2 Cache
Larger, slightly slower. Usually on CPU chip
L3 Cache
Largest, slowest cache. Shared by all cores
Cache Hit
✅ CPU found data in cache — fast!
Cache Miss
❌ Not in cache — must fetch from RAM — slow
🧠 Levels
L1 Smallest-Fastest → L2 → L3 Largest-Slowest

🔢 Number Systems

SystemBaseDigits
Binary20, 1
Octal80–7
Decimal100–9
Hexadecimal160–9, A–F
💡 Conversion Tips

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!)

UnitSymbolSizePower of 2
Bitb0 or 1
Nibble4 bits2⁴ = 16 values
ByteB8 bits2⁸ = 256 values
KilobyteKB1,024 Bytes2¹⁰
MegabyteMB1,024 KB2²⁰
GigabyteGB1,024 MB2³⁰
TerabyteTB1,024 GB2⁴⁰
🧠 Mnemonic

Bite Nibble Byte, Kids Might Get Tired Playing

Kilo → Mega → Giga → Tera → Peta (each ×1024)

Logic Gates — Quick Reference

GateOutput Rule
NOTFlips 0→1 or 1→0
ANDOutput 1 only if ALL inputs = 1
OROutput 1 if ANY input = 1
NANDOpposite of AND (universal gate)
NOROpposite of OR (universal gate)
XOROutput 1 if inputs are DIFFERENT
XNOROutput 1 if inputs are SAME
💡 Trick

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

First Law: NOT(A AND B) = NOT A OR NOT B
A·B̄ = Ā + B̄

Second Law: NOT(A OR B) = NOT A AND NOT B
A+B̄ = Ā · B̄
🧠 Trick

De Morgan = "Break the bar, change the operator"
Break the NOT bar → the AND flips to OR (or vice versa)

📐 Boolean Laws

Identity
A·1 = A    A+0 = A (neutral element)
Null
A·0 = 0    A+1 = 1 (dominator)
Complement
A·Ā = 0    A+Ā = 1
Idempotent
A·A = A    A+A = A

🖥️ Operating System

OS Functions

Process Management
Runs multiple programs — scheduling, multitasking
Memory Management
Gives RAM to programs, implements virtual memory
File Management
Create/delete/read/write files on storage
Device Management
Talks to hardware via device drivers
Security
Authentication, access control, protection

OS Types

Batch OS
Jobs grouped and run without user interaction
Time-Sharing OS
Many users share CPU — each gets a small time "quantum"
Real-Time OS (RTOS)
Strict time limits — used in aircraft, medical devices
Distributed OS
Many computers work as one system
Virtual Memory
Uses HDD as extra RAM when RAM is full
Deadlock
Two processes stuck waiting for each other — forever!
🧠 OS Scheduling Algorithms
FCFS · SJF · Round Robin · Priority

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
💡 Trick

RISC = Simple & Fast (like a sprinter) | CISC = Complex & Powerful (like a weightlifter)
Mobile phones use RISC (ARM) — that's why they're power-efficient!


2

Application Software

📝 Word Processor

WYSIWYG
"What You See Is What You Get" — screen = printed output
Mail Merge
Auto-create personalised letters by combining template + data
Macro
Recorded sequence of commands to automate repetitive tasks
Track Changes
Record edits so they can be accepted or rejected later
Watermark
Faint background text/image (e.g., "CONFIDENTIAL")
💡 Examples

MS Word · LibreOffice Writer · Google Docs

📊 Spreadsheet

Cell
Single box — identified by column letter + row number (A1)
Absolute Reference
$A$1 — does NOT change when formula is copied
Relative Reference
A1 — DOES change relative to new position when copied
Pivot Table
Flexible data summary tool — drag and drop to analyse
Conditional Formatting
Auto-colour cells based on their values (e.g., red if < 0)
💡 Trick: $ means STUCK!

$A$1 = dollar signs = the cell address is "stuck/fixed" when you copy

=SUM(A1:A10) ← add range
=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
🧠 Trick

Compiler = Book translator (translates whole book first, then you read) | Interpreter = Live translator (translates each sentence as you speak)


3

Python Programming

🐍 Python Basics

Interpreted
Code runs line by line (no compilation needed)
Case Sensitive
"name" ≠ "Name" — they are different!
Indentation
Uses spaces/tabs to define code blocks (NOT curly braces {})
Dynamic Typing
No need to declare data type — Python figures it out
💡 Trick

Python = Pretty, Yet Tremendously Helpful, Open, Nested language 😄

📦 Data Types

TypeExampleKey Trait
int42, -7Whole numbers
float3.14Decimal numbers
str'Hello'Text (immutable)
boolTrue/FalseLogic 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
💡 Mutable vs Immutable

Can change: list, dict, set  |  Cannot change: str, tuple, int, float

🔢 Operators Cheatsheet

# Arithmetic
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
💡 Trick: // vs /

// = floor division (drops decimal)  |  / = always gives float
5//2 = 2    5/2 = 2.5

🔁 Loops & Control

# for loop
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() trick

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 = [3, 1, 4, 1, 5]
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
💡 Slicing

lst[1:4] = elements at index 1,2,3 (stop not included!)
lst[-1] = last element

⚠️ Exception Handling

try:
    x = 10 / 0
except ZeroDivisionError:
    print("Can't divide by zero!")
else:
    print("Success!")
finally:
    print("Always runs")
ErrorCause
ZeroDivisionErrorDivision by zero
ValueErrorint('abc')
IndexErrorList index out of range
KeyErrorDict key not found
FileNotFoundErrorFile doesn't exist

🐛 Types of Errors

Syntax Error
Grammar rule broken — program won't run at all
if x > 5 # ← missing colon!
Logical Error
Program runs BUT gives wrong output. Hardest to find!
area = l + w # should be l * w
Runtime Error
Crashes WHILE running. Also called Exception
x = 10 / 0 # ZeroDivisionError

📐 Operator Precedence (High → Low)

( ) Parentheses ** Exponent * / // % + - Comparison not → and → or
🧠 Mnemonic
PEMDAS → Please Excuse My Dear Aunt Sally

4

Data Structures

📚 Stack — LIFO

← TOP (last in)
Item 3
Item 2
Item 1 (first in)
LIFO
Last In, First Out — like a stack of plates!
Push
Add element to TOP. Stack Pointer decrements
Pop
Remove from TOP. Stack Pointer increments
Overflow
Push on a FULL stack → error
Underflow
Pop from an EMPTY stack → error
💡 Real Uses

Undo button · Browser back button · Function calls · Expression evaluation

🚶 Queue — FIFO

FRONT→
First
Item
Last
←REAR
FIFO
First In, First Out — like a queue at a ticket counter!
Enqueue
Add element at REAR (back)
Dequeue
Remove element from FRONT
💡 Real Uses

Print spooling · CPU scheduling · Keyboard buffer · BFS algorithm

🧠 Stack vs Queue

Stack = Plates on a table (top only) | Queue = People in a line (join back, leave front)

🔗 Linked List

Node
Each element = data + pointer to next node
Head
Pointer to the FIRST node
Null/None
Last node's pointer = None (marks the end)
Singly
Each node → next only (one direction)
Doubly
Each node → next AND previous (both directions)
Circular
Last node points BACK to first (forms a circle)
💡 Linked List vs Array

Array: Fixed size, contiguous memory | Linked List: Dynamic size, scattered memory connected by pointers


5

Computer Networks

🌐 Network Types

TypeRangeExample
PANFew metersBluetooth
LANBuilding/CampusOffice network
MANCityCable TV network
WANCountry/WorldThe Internet
🧠 Mnemonic
People Love Making Wide networks

PAN → LAN → MAN → WAN (size increases!)

🔧 Network Devices

Hub
Broadcasts to ALL devices (dumb) — Layer 1
Switch
Sends to SPECIFIC device using MAC address — Layer 2
Router
Connects DIFFERENT networks using IP — Layer 3
Modem
Converts digital ↔ analog signals (computer ↔ phone line)
Gateway
Connects networks using DIFFERENT protocols
💡 Trick

Hub = Shouts (everyone hears) | Switch = Whispers (only target hears) | Router = GPS (finds the path)

📡 OSI Model — 7 Layers

7
Application
HTTP, FTP, SMTP, DNS — user-facing services
6
Presentation
Data format, encryption, compression
5
Session
Manages sessions between applications
4
Transport
TCP/UDP — end-to-end delivery, error checking
3
Network
IP addresses, routing — Routers work here
2
Data Link
MAC addresses — Switches work here
1
Physical
Raw bits over cable/wireless — Hubs work here
🧠 Mnemonic (Top→Bottom: 7→1)
"All People Seem To Need Data Processing"

Application · Presentation · Session · Transport · Network · Data Link · Physical

📋 Key Networking Protocols

ProtocolFull FormPurpose
HTTPHyperText Transfer ProtocolWeb page transfer
HTTPSHTTP SecureEncrypted web (uses SSL/TLS)
FTPFile Transfer ProtocolTransfer files between computers
SMTPSimple Mail Transfer ProtocolSEND email
POP3Post Office Protocol 3RECEIVE email (downloads to device)
IMAPInternet Message Access ProtocolRECEIVE email (stays on server)
DNSDomain Name SystemDomain name → IP address
DHCPDynamic Host Config ProtocolAuto-assign IP addresses
TCPTransmission Control ProtocolReliable, ordered delivery
UDPUser Datagram ProtocolFast but unreliable (video calls, gaming)
💡 POP3 vs IMAP Trick

POP3 = Downloads email to your device (like picking up your mail) | IMAP = Keeps on server, syncs everywhere (like reading mail online)


6

Database Management & SQL

🗃️ Key Terms

DBMS
Software to create/manage databases (MySQL, Oracle, SQLite)
RDBMS
Relational DBMS — data stored in tables with relationships
Primary Key
UNIQUE identifier for each row. Can't be NULL or duplicate
Foreign Key
Links two tables — references another table's primary key
Candidate Key
Any field that COULD be a primary key
Cardinality
Number of ROWS (tuples) in a table
Degree
Number of COLUMNS (attributes) in a table
💡 Trick

Cardinality = Cars in a parking lot (rows, can change) | Degree = Degrees/angles (columns, structure)

📊 SQL Command Types

CategoryCommandsPurpose
DDLCREATE, ALTER, DROPDefine structure
DMLSELECT, INSERT, UPDATE, DELETEWork with data
DCLGRANT, REVOKEPermissions
TCLCOMMIT, ROLLBACKTransactions
🧠 Mnemonic
DDL Defines · DML Manipulates · DCL Controls · TCL Transacts

💻 SQL Commands — Quick Reference

CREATE TABLE

CREATE TABLE Students (
  RollNo INT PRIMARY KEY,
  Name VARCHAR(50),
  Marks INT
);

SELECT with conditions

SELECT Name, Marks
FROM Students
WHERE Marks > 80
ORDER BY Marks DESC;

Aggregate Functions

SELECT COUNT(*), AVG(Marks),
       MAX(Marks), MIN(Marks)
FROM Students
GROUP BY City
HAVING COUNT(*) > 2;

LIKE & BETWEEN

-- Name starts with 'R'
WHERE Name LIKE 'R%'
-- _ = any ONE character
WHERE Marks BETWEEN 60 AND 90
💡 WHERE vs HAVING

WHERE filters individual ROWS (before grouping) | HAVING filters GROUPS (after GROUP BY) — "Having filters the groups you've grouped!"

🔗 SQL Joins

INNER JOIN
Returns rows with MATCH in BOTH tables
LEFT JOIN
ALL rows from LEFT + matching from right (NULL if no match)
NATURAL JOIN
Joins on columns with SAME NAME automatically
CROSS JOIN
Cartesian product — every row × every row

7

Cybersecurity

🦠 Malware Types

Virus
Attaches to files. Spreads when infected file runs
Worm
Self-replicates ACROSS networks — no host file needed
Trojan Horse
Disguised as legit software. Gives attacker backdoor access
Ransomware
Encrypts your files → demands money for decryption key
Spyware
Secretly watches you — steals passwords, activity
Keylogger
Records every keystroke — captures passwords!
Botnet
Network of zombie computers controlled by attacker
💡 Virus vs Worm

Virus = Needs a HOST to spread (like a biological virus) | Worm = Spreads ALONE through networks (like a worm in soil!)

⚔️ Cyber Attacks

Phishing
Fake emails/messages to steal your info
DoS Attack
Flood a server with traffic to crash it
DDoS
DoS from MANY computers at once (using botnet)
MitM
Man-in-Middle: secretly intercepts communication
SQL Injection
Inserts malicious SQL into web forms to attack database
Brute Force
Try ALL possible passwords until one works
Social Engineering
Manipulate PEOPLE psychologically to give info

🔐 Cryptography

Plaintext
Original readable data (before encryption)
Ciphertext
Encrypted, unreadable data
Encryption
Plaintext → Ciphertext (scramble it!)
Decryption
Ciphertext → Plaintext (unscramble it!)
Symmetric
SAME key for encrypt + decrypt. Fast. (AES, DES)
Asymmetric
Public key encrypts, Private key decrypts. (RSA)
Hash Function
One-way → converts data to fixed-size fingerprint. Can't reverse!
💡 Symmetric vs Asymmetric

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

Firewall
Monitors & controls network traffic based on rules
Antivirus
Detects, prevents, removes malware
VPN
Encrypted tunnel for secure communication
2FA
Two-Factor Auth: password + OTP for extra security
SSL/TLS
Secure web communication (HTTPS uses this)
Backup
Copy data regularly to protect against ransomware

8

Emerging Technologies

🤖 AI & Machine Learning

AI
Machines that simulate human thinking & learning
ML
AI subset: learns from data WITHOUT being explicitly programmed
Deep Learning
ML using neural networks with many layers
NLP
AI understands/generates human language (chatbots, voice assistants)
Supervised Learning
Train on LABELLED data — learns from examples with answers
Unsupervised Learning
Finds patterns in UNLABELLED data on its own
Reinforcement Learning
Learns by trial & error — reward good actions, penalize bad ones
💡 ML Types Trick

Supervised = Teacher gives answers | Unsupervised = Self-study | Reinforcement = Learn from mistakes (like a game)

☁️ Cloud Computing

ModelWhat You GetExample
SaaSReady software via browserGmail, Google Docs
PaaSDev tools & environmentHeroku, App Engine
IaaSVirtual machines, storageAWS EC2, Azure VMs
🧠 Trick: SaaS > PaaS > IaaS

SaaS = Someone else handles everything (just use) | PaaS = Platform provided, you build app | IaaS = Raw infrastructure, you manage everything

📡 IoT & Blockchain

IoT
Physical devices connected to internet (smart home, wearables)
Sensor
Detects physical quantities (temp, motion) → digital data
Actuator
Takes physical ACTION from digital commands (e.g., opens door)
Big Data — 5 Vs
Volume · Velocity · Variety · Veracity · Value
Blockchain
Decentralised, immutable digital ledger of transactions
Smart Contract
Self-executing code on blockchain — auto-enforces agreements
🧠 Big Data 5 Vs
Very Very Valuable Vast Varied data

Volume · Velocity · Veracity · Value · Variety

🥽 Immersive Technologies

AR (Augmented Reality)
Overlays digital info on REAL world (Pokémon GO, Maps AR)
VR (Virtual Reality)
Fully REPLACES real world with digital (VR headset required)
MR (Mixed Reality)
Digital objects can INTERACT with real world (combines AR + VR)
XR (Extended Reality)
Umbrella term for AR + VR + MR
💡 AR vs VR

AR = Adds to reality (you still see the real world + digital overlay) | VR = Replaces reality (you're in a completely virtual world)


9

Society, Law & Ethics

👣 Digital Footprint

Digital Footprint
Data trail you leave online — searches, posts, purchases
Active
Data YOU intentionally share (posts, form submissions)
Passive
Data collected WITHOUT your knowledge (cookies, IP tracking)
Cookie
Small file stored by browser to track activity & preferences
GDPR
EU law protecting your personal data online

⚖️ IT Act 2000 (India)

SectionDeals With
43Unauthorised access (civil penalty)
66Hacking — criminal penalty
66CIdentity theft — up to 3 years jail
66DCheating by impersonation
66EPrivacy violation — private images
67Publishing obscene material

©️ Intellectual Property

Copyright
Protects creative works (books, software, music)
Patent
Protects inventions & innovations
Trademark
Protects brand names, logos (Apple logo, Nike swoosh)
Open Source
Source code freely available — use, modify, distribute
Proprietary
Paid license, source code hidden (MS Windows)
Freeware
Free to use but source code NOT shared
Shareware
Free trial → pay to keep using
💡 GPL Licence

GPL = "Virus-like licence" — any modification MUST also be open source (spreads openness!)


Quick Reference & Exam Tips

📖 Important Abbreviations

CPU — Central Processing Unit
ALU — Arithmetic Logic Unit
RAM — Random Access Memory
ROM — Read-Only Memory
LAN — Local Area Network
WAN — Wide Area Network
DNS — Domain Name System
DHCP — Dynamic Host Config Protocol
DBMS — Database Management System
SQL — Structured Query Language
DDL — Data Definition Language
DML — Data Manipulation Language
AI — Artificial Intelligence
ML — Machine Learning
IoT — Internet of Things
NLP — Natural Language Processing
VPN — Virtual Private Network
LIFO — Last In First Out (Stack)
FIFO — First In First Out (Queue)
ASCII — American Standard Code for Info Interchange
RISC — Reduced Instruction Set Computer
CISC — Complex Instruction Set Computer
ARPANET — First packet-switched network (1969)
WWW — World Wide Web (invented by Tim Berners-Lee, 1991)

🎯 Exam Priority — What to Focus On

TopicExpected MarksPriority
Python Programming (all concepts)15–20 marks★★★ VERY HIGH
SQL Queries & Database8–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 Logic5–8 marks★★ HIGH
Cybersecurity (threats, encryption)5 marks★ MEDIUM
Emerging Technologies (AI, IoT, Cloud)4–5 marks★ MEDIUM
CPU, Memory, OS concepts4–5 marks★ MEDIUM

🧠 Master Mnemonics Summary

OSI 7 Layers (Top→Bottom)
"All People Seem To Need Data Processing"

Application · Presentation · Session · Transport · Network · Data Link · Physical

Memory Units
"Kids Might Get Tired Playing"

Kilo · Mega · Giga · Tera · Peta

CPU Registers
"Please Immediately Make My Assignment"

PC · IR · MAR · MDR · Accumulator

Network Types (Small→Large)
"People Love Making Wide networks"

PAN · LAN · MAN · WAN

Big Data 5 Vs
"Very Very Valuable Vast Varied"

Volume · Velocity · Veracity · Value · Variety

SQL Command Types
"DDL Defines · DML Manipulates · DCL Controls"

DDL=Structure · DML=Data · DCL=Access · TCL=Transactions

Stack vs Queue
Stack = Plates · Queue = People in line

Stack LIFO (top only) · Queue FIFO (join back, leave front)

Cache Levels
L1 Smallest-Fastest → L2 → L3 Largest-Slowest

All are faster than RAM!

⭐ Last-Day Study Strategy

📝 Write Definitions
Write each keyword 3× — active recall beats passive reading
💻 Code Python
Practice sorting, file handling, exception handling in Python
🗃️ SQL Queries
Write SELECT, WHERE, GROUP BY, HAVING, JOIN queries by hand
🌐 Network Diagrams
Draw Star, Bus, Ring, Mesh topologies and label the devices
⚡ Truth Tables
Practice NAND, NOR, XOR truth tables — exam favourites!
🧠 Understand WHY
Focus on why each concept exists — easier to reconstruct than memorise

Prepared by ExamPill · Computer Science Revision · TGT/PGT

© 2025-26 ExamPill. All Rights Reserved. For personal educational use only.

जिन खोजा तिन पाइया, गहरे पानी पैठ।