BSEH Secondary Computer Science study materials
BSEH Secondary Computer Science study resources

BSEH Secondary Computer Science cheat sheet

BSEH Secondary Computer Science · Keep the key ideas within reach.

Quick reference

Computer Fundamentals and Number Systems

  • Decimal to binary: repeatedly divide by 2 and record remainders from last to first; e.g., 13 → 1101.

  • Binary to decimal: multiply each bit by 2^position (rightmost position 0) and sum; e.g., 1101 = 8+4+1 = 13.

  • Hexadecimal digits 0–9 and A–F represent values 0–15; each hex digit maps to exactly 4 binary bits (A=1010, F=1111).

  • Octal digits 0–7 map to 3 binary bits each; group binary bits in threes from the right to convert.

  • 1 KB = 1024 bytes, 1 MB = 1024 KB, 1 GB = 1024 MB, 1 TB = 1024 GB (binary prefixes).

  • Two's complement: invert all bits of a positive binary number and add 1 to get its negative; n-bit range is −2^(n−1) to 2^(n−1)−1.

  • 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.

  • ASCII uses 7 bits (128 characters); Unicode extends to represent characters of most writing systems.

Quick reference

Computer Hardware

  • CPU components: ALU performs arithmetic/logic, control unit fetches/decodes/executes instructions, registers hold temporary data.

  • Fetch–decode–execute cycle: instruction fetched from memory, decoded by control unit, executed by ALU, result stored.

  • RAM is volatile and holds running programs/data; ROM is non-volatile and stores firmware such as BIOS.

  • Cache memory (L1/L2/L3) is faster and smaller than RAM and stores frequently used data to reduce access time.

  • Primary storage: RAM, ROM, cache. Secondary storage: HDD, SSD, optical discs, USB drives - non-volatile.

  • Input devices convert user data into machine-readable form (keyboard, mouse, scanner); output devices present results (monitor, printer).

  • Motherboard connects CPU, RAM, storage, and peripherals via buses (data bus, address bus, control bus).

  • SSD vs HDD: SSD uses flash memory with no moving parts, faster access, lower power; HDD uses magnetic platters.

Quick reference

Software and Operating System Basics

  • System software includes operating systems, device drivers, and utilities; application software performs user tasks.

  • OS functions: process management, memory management, file system management, device management, user interface, security.

  • Multitasking: OS rapidly switches CPU among processes; multiprocessing uses two or more CPUs simultaneously.

  • GUI uses windows, icons, menus, pointers; CLI accepts typed commands.

  • File path: absolute path starts from root (e.g., /home/user/file.txt); relative path starts from current directory.

  • File extensions indicate format: .txt (text), .exe (executable), .py (Python source), .cpp (C++ source), .docx (document).

  • Utility programs include antivirus, disk cleanup, backup, and compression tools.

  • Open-source software provides source code for modification; proprietary software restricts access and modification.

Quick reference

Programming Fundamentals and Problem Solving

  • Algorithm: finite sequence of unambiguous steps that solves a problem; must terminate.

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

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

  • Variable: named memory location whose value can change; constant: value fixed at declaration.

  • Data types: integer, float, string, Boolean; each determines allowed operations and storage.

  • Operator precedence (typical): parentheses → exponent → multiplication/division → addition/subtraction; comparison and logical operators follow.

  • Dry run / trace table: manually track variable values step by step to verify an algorithm.

  • Debugging: syntax errors violate language rules; logic errors produce wrong output despite valid syntax; runtime errors occur during execution.

Quick reference

Programming in a High-Level Language (Python/C++)

  • Python indentation defines blocks; C++ uses braces { } and semicolons ; to end statements.

  • Python input() returns a string; convert with int() or float() before arithmetic.

  • Python range(start, stop, step) excludes stop; range(1,5) yields 1,2,3,4.

  • C++ variable declaration requires a type: int x = 5; Python assigns dynamically: x = 5.

  • Python list indexing starts at 0; negative indices count from the end (−1 is last element).

  • C++ for loop: for (int i = 0; i < n; i++) { ... }; Python equivalent: for i in range(n):

  • Function definition: Python def name(params): ...; C++ return_type name(params) { ... }.

  • String concatenation: Python uses + or f-strings; C++ uses + for std::string or << for output.

Quick reference

