Comprehensive Computing Study Guide for Senior High Schools

Boolean Algebra

  • Introduction to Boolean Logic and Logic Gates

    • Boolean logic is a method for making decisions using simple statements categorized as either true (11) or false (00).
    • Logic gates are fundamental components within a computer that make decisions based on received inputs. These gates are connected via circuits to form complex networks.
    • A logic circuit is a path that allows signals to flow, facilitating various operations within a computer.
    • The logic gate layout conventionally places inputs on the right side of the gate and outputs on the left side.
  • Core Logic Gates and Truth Tables

    • NAND Gate (Not AND): Produced by combining an AND gate with a NOT gate to reverse the AND operation. For example, a NAND gate can be used in a sensor system for a water tank to control a pump automatically when it is full or empty.
    • NOR Gate (Not OR): Produced by applying NOT logic to an OR logic output. These are commonly used in automated streetlights to control lighting based on ambient brightness or darkness.
    • XOR Gate (Exclusive OR): A combination of (∼A AND B\sim A \text{ AND } B) and (A AND ∼BA \text{ AND } \sim B) with the OR logic operator. This gate compares two inputs; if they match, the output is low, and if they differ, it is high. Real-world application includes ATM passcode verification, where the card locks if the input does not match the stored passcode.
    • Basic Gates Recap:
    • AND: Output is 11 only if both inputs are 11.
    • OR: Output is 11 if at least one input is 11.
    • NOT: Reverses the input (0→10 \rightarrow 1 and 1→01 \rightarrow 0).
  • Boolean Expressions and Laws

    • A Boolean expression is a mathematical statement using logical operators to evaluate binary values.
    • Notation:
    • AND: ∧\wedge or ..
    • OR: ∨\vee or ++
    • NOT: ¬\neg or ∼\sim
    • Identity Law: A variable remains unchanged when ANDed with 11 or ORed with 00.
    • A∧1=A⋅1=AA \wedge 1 = A \cdot 1 = A
    • B∨0=B+0=BB \vee 0 = B + 0 = B
    • De Morgan’s Laws: Defines the interaction between negation and logical operators.
    • First Law: ¬(A∨B)=(A+B)′=A′∧B′=NOT A AND NOT B\neg(A \vee B) = (A + B)' = A' \wedge B' = \text{NOT } A \text{ AND NOT } B.
    • Second Law: ¬(A∧B)=(A⋅B)′=A′∨B′=NOT A OR NOT B\neg(A \wedge B) = (A \cdot B)' = A' \vee B' = \text{NOT } A \text{ OR NOT } B.
    • Normal Forms:
    • Disjunctive Normal Form (DNF): Expressions combining terms with OR (∨\vee). If any part is true, the entire expression is true. Example: (A∧B)∨(∼A∧B)∨(A∧∼B)(A \wedge B) \vee (\sim A \wedge B) \vee (A \wedge \sim B).
    • Conjunctive Normal Form (CNF): Expressions combining terms with AND (∧\wedge). All parts must be true for the whole to be true. Example: (A∨B)∧(∼A∨B)∧(A∨∼B)(A \vee B) \wedge (\sim A \vee B) \wedge (A \vee \sim B).

