RBSE SS Computer Science study materials
RBSE SS Computer Science study resources

RBSE SS Computer Science cheat sheet

RBSE SS Computer Science · Keep the key ideas within reach.

Quick reference

Computer Fundamentals and Number Systems

  • Binary base 2 uses digits 0-1; octal base 8 uses 0-7; decimal base 10 uses 0-9; hexadecimal base 16 uses 0-9 and A-F.

  • Decimal to binary: divide repeatedly by 2, record remainders, read remainders bottom-to-top.

  • Binary to octal: group bits in threes from the right; binary to hexadecimal: group in fours from the right, pad the left group with zeros.

  • 1 byte = 8 bits; 1 KB = 1024 bytes; 1 MB = 1024 KB; 1 GB = 1024 MB.

  • Two's complement of an n-bit number = 2^n minus the number; it represents negatives and gives a single zero.

  • 1's complement is formed by inverting every bit; 2's complement = 1's complement + 1.

  • ASCII uses 7 bits (128 codes); extended ASCII uses 8 bits (256 codes); Unicode supports far more characters.

  • Logic gates: AND outputs 1 only if all inputs are 1; OR outputs 1 if any input is 1; NOT inverts; XOR outputs 1 if inputs differ.

  • CPU components: ALU performs arithmetic and logic; control unit fetches and decodes instructions; registers hold data temporarily.

Quick reference

Programming Fundamentals and Problem Solving

  • Algorithm properties: finiteness, definiteness, input, output, effectiveness.

  • Flowchart symbols: oval = start/stop, parallelogram = input/output, rectangle = process, diamond = decision, arrow = flow.

  • Three control structures: sequence, selection (if/if-else), iteration (loops).

  • A variable is a named memory location whose value can change; a constant's value cannot change during execution.

  • Compilation translates the whole program before execution; interpretation translates and executes line by line.

  • A while loop tests the condition before the body; a do-while loop tests after, so the body runs at least once.

  • Dry running (hand tracing) executes an algorithm on paper with sample values to verify logic.

  • Swapping two variables without a third: a = a + b; b = a - b; a = a - b.

Quick reference

Python Programming

  • Python is dynamically typed and interpreted; indentation defines blocks instead of braces.

  • Immutable types: int, float, str, tuple; mutable types: list, dict, set.

  • Slicing s[a:b] returns characters from index a up to but not including b; negative indices count from the end.

  • range(a, b, step) excludes b; range(5) yields 0,1,2,3,4.

  • def defines a function; return sends a value back; a function without return yields None.

  • List methods: append adds one item, extend adds items from an iterable, insert places at an index, pop removes and returns an item.

  • Exception handling: try holds risky code, except catches the error, else runs if no error, finally always runs.

  • File modes: 'r' read, 'w' write (truncates), 'a' append, 'rb'/'wb' binary.

Quick reference

Data Structures and Algorithms

  • Stack is LIFO (last in, first out); queue is FIFO (first in, first out).

  • Stack operations: push (insert at top), pop (remove from top), peek/top (view top); overflow occurs on pushing to a full stack.

  • Linear search checks elements one by one, O(n); binary search halves a sorted array each step, O(log n).

  • Bubble sort repeatedly swaps adjacent out-of-order pairs; average and worst case O(n^2).

  • Selection sort finds the minimum of the unsorted part and swaps it into place; O(n^2) comparisons.

  • Insertion sort builds a sorted prefix, shifting larger elements right; efficient for small or nearly sorted data.

  • A linked list stores nodes with data and a next pointer; insertion/deletion is O(1) at a known node, but access is O(n).

  • Tree terms: root, parent, child, leaf (no children), height (longest root-to-leaf path); a binary tree node has at most two children.

Quick reference

Database Management Systems and SQL

  • DBMS keys: primary key uniquely identifies a row and cannot be NULL; foreign key references a primary key in another table.

  • Candidate key is any minimal unique identifier; one candidate key is chosen as the primary key.

  • SQL categories: DDL (CREATE, ALTER, DROP), DML (INSERT, UPDATE, DELETE), DQL (SELECT), DCL (GRANT, REVOKE).

  • SELECT columns FROM table WHERE condition GROUP BY columns HAVING condition ORDER BY columns; WHERE filters rows, HAVING filters groups.

  • Aggregate functions: COUNT, SUM, AVG, MIN, MAX; they ignore NULL except COUNT(*).

  • JOIN types: INNER returns matching rows; LEFT/RIGHT keep all rows of one table; FULL keeps all rows of both.

  • DELETE removes rows (can be rolled back in a transaction); DROP removes the table structure entirely.

  • Normalization: 1NF removes repeating groups; 2NF removes partial dependencies; 3NF removes transitive dependencies.

Quick reference

Computer Networks and Internet

  • OSI layers, bottom to top: Physical, Data Link, Network, Transport, Session, Presentation, Application.

  • TCP is connection-oriented and reliable; UDP is connectionless and faster with no delivery guarantee.

  • IPv4 addresses are 32 bits; IPv6 addresses are 128 bits.

  • Common ports: HTTP 80, HTTPS 443, FTP 21, SMTP 25, DNS 53, SSH 22.

  • DNS maps domain names to IP addresses; DHCP assigns IP addresses automatically.

  • LAN covers a small area; WAN spans large distances; the Internet is a global network of networks using TCP/IP.

  • Hub broadcasts to all ports; switch forwards by MAC address; router forwards between networks by IP address.

  • URL parts: protocol, domain name, path, and optional query string.

Quick reference

Cyber Security and Emerging Technologies

  • CIA triad: Confidentiality, Integrity, Availability.

  • Malware types: virus attaches to files, worm self-replicates over networks, trojan disguises as useful software, ransomware encrypts data for payment.

  • Phishing is a social-engineering attack using fake messages to steal credentials; never share OTPs or passwords via links.

  • Symmetric encryption uses one shared key; asymmetric encryption uses a public key to encrypt and a private key to decrypt.

  • Firewall filters network traffic by rules; antivirus detects known malware signatures.

  • Strong passwords are long, mixed, unique per site; two-factor authentication adds a second verification step.

  • Cloud computing service models: IaaS (infrastructure), PaaS (platform), SaaS (software).

  • AI, IoT, blockchain, and 5G are emerging technologies; blockchain is a distributed, tamper-evident ledger of linked blocks.

Quick reference

Practical Work and Project

  • A project report typically includes title, introduction, problem statement, methodology, code, output screenshots, testing, conclusion, and bibliography.

  • Testing types: unit (single module), integration (modules together), black-box (inputs/outputs only), white-box (internal logic).

  • Syntax error violates language rules and is caught at compile/parse time; logic error produces wrong output without an error message.

  • A dry run table lists variable values after each statement to verify logic.

  • SQL practical checks: correct SELECT with WHERE, GROUP BY with HAVING, and JOIN between two tables.

  • Python practical checks: input via input(), type conversion with int()/float(), loops, functions, and file read/write.

  • Documentation should state purpose, inputs, outputs, and limitations of the program.

  • Viva preparation: be ready to explain each line of your own code and the reason for each design choice.