Maharashtra HSC Computer Science (Bifocal) study materials
Maharashtra HSC Computer Science (Bifocal) study resources

Maharashtra HSC Computer Science (Bifocal) cheat sheet

Maharashtra HSC Computer Science (Bifocal) · Keep the key ideas within reach.

Quick reference

Computer Organization and Fundamentals

  • Number-base conversion: for the integer part divide repeatedly by the target radix and read remainders bottom-up; for the fraction multiply repeatedly by the radix and read integer parts top-down.

  • Shortcut grouping: 3 binary bits = 1 octal digit, 4 binary bits = 1 hex digit, grouped outward from the radix point in both directions.

  • Storage units: 1 byte = 8 bits, 1 KB = 1024 B, 1 MB = 1024 KB, 1 GB = 1024 MB; a 1 KB memory has 1024 addressable locations (address lines n give 2^n locations).

  • Memory hierarchy by decreasing speed and cost: CPU registers > cache > main memory (RAM/ROM) > secondary storage (magnetic, optical, flash); cache holds recently used blocks to cut average access time.

  • Gate equations: AND = A·B, OR = A+B, NOT = A', XOR = A'B + AB', XNOR = AB + A'B'; NAND and NOR are universal because either alone can build all functions.

  • De Morgan's theorems: (A+B)' = A'·B' and (A·B)' = A' + B'; used to convert SOP to NAND-only and POS to NOR-only circuits.

  • Half adder: Sum = A XOR B, Carry = A AND B. Full adder adds carry-in: Sum = A XOR B XOR Cin, Carry = AB + B·Cin + A·Cin.

  • Flip-flop = bistable 1-bit memory element (SR, JK, D, T); a register is a group of flip-flops, a counter is a register with counted clock pulses.

  • Instruction cycle: fetch the instruction from memory into the IR, decode it in the control unit, execute it in the ALU, then increment the program counter.

  • Character codes: ASCII is 7-bit (128 symbols), Extended ASCII 8-bit (256), Unicode (UTF-8/UTF-16) covers the world's scripts.

Quick reference

Operating Systems and File Management

  • Core OS functions: process management, memory management, file management, device (I/O) management, security/protection and the user interface (CLI or GUI).

  • Batch systems run grouped jobs with no user interaction; multiprogramming keeps several jobs in memory so the CPU is never idle during I/O; time-sharing rotates a fixed time quantum per user.

  • A real-time OS must meet a guaranteed deadline; hard real-time failure is catastrophic, soft real-time tolerates occasional missed deadlines.

  • File attributes stored in the directory entry: name, extension, size, date/time of creation or modification, and flags such as read-only, hidden, system, archive.

  • Absolute path starts at the root (C:\DATA\A.TXT or /home/user/a.txt); relative path starts at the current directory, where . means current and .. means parent.

  • Wildcards: * matches any number of characters (any file name), ? matches exactly one character; for example *.TXT matches all text files.

  • Allocation methods: contiguous is fastest to read but suffers external fragmentation; linked uses pointers per block; indexed uses an index block; FAT keeps a table of cluster chains.

  • Linux permission string rwxr-xr-- means owner read/write/execute, group read/execute, others read only; chmod 754 sets the same mask numerically.

  • A file is opened before use and closed after; closing flushes buffers and releases the file handle back to the OS.

Quick reference

Programming and Problem Solving (C/C++)

  • Typical sizes: char 1 byte, int 2 or 4 bytes, float 4 bytes, double 8 bytes; sizeof returns the size in bytes on the current machine.

  • Precedence (high to low): postfix/prefix operators, arithmetic *, /, %, then + and -, relational < > <= >=, equality == !=, logical &&, logical ||, assignment =.

  • Format specifiers: %d int, %f float, %lf double, %c char, %s string, %u unsigned, %x hexadecimal; scanf needs & before ordinary variables but not before arrays/strings.

  • while tests before the body (may run zero times); do-while tests after the body (runs at least once); for packs initialisation, condition and update in one line.

  • Call by value copies the argument, so the original cannot change; call by reference passes an address (pointer or & in C++) so the function modifies the caller's variable.

  • Every recursive function needs a base case plus a smaller recursive step; each call pushes a stack frame, so deep recursion risks stack overflow.

  • Arrays are contiguous and 0-indexed; the array name acts as the address of element 0, so arr[i] is the same as *(arr + i).

  • A function prototype declares the return type and parameter types before the call; a function returns at most one value but can fill several by reference parameters.

  • Structures group members under one name and are accessed with the dot operator (or -> through a pointer); unlike arrays, members may be of different types.

Quick reference

Data Structures and File Handling

  • Stack is LIFO: push and pop act only at the top; overflow occurs on push to a full stack, underflow on pop from an empty one; used for function calls, expression evaluation, recursion and undo.

  • Queue is FIFO: enqueue at the rear, dequeue at the front; a circular queue wraps indices with (rear+1) % size to avoid false overflow.

  • Linked list nodes hold data plus a next pointer; size is dynamic, insertion/deletion is O(1) once the position is known, but random access is O(n).

  • Search: linear search is O(n) and works on unsorted data; binary search is O(log n) but requires a sorted array.

  • Sorting costs: bubble, selection and insertion are O(n^2); merge, quick and heap average O(n log n); quick sort's worst case is O(n^2).

  • C++ streams: ifstream for reading, ofstream for writing, fstream for both; open modes ios::in, ios::out, ios::app, ios::ate, ios::trunc, ios::binary combine with the | operator.

  • ios::out alone truncates an existing file; add ios::app to keep old data, or ios::in | ios::out to update a file in place.

  • seekg/seekp move the get/put pointer using beg, cur or end as origin; tellg/tellp report the current position in bytes; eof() becomes true only after a read passes end of file.

Quick reference

Database Management Systems and SQL

  • Keys: super key uniquely identifies rows; candidate key is a minimal super key; primary key is the chosen candidate key (unique, never NULL); foreign key refers to a primary key elsewhere for referential integrity.

  • SQL sub-languages: DDL (CREATE, ALTER, DROP, TRUNCATE), DML (SELECT, INSERT, UPDATE, DELETE), DCL (GRANT, REVOKE), TCL (COMMIT, ROLLBACK).

  • Aggregate functions COUNT, SUM, AVG, MIN, MAX summarise many rows; GROUP BY forms groups, WHERE filters rows before grouping and HAVING filters groups after aggregation.

  • DELETE removes selected rows and can be rolled back; TRUNCATE quickly empties all rows; DROP removes the table structure itself.

  • Joins: INNER JOIN returns only matching rows, LEFT JOIN keeps all left-table rows with NULLs for non-matches, a self join joins a table to itself via aliases.

  • Normalisation: 1NF has atomic values only; 2NF removes partial dependency on part of a composite key; 3NF removes transitive dependency between non-key attributes.

  • Clauses run in the order FROM, WHERE, GROUP BY, HAVING, SELECT, ORDER BY; DISTINCT removes duplicate rows; LIKE uses % for any string and _ for one character.

  • Transaction properties (ACID): Atomicity (all or nothing), Consistency (valid state to valid state), Isolation (concurrent transactions do not interfere), Durability (committed data survives failure).

Quick reference

Computer Networks and Internet Concepts

  • Topologies: bus uses one backbone with terminators (a break halts the network), star depends on the central hub/switch, ring passes data in one direction, mesh needs n(n-1)/2 links for full redundancy.

  • OSI has 7 layers (Physical, Data Link, Network, Transport, Session, Presentation, Application); TCP/IP merges these into 4 (Network Access, Internet, Transport, Application).

  • Devices by layer: hub and repeater at physical (broadcast everything), switch and bridge at data link (forward by MAC address), router at network (forward by IP address), gateway above.

  • TCP is connection-oriented and reliable with acknowledgements, sequencing and retransmission; UDP is connectionless, unreliable and faster, used for streaming and DNS queries.

  • Well-known ports: FTP 20/21, Telnet 23, SMTP 25, DNS 53, HTTP 80, POP3 110, HTTPS 443.

  • IPv4 is a 32-bit address written as four dotted decimal octets; class A starts 1-126, B 128-191, C 192-223, and 127.x.x.x is loopback.

  • DNS resolves a domain name to an IP address; a URL has the form scheme://host:port/path, e.g. https://school.edu/index.html.

  • Bandwidth is measured in bits per second; a modem modulates digital data to analog and demodulates back; a firewall filters traffic by rules.

Quick reference

Web Designing with HTML

  • Document skeleton: contains (with , <meta>) and <body>; the title appears in the browser tab, not in the page.</p>

  • Text tags:

    to headings (h1 largest),

    paragraph,
    line break and


    horizontal rule (both empty tags, no closing tag).

  • Lists:

      with
    • for bullets,
        with
      1. for numbering (type = 1, A, a, I, i; start = first number), with / for definitions.

  • Links: text; target='_blank' opens a new tab; href='#name' jumps to an internal anchor; href='mailto:[email protected]' starts an e-mail.

  • Images: is an empty tag; alt text is required for accessibility and shows when the image fails.

  • Tables:

    , , ,
    , ; colspan merges cells horizontally and rowspan vertically.

  • Forms:

    ; controls include , ,
  • Styling: inline style attribute, internal

Quick reference

Software Engineering and System Development Life Cycle

  • SDLC phases in order: requirement analysis, feasibility study, system design, coding, testing, implementation/deployment, maintenance.

  • Waterfall is strictly sequential with frozen requirements; prototyping builds a model to clarify unclear requirements; spiral is iterative and risk-driven; incremental delivers working builds.

  • Feasibility types: technical (can it be built), economic (cost versus benefit), operational (will users accept it), legal and schedule.

  • Testing levels: unit (single module), integration (interfaces), system (whole system versus SRS), acceptance (user validation); alpha is in-house, beta is at user sites.

  • Black-box testing uses inputs and expected outputs only; white-box testing uses code structure and aims at statement, branch and path coverage.

  • Design tools: DFD shows processes, data stores, external entities and data flows; ER diagram shows entities, attributes and relationships; a data dictionary defines every element.

  • Good design has high cohesion inside a module and low coupling between modules; a module should perform one well-defined function.

  • Maintenance types: corrective (fixing bugs), adaptive (new environment), perfective (new requirements), preventive (future-proofing); maintenance usually consumes the largest share of lifetime cost.

  • The SRS is the frozen baseline for design and testing and states functional requirements, non-functional requirements, assumptions and constraints.