Arithmetic Operations in Computing

  • Addition (++): Combining numbers to find a total.

    • Commutative Property: a+b=b+aa + b = b + a.
    • Associative Property: a+(b+c)=(a+b)+ca + (b + c) = (a + b) + c.
    • Identity Property: a+0=aa + 0 = a. Zero is the additive identity.
  • Subtraction (−-): Finding the difference between numbers.

    • Non-commutative: a−b≠b−aa - b \neq b - a.
    • Non-associative: (a−b)−c≠a−(b−c)(a - b) - c \neq a - (b - c).
  • Multiplication (×\times or ∗*): Performing repeated addition. In computing, the asterisk symbol (∗*) is used.

    • Properties: Commutative (a×b=b×aa \times b = b \times a), Associative ((a×b)×c=a×(b×c)(a \times b) \times c = a \times (b \times c)), and Identity (a×1=aa \times 1 = a).
    • Distributive Property: a(b+c)=(a×b)+(a×c)a(b + c) = (a \times b) + (a \times c).
  • Division (// or ÷\div): Splitting a number into equal parts.

    • Properties: Non-commutative, non-associative, and Identity (a/1=aa / 1 = a).
    • Distributive: a/(b×c)=(a/b)×(a/c)a / (b \times c) = (a / b) \times (a / c).
  • PEMDAS (Order of Operations):

    • P: Parentheses (Simplify first).
    • E: Exponents (Powers and roots).
    • M/D: Multiplication and Division (Work left to right).
    • A/S: Addition and Subtraction (Work left to right).
    • Example solution: 4+2×(9+18)÷32−54 + 2 \times (9 + 18) \div 3^2 - 5
    • Parentheses: 9+18=279 + 18 = 27
    • Exponent: 32=93^2 = 9
    • Multiplication: 2×27=542 \times 27 = 54
    • Division: 54÷9=654 \div 9 = 6
    • Addition/Subtraction: 4+6−5=54 + 6 - 5 = 5

Hardware, Software, and Barcodes

  • Barcodes: A series of black and white lines of varying widths representing unique numbers used to track products in supply chains or libraries.

    • EAN-13 (International Article Number): Consists of 13 digits. Ghana uses the GHBS-13 (Ghana Barcode System of Group 13), enhanced for local needs.
    • UPC-A: 12-digit barcodes used primarily in the USA and Canada retail sectors.
    • ITF-14 (Interleaved Two of Five): 14-digit codes used on shipping cartons and pallets. Also called Global Trade Item Numbers (GTIN-14).
    • ISBN (International Standard Book Number): Barcodes for books. Expanded from 10 to 13 digits in 2007 to fit the EAN system, typically starting with 978 or 979.
    • ISSN (International Standard Serial Number): 8-digit unique identifiers for magazines and journals.
  • QR (Quick Response) Codes: Two-dimensional barcodes made of squares in a grid.

    • Capacity: Can store 7,089 numeric or 4,296 alphanumeric characters.
    • Error Correction: Built-in capability allowing codes to be damaged by up to 30% and still remain readable.
    • Common Version: Version 2 (25x25 data modules).
  • Software Categories:

    • System Software: Controls physical computer components and runs other programs. Includes Operating Systems (Windows 10/11, Red Hat, Fedora, Ubuntu, Monterey, Sonoma), device drivers (translators for hardware), firmware (embedded control), and utilities (antivirus, disk cleanup).
    • Application Software: Designed for specific tasks. Examples: MS Word (Word processing), Excel (Spreadsheets), Chrome (Web browsing), VLC Player (Media), and Photoshop (Graphics).
  • Operating System Functions: Manages process management, I/O devices, files, networking, main memory (RAM), secondary storage, and security.

Network Systems and Topologies

  • LAN Principles:

    • Scalability: Ability to grow using modular devices and a three-layer model (core backbone, distribution routing, access end-device connectivity).
    • Performance: Measured by data load handling and low latency; utilizes high-speed links like Gigabit Ethernet and Cat5e or Cat6 cables.
    • Security: Involves firewalls, updated antivirus/anti-malware, strong passwords, and encryption.
  • Network Scope:

    • CAN (Campus Area Network): Connects several LANs within a small area like a school.
    • MAN (Metropolitan Area Network): Connects LANs within a city (e.g., GCB bank nationwide).
    • WAN (Wide Area Network): Spans large distances across countries using leased lines or satellites.
  • Network Devices:

    • Routers: Traffic directors that determine the best path for data packets and assign IP addresses.
    • Switches: Connect devices within the same LAN using MAC addresses to reduce unnecessary traffic.
    • Multiplexers: Combine several signals into one medium to improve bandwidth usage.
  • Internet Protocol (TCP/IP):

    • TCP (Transmission Control Protocol): Breaks data into packets, tracks arrival order, and requests re-transmission of lost data.
    • IP (Internet Protocol): Directs packets to their destination using unique addresses.
    • IPv4 vs IPv6: IPv4 uses 32-bit addresses (dotted decimal, ~4.3 billion addresses). IPv6 uses 128-bit addresses (hexadecimal, ~340 undecillion addresses) for greater security and capacity.
  • Configuration and Security:

    • DHCP: Dynamically assigns IP addresses, subnet masks, and default gateways.
    • DNS (Domain Name System): Translates human-readable domain names (www.google.com) into numeric IP addresses (8.8.8.8).
    • SSL/TLS: Encrypts data between computers and websites to protect sensitive information.
    • VPN (Virtual Private Network): Creates a secure, encrypted tunnel for internet usage, hiding the user's IP.

Main Memory and Data Structures

  • RAM (Random Access Memory): Volatile short-term memory that stores active data and programs. Measured in Gigabytes (GB) and speed in Megahertz (MHz). Current types include DDR4, DDR5, and SDRAM.

  • Data Types:

    • Integers: Whole numbers (e.g., −10,0,40-10, 0, 40).
    • Floats: Numbers with decimal points for accuracy (e.g., 0.142,567.140.142, 567.14).
    • Characters: Single symbols or letters.
    • Pointers: Store the memory address where data is located.
    • Booleans: True or false values used in decision-making.
  • Data Structures Hierarchy:

    • Sequential:
    • Arrays: Collection of same-type items stored in order at nearby memory locations accessible via an index.
    • Linked Lists: Series of nodes where each contains data and a reference (link) to the next node.
    • Stacks: Follows Last In First Out (LIFO) principle; adding is "push" and removing is "pop".
    • Queues: Follows First In First Out (FIFO) principle; adding is "enqueue" and removing is "dequeue".
    • Tree-based: A hierarchical branching structure.
    • Binary Tree: Each node has up to two children.
    • Binary Search Tree (BST): Left child contains a smaller value, right child contains a larger value.
    • Graph-based: Networks of vertices (nodes) connected by edges.
    • Undirected: Bidirectional links.
    • Directed (Digraph): One-way relationships.
    • Weighted: Edges have associated costs (distance/time).
    • Hash-based:
    • Hash Table: Uses a hash function to turn a key into a distinct address or bucket.
    • Collisions: Handled by chaining (linked lists at same index) or open addressing (searching for the next free slot).
    • Map/Dictionary: Pairings of unique keys with specific values.

Programming Concepts and Machine Learning

  • Python Programming Foundations:

    • Variables: Storage containers with naming rules (snake_case, starts with letter/underscore, case-sensitive). Reserved words like if or for cannot be used.
    • Comments: Used for human clarification. Single-line uses #, multi-line uses ''' or """.
    • Arithmetic Operators: Add (+), subtract (-), multiply (*), divide (/), modulus (% for remainders), exponent (**).
    • Comparison Operators: Equal (==), not equal (!=), greater than (>), less than (<), greater/equal (>=), less/equal (<=).
    • Control Structures:
    • Conditional Statements: if, if-else, and if-elif-else.
    • Loops: for loops (fixed number of repeats) and while loops (repeats while a condition is true).
    • Recursion: A function calling itself to solve a problem, reliant on a base case to prevent infinite loops.
  • Machine Learning (ML): Teaching computers to learn from data without explicit programming.

    • Types:
    • Supervised: Learning from labeled data (e.g., image classification).
    • Unsupervised: Finding patterns in unlabeled data using clustering (e.g., customer segmentation).
    • Reinforcement: Learning by trial and error using rewards and penalties (e.g., robot navigation).
    • Libraries:
    • NumPy: Handles large arrays and math operations.
    • Pandas: Designed for structured table data analytics.
    • Scikit-Learn (Sklearn): Provides tools for statistical modeling and mining.
    • Ethics: Addressing bias (unfair training data), ensuring fairness (equal treatment for groups), protecting privacy (anonymization), and maintaining accountability for mistakes.

Web Technologies and Databases

  • Web Development Types:

    • Static Websites: Fixed content that stays the same for everyone; easier and cheaper to build.
    • Dynamic Websites: Advanced and interactive; content changes based on user input or databases (e.g., Jumia, Facebook).
  • Editors:

    • WYSIWYG (What You See Is What You Get): Drag-and-drop interfaces (e.g., Adobe Dreamweaver, WordPress, Wix).
    • Code Editors: For manual writing with syntax highlighting and debugging (e.g., Visual Studio Code, Sublime Text, Atom).
  • HTML (HyperText Markup Language): Structures web content using elements (containers like <p>text</p>) and empty tags (like <br>).

    • Structure: Includes <!DOCTYPE html>, <html>, <head>, <title>, and <body>.
    • Tags: Headings (<h1>-<h6>), Paragraphs (<p>), Links (<a> with href), Images (<img> with src and alt), Lists (<ul>, <ol>, <li>), and Tables (<table>, <tr>, <td>, <th>).
  • CSS (Cascading Style Sheets): Controls the presentation layer.

    • Syntax: Consists of a selector (e.g., p) and a declaration block {color: blue;}.
    • Application Types: Inline (within element tags), Internal (in the head section), and External (separate .css file).
  • Responsive and Accessible Design:

    • Responsive Principles: Fluid grid layouts (using %), flexible images (max-width: 100%), and media queries.
    • Accessibility (WCAG): Websites must be Perceivable (seen/heard), Operable (keyboard navigation), Understandable, and Robust (compatible with screen readers).
  • E-commerce Components:

    • Shopping Carts: Comprised of a cart container, item list, controls, and price summary.
    • Payment Gateways: Digital cashiers for secure transactions. Local Ghanaian examples include Hubtel, ExpressPay, Slydepay, iPay, Paystack, Flutterwave, MTN MoMo API, Zeepay, and Global Accelerex.
    • Security: Confidentiality (encryption), Integrity (accurate data), Availability (system uptime). Includes password hashing and salting, and multi-factor authentication (2FA/MFA).
    • CAPTCHA: (Completely Automated Public Turing Test to Tell Computers and Humans Apart) prevents automated bots from accessing registration or payment systems.
  • Relational Databases (MySQL):

    • Primary Key: A unique, non-null, immutable identifier for a record.
    • Foreign Key: A column that references a primary key in another table to establish relationships (One-to-Many or Many-to-Many).
    • SQL Commands: SELECT (retrieve), INSERT (add), UPDATE (modify), DELETE (remove). Queries use clauses like WHERE for filtering and JOIN for combining tables.