WBCHSE HS Modern Computer Application study materials
WBCHSE HS Modern Computer Application study resources

WBCHSE HS Modern Computer Application cheat sheet

WBCHSE HS Modern Computer Application · Keep the key ideas within reach.

Quick reference

Introduction to Computer System and Computer Organization

  • A computer system has input, CPU, main memory, secondary storage, and output units; the CPU contains the ALU, control unit, and registers.

  • The stored-program von Neumann model keeps instructions and data in the same addressable memory and executes them through fetch, decode, execute, and store stages.

  • Memory hierarchy from fastest and smallest to slowest and largest is registers, cache, main memory, and secondary storage; cache reduces average access time.

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

  • CPU clock frequency f gives cycle time T = 1/f; at 2 GHz, one clock cycle lasts 0.5 ns.

  • RAM is volatile read/write working memory; ROM is non-volatile and retains firmware such as the bootstrap loader.

  • A bus is a shared set of lines; the address bus carries memory addresses, the data bus carries values, and the control bus carries read/write and timing signals.

  • An input device supplies data to the computer, an output device presents results, and a storage device retains data; a touchscreen serves as both input and output.

Quick reference

Number Systems and Boolean Algebra

  • In base b, the value of digits d_n to d_0 is the sum of d_i multiplied by b^i; for example, 1011 in base 2 equals 8 + 0 + 2 + 1 = 11.

  • Decimal-to-base conversion repeatedly divides by the target base and reads remainders bottom-to-top; binary-to-octal groups 3 bits and binary-to-hex groups 4 bits from the right.

  • Binary addition rules: 0+0=0, 0+1=1, 1+0=1, and 1+1=10, writing 0 and carrying 1; subtraction uses a borrow of 2.

  • For n-bit two's complement, represent negative x by inverting x and adding 1; the range is -2^(n-1) to 2^(n-1)-1.

  • Boolean identities include X+0=X, X·1=X, X+1=1, X·0=0, X+X=X, X·X=X, X+X'=1, and X·X'=0.

  • De Morgan's theorems are (A+B)' = A'·B' and (A·B)' = A' + B'.

  • AND outputs 1 only when all inputs are 1; OR outputs 1 when any input is 1; XOR outputs 1 when the inputs differ.

  • A Karnaugh map groups 1s in blocks of 1, 2, 4, 8, or 16 adjacent cells, including wrap-around edges, to form a minimal sum-of-products expression.

Quick reference

Computer Software and Operating Systems

  • System software includes the operating system, device drivers, and utilities; application software performs user-focused tasks such as word processing.

  • Operating-system functions include process management, memory management, file management, device management, and providing a user interface.

  • Process states usually include new, ready, running, waiting, and terminated; only one process per CPU core is running at a given instant.

  • Batch systems run jobs without interaction; time-sharing systems switch the CPU rapidly among users; real-time systems must meet specified deadlines.

  • Paging divides logical memory into fixed pages and physical memory into frames; segmentation divides memory into variable-length logical segments.

  • Virtual memory uses secondary storage to hold inactive pages, allowing programs larger than physical RAM through demand paging.

  • A file system organizes files in directories and tracks metadata such as name, size, location, and permissions.

  • BIOS or UEFI firmware performs the power-on self-test and starts the boot process by loading the operating-system loader.

Quick reference

Programming in C

  • A C program begins execution at main(); statements end with semicolons, and C is case-sensitive, so Total and total are different identifiers.

  • Common C types are int for integers, char for single characters, and float or double for real numbers; sizeof reports storage in bytes.

  • printf and scanf format specifiers include %d for int, %c for char, %f for float, %lf for double, and %s for strings.

  • Integer division truncates toward zero; the % remainder operator works only with integer operands.

  • if/else selects between alternatives; switch requires an integral controlling expression and uses break to prevent fall-through.

  • for, while, and do-while repeat statements; break exits the nearest loop or switch, while continue skips to the next iteration.

  • Arrays use zero-based indexing; a C string is a char array ending with a null character of value zero.

  • Functions have a return type, name, and parameter list; C passes arguments by value unless pointers are used.

  • Pointers store addresses: & gives a variable's address and * dereferences a pointer; malloc allocates heap memory and free releases it.

Quick reference

Data Structures

  • An array stores elements contiguously, giving O(1) access by index; inserting or deleting in the middle costs O(n) shifts.

  • A stack is LIFO: push adds at the top and pop removes from the top; applications include recursion, expression evaluation, and undo.

  • A queue is FIFO: enqueue adds at the rear and dequeue removes from the front; a circular queue reuses slots and avoids false overflow.

  • A linked list stores nodes containing data and a link; insertion at the head is O(1), but searching is O(n) because nodes are not indexed.

  • A binary tree has at most 2^h - 1 nodes at height h; level h contains at most 2^(h-1) nodes when the root is at level 1.

  • In a binary search tree, every left descendant is smaller and every right descendant is larger than the node; inorder traversal gives sorted output.

  • Tree traversals: preorder root-left-right, inorder left-root-right, postorder left-right-root, and level order breadth-first.

  • Linear search is O(n); binary search is O(log n) but requires a sorted array and direct access to the middle element.

  • Bubble, selection, and insertion sort average O(n^2); merge sort and quicksort average O(n log n), with quicksort worst case O(n^2).

Quick reference

Relational Database Management Systems and SQL

  • A relation is a table with tuples as rows and attributes as columns; degree is the number of attributes and cardinality is the number of tuples.

  • A primary key uniquely identifies rows and cannot be NULL; a foreign key references a candidate key in another table and enforces referential integrity.

  • SQL DDL includes CREATE, ALTER, and DROP; DML includes SELECT, INSERT, UPDATE, and DELETE.

  • SELECT query clause order is SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY; HAVING filters groups after aggregation.

  • Aggregate functions COUNT, SUM, AVG, MIN, and MAX return one value per group; except for COUNT(*), they ignore NULL values.

  • INNER JOIN returns matching rows; LEFT JOIN keeps all left-table rows; RIGHT JOIN keeps all right-table rows; FULL JOIN keeps all rows.

  • Constraints include PRIMARY KEY, FOREIGN KEY, UNIQUE, NOT NULL, CHECK, and DEFAULT; UNIQUE permits NULL in many SQL systems.

  • 1NF requires atomic column values; 2NF removes partial dependencies on part of a composite key; 3NF removes transitive dependencies on non-key attributes.

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

Quick reference

Computer Networks and the Internet

  • PAN, LAN, MAN, and WAN describe networks by increasing geographic scope; LANs usually use Ethernet or Wi-Fi.

  • Topologies: bus shares one backbone, star connects nodes to a central device, ring forms a closed loop, and mesh provides multiple paths.

  • OSI layers from bottom are physical, data link, network, transport, session, presentation, and application; TCP/IP uses network access, internet, transport, and application.

  • IPv4 uses 32-bit addresses in dotted decimal; IPv6 uses 128-bit addresses; private IPv4 ranges include 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16.

  • TCP is connection-oriented and reliable; UDP is connectionless and does not guarantee delivery, making it suitable for live streaming and DNS queries.

  • Common ports: HTTP 80, HTTPS 443, FTP 20/21, SMTP 25, DNS 53, DHCP 67/68, POP3 110, and IMAP 143.

  • DNS maps domain names to IP addresses; DHCP assigns IP configuration automatically; HTTP transfers web resources between client and server.

  • A hub repeats signals to all ports, a switch forwards frames by MAC address, and a router forwards packets between networks by IP address.

  • Circuit switching reserves a dedicated path; packet switching divides data into packets that may travel different routes and be reassembled.

Quick reference

Web Technology and Multimedia

  • HTML elements use opening and closing tags and may have attributes; the head element holds metadata and the body element holds visible content.

  • CSS can be inline, internal in a style element, or external in a .css file; external style sheets are reused across pages.

  • The CSS box model consists of content, padding, border, and margin; width by default applies to content only unless box-sizing is border-box.

  • JavaScript runs in the browser to add behavior, respond to events, and modify the DOM; server-side code runs on the web server.

  • Multimedia combines text, graphics, audio, video, and animation; raster graphics use pixels, while vector graphics use paths.

  • JPEG is lossy and suited to photographs; PNG is lossless and supports transparency; GIF supports up to 256 colours and simple animation.

  • Common audio formats include MP3 and WAV; common video formats include MP4 and WebM; compression reduces file size for transmission.

  • HTTP is a request-response protocol; GET sends data in the URL, while POST sends data in the request body.

  • A URL contains scheme, host, optional port, path, query string, and fragment; the browser uses DNS and HTTP to retrieve the page.