Quick revision sheet based on previous CSE exit exam questions only. Read this before full notes — these topics show up repeatedly.
Fundamentals of Programming (C++)
| Concept | Syntax / rule |
|---|---|
| User-defined header | #include "filename" (quotes) — library uses <...> |
| Reference variable | int &y = x; — alias, must be initialized |
| Dynamic memory | new allocates; array: int *arr = new int[10]; |
| Function overloading | Same name, different parameter list |
| Array → pointer | Arrays decay to pointers; can't pass "by value" |
| Constant | const float PI = 3.14; (not #define PI = 3.14) |
| Multi-branch | switch tests one value against many cases |
File for read + write: ios::in | ios::out
Object Oriented Programming
| Pillar | One-liner |
|---|---|
| Encapsulation | Hide data (private), expose via getters/setters with validation |
| Abstraction | Show only essentials; model the problem domain |
| Inheritance | Reuse common attributes — Student extends Person ("is-a") |
| Polymorphism | Same interface, different behavior (message passing) |
private prevents direct external access to sensitive data. Static block runs once when the class loads.
Java GUI: button click → implement ActionListener | JPanel groups components | setBounds() (no layout manager) | GridLayout = equal cells
Data Structure and Algorithms
| Structure | Key fact |
|---|---|
| Stack | LIFO — implements recursion |
| Queue / Deque | FIFO / insert-delete at both ends |
| Graph | The non-linear structure (others are linear) |
| BST inorder | Gives ascending sorted order |
| Heap | Implements a priority queue (log n insert/delete) |
| Hashing | Direct access by key |
Sorting: Merge & Quick sort are divide-and-conquer — Merge is stable, Quick is not.
Big-O (memorize): O(1) < O(log n) < O(n) < O(n log n) < O(n²).
Shortest path: Dijkstra (weighted graph). Infix → postfix: A*(B+C*D) → ABCD*+*
Fundamentals of Software Engineering
| Model | Idea |
|---|---|
| Waterfall | Sequential — each phase finishes before the next |
| Spiral (Boehm) | Risk-driven, looping |
| Agile | Iterative, embraces change; working software over documentation |
| Scrum | Product Owner, Scrum Master, Sprint, Daily Standup |
| RAD | Fast delivery under tight deadlines |
| Evolutionary prototyping | Incremental development |
| Maintenance | Corrective, Adaptive, Perfective, Preventive |
Functional req = system behavior | Non-functional = constraints. Black-box testing = no view of internal structure. Good design = low coupling + high cohesion (modularity = dividing the system into independent modules).
Database Systems
| Normal Form | Rule |
|---|---|
| 1NF | Atomic values only |
| 2NF | 1NF + full dependency on the whole key (no partial) |
| 3NF | 2NF + no transitive dependency |
| BCNF | Every determinant is a super key |
Relational model: data = relations (tables); a schema = relation name + attributes; rows = tuples. ER mapping: 1:1 → FK either side | 1:N → FK on the N-side | M:N → junction table. Keys: primary (unique row), foreign (references another relation), candidate / super key. Normalization minimizes redundancy + update anomalies. Commands: CREATE = DDL | INSERT / UPDATE / DELETE / SELECT = DML. Inner join returns rows matching in both tables. A view restricts a user to a subset of data. Models: conceptual (global view) → logical → physical (file/page/record). Referential integrity keeps foreign keys consistent.
Digital Logic & Design
| Topic | Must know |
|---|---|
| Universal gate | NAND (and NOR) |
| 2's complement | Invert bits + 1 → 101101 becomes 010011 |
| Half / Full adder | Full adder = 2 half adders; half adder has no Borrow |
| MUX | Data selector; decoder 3-to-8 → 8 outputs |
| Encoder | Converts inputs to binary code; priority encoder picks highest |
| D flip-flop | Q(next) = D; SR latch is level-triggered |
| Canonical SOP | Sum of minterms; PLA = programmable AND + OR |
| Boolean simplify | K-map / identities — e.g. (A+B)(A'+C) = A + BC |
Address lines: a 32×8 memory needs 5 lines (2⁵ = 32). Base-16 = hexadecimal.
Computer organization and architecture
| Topic | Detail |
|---|---|
| Program Counter | Holds address of the next instruction (PC ← PC + I) |
| Instruction cycle | Fetch → Decode (interprets opcode) → Execute |
| MBR / Accumulator | MBR holds data to/from memory; Accumulator = implicit register for 1-address |
| Cache memory | Faster than RAM; exploits locality (hit/miss) |
| Pipelining | Increases instruction throughput |
| Branch prediction | Mitigates control hazards |
| Superscalar | Multiple instructions issued/executed per cycle |
Addressing: Immediate (operand in instruction) | Indexed (best for arrays). Three-address format → shortest program.
Operating System
| Topic | Must know |
|---|---|
| Process vs Thread | Thread shares the address space of its process |
| Process states | New → Ready → Running → Blocked → Terminated |
| fork() | System call that creates a process (UNIX/Linux) |
| Zombie | Terminated process whose PCB still exists |
| Deadlock (4 conditions) | Mutual exclusion, hold & wait, no preemption, circular wait |
| Banker's algorithm | Deadlock avoidance via safe-state check |
| Thrashing | Excessive page faults from too little memory |
| FIFO replacement | Can suffer Belady's anomaly |
| Scheduling | FCFS is non-preemptive; turnaround = submit → complete |
Indexed allocation → efficient direct access. Producer–Consumer = a synchronization problem.
Micro Computer & Interfacing (8086)
| Topic | Detail |
|---|---|
| Physical address | segment × 16 (shift left 4) + offset → addresses 1 MB |
| Data bus | Internal data bus = 16 bits |
| BIU | Bus Interface Unit fetches instructions |
| Default stack segment | SS (for the stack pointer) |
| AD0–AD15 | Multiplexed address/data → fewer pins |
| Interrupts | 8259 PIC expands them; divide-by-zero = internal Type 0 |
Addressing modes: MOV AL,55H = immediate | MOV AX,[BX] = register-indirect | MOV AX,[2000H] = direct. CALL pushes return address; DAA fixes packed BCD.
Data Communication and Computer Networking
OSI layers (top→bottom): Application → Presentation → Session → Transport → Network → Data Link → Physical
| Networking | Detail |
|---|---|
| Router | Network-layer device; switches reduce collision domains |
| TCP vs UDP | TCP = reliable, connection-oriented; UDP = fast, connectionless |
| DNS | Resolves domain names ↔ IP addresses |
| Star topology | All devices connect to a central hub/switch |
| Attenuation | Signal loss over distance; impulse noise = sudden spikes |
| PCM / FDM | PCM digitizes analog (sampling); FDM splits bandwidth by frequency |
Private IPs (192.168.x.x, 10.x) aren't routed on the Internet; a subnet mask splits network/host bits. IPv6 fixes address exhaustion. MPLS improves WAN routing. Simplex = one-way only.
Computer Systems Security
CIA Triad: Confidentiality, Integrity, Availability (DoS attacks availability).
| Concept | Meaning |
|---|---|
| Symmetric crypto | Same key both ways (AES, DES) — weakness is key distribution |
| Asymmetric crypto | Public + private key pair — RSA |
| AES keys | 128 / 192 / 256 bits |
| Virus vs Worm | Virus modifies other programs; Worm self-replicates |
| Passive attack | Learns info without altering resources |
| RBAC | Access based on job role |
| IDS | Detects/responds to malicious activity |
| Authentication | Smartcard = "something you have"; one-to-many = identification |
Strong password = long + mixed symbols. The biggest vulnerability is usually human factors.
Distributed Systems
| Concept | Detail |
|---|---|
| Definition | Independent computers that appear as one system |
| No global clock | Not a characteristic of a DS |
| Transparency | Hides complexity; location transparency hides where resources are |
| Partial failure | Some nodes fail while others continue |
| RPC | Makes remote resources appear local |
| Byzantine fault | Assumes malicious behavior |
| Consensus | Ensures progress despite failures |
Eventual consistency → NoSQL. Read replication scales read-heavy loads. Serverless abstracts server management.
Compiler Design
Phase order (memorize):
Lexical → Syntax → Semantic → Intermediate Code → Optimization → Code Generation
| Phase / Concept | Detail |
|---|---|
| Lexical analyzer | Removes comments, builds tokens, first fills the symbol table |
| Syntax analysis | Detects a missing semicolon; output = parse / syntax tree |
| Semantic analyzer | Checks operand types |
| Ambiguous grammar | Produces more than one parse tree |
| Left recursion | Breaks top-down (LL) parsers — infinite loop |
| Bottom-up parsing | Builds the tree from leaves to root |
Cross compiler runs on one machine, targets another. Linker combines object files.
Introduction to Artificial Intelligence
| Topic | Must know |
|---|---|
| Agent | Architecture + Program; acts on a percept sequence |
| Simple reflex agent | Condition–action rules |
| Utility-based agent | Reasons about happy/unhappy states |
| Turing Test | Evaluates machine intelligence |
| Search | BFS explores shallowest nodes first |
| Uncertainty | Handled with probabilistic reasoning |
Learning: Supervised = labeled data | Unsupervised = patterns in unlabeled data | Reinforcement = reward/penalty. Dropout prevents overfitting; NLP handles human language.
Top 15 "Always Appear" Facts (Memorize Tonight)
- NAND / NOR are universal gates; 2's complement = invert + 1.
- Stack = LIFO (implements recursion) | Queue = FIFO.
- Merge & Quick sort = divide-and-conquer — Merge stable, Quick not.
- BST inorder = ascending | Dijkstra = shortest path.
- 1NF atomic → 2NF full-key dep → 3NF no transitive → BCNF determinant is a super key.
- CREATE = DDL; INSERT / UPDATE / DELETE / SELECT = DML.
- fork() creates a process; a thread shares its process's address space.
- Banker's algorithm = deadlock avoidance; thrashing = too many page faults.
- FIFO page replacement → Belady's anomaly.
- Router = network layer; DNS maps names ↔ IPs; IPv6 fixes address exhaustion.
- Compiler order: Lexical → Syntax → Semantic → Intermediate → Optimization → Code gen.
- Ambiguous grammar = multiple parse trees; left recursion breaks LL parsers.
- 8086: physical address = segment×16 + offset → 1 MB; data bus = 16-bit.
- CIA; AES = 128/192/256-bit keys; symmetric weakness = key distribution.
- Encapsulation, Inheritance, Polymorphism, Abstraction = the four OOP pillars.