Data Handling

  • Mean = sum of values ÷ number of values; median = middle value when ordered; mode = most frequent value.

  • Data types in spreadsheets/databases: text, number, date/time, Boolean; choose type to enable correct sorting and calculations.

  • Spreadsheet cell reference: column letter + row number (e.g., B3); absolute reference uses $ (e.g., $B$3).

  • Common spreadsheet functions: SUM(range), AVERAGE(range), MAX(range), MIN(range), COUNT(range), IF(condition, true, false).

  • Sorting arranges records by a key; filtering displays only records meeting a condition.

  • Data validation restricts input to allowed values or ranges to reduce errors.

  • Chart types: bar for comparing categories, line for trends over time, pie for proportions of a whole.

  • Database record = row (one entity); field = column (one attribute); primary key uniquely identifies each record.

Quick reference

Files and Databases

  • File operations: open, read, write, append, close; always close files to flush buffers.

  • Python file modes: 'r' read, 'w' write (overwrites), 'a' append, 'r+' read/write; add 'b' for binary.

  • Text file stores characters encoded (e.g., ASCII/UTF-8); binary file stores raw bytes.

  • CSV file: comma-separated values; first row often contains field names.

  • DBMS: software to create, store, query, and manage databases; SQL is the standard query language.

  • SQL basics: SELECT columns FROM table WHERE condition; INSERT INTO table VALUES (...); UPDATE table SET column=value WHERE ...; DELETE FROM table WHERE ...;

  • Relational database: data organized in tables linked by keys; foreign key references a primary key in another table.

  • Backup and restore protect data; file compression reduces storage size.

Quick reference

Computer Networks and Internet Basics

  • LAN covers a small area (room/building); WAN covers large geographic areas; the Internet is a global WAN.

  • IP address identifies a device on a network; IPv4 is 32-bit (four octets), IPv6 is 128-bit.

  • DNS translates domain names (e.g., example.com) into IP addresses.

  • HTTP/HTTPS transfer web pages; HTTPS encrypts traffic with TLS.

  • URL components: protocol://domain/path?query#fragment.

  • Network topologies: star (central switch), bus (shared backbone), ring (closed loop), mesh (redundant links).

  • Bandwidth = maximum data transfer rate; latency = delay in data transmission.

  • Router forwards packets between networks; switch connects devices within a LAN; modem converts signals for ISP connection.

Quick reference

Cyber Safety, Ethics and Digital Citizenship

  • Strong password: long, mixed case, digits, symbols, not a dictionary word; use unique passwords per account.

  • Phishing: fraudulent messages trick users into revealing credentials; verify sender and links before clicking.

  • Malware types: virus (attaches to files), worm (self-replicates over networks), Trojan (disguised as legitimate software), ransomware (encrypts data for payment).

  • Two-factor authentication adds a second verification step beyond a password.

  • Digital footprint: permanent record of online activity; posts and searches may be stored indefinitely.

  • Copyright protects original works; plagiarism is presenting others' work as one's own; cite sources.

  • Cyberbullying: repeated harmful behavior online; report and block, preserve evidence.

  • Personal data protection: share minimal personal information; review privacy settings; be cautious on public Wi-Fi.

Quick reference

Emerging Technologies and Applications of Computing

  • Artificial intelligence: systems performing tasks requiring human-like intelligence; machine learning learns patterns from data.

  • Internet of Things (IoT): network of physical devices with sensors/software exchanging data.

  • Cloud computing: on-demand delivery of computing resources over the Internet (IaaS, PaaS, SaaS).

  • Blockchain: distributed ledger of linked blocks secured by cryptography; used for cryptocurrencies and records.

  • Virtual reality (VR) immerses users in simulated environments; augmented reality (AR) overlays digital information on the real world.

  • Big data: very large datasets analyzed for patterns; characterized by volume, velocity, variety.

  • Robotics combines sensors, actuators, and control programs to perform physical tasks.

  • 5G: fifth-generation mobile network offering higher speed and lower latency than 4G.

Quick reference

Practical/Laboratory Skills and Project Work

  • Before starting a practical, read the task, identify inputs, expected outputs, and constraints.

  • Test data should include normal, boundary, and invalid cases to verify program correctness.

  • Debugging steps: reproduce error, isolate cause, fix, retest.

  • Comment code to explain purpose; use meaningful variable names.

  • Project documentation: aim, requirements, design, implementation, testing, evaluation.

  • Save work frequently and use versioned filenames or version control.

  • Follow lab safety: no food/drink near equipment, shut down properly, report faults.

  • Cite all external sources and assets used in project work; respect software licenses.