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 () or false ().
- 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 () and () 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 only if both inputs are .
- OR: Output is if at least one input is .
- NOT: Reverses the input ( and ).
Boolean Expressions and Laws
- A Boolean expression is a mathematical statement using logical operators to evaluate binary values.
- Notation:
- AND: or
- OR: or
- NOT: or
- Identity Law: A variable remains unchanged when ANDed with or ORed with .
- De Morgan’s Laws: Defines the interaction between negation and logical operators.
- First Law: .
- Second Law: .
- Normal Forms:
- Disjunctive Normal Form (DNF): Expressions combining terms with OR (). If any part is true, the entire expression is true. Example: .
- Conjunctive Normal Form (CNF): Expressions combining terms with AND (). All parts must be true for the whole to be true. Example: .
Arithmetic Operations in Computing
Addition (): Combining numbers to find a total.
- Commutative Property: .
- Associative Property: .
- Identity Property: . Zero is the additive identity.
Subtraction (): Finding the difference between numbers.
- Non-commutative: .
- Non-associative: .
Multiplication ( or ): Performing repeated addition. In computing, the asterisk symbol () is used.
- Properties: Commutative (), Associative (), and Identity ().
- Distributive Property: .
Division ( or ): Splitting a number into equal parts.
- Properties: Non-commutative, non-associative, and Identity ().
- Distributive: .
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:
- Parentheses:
- Exponent:
- Multiplication:
- Division:
- Addition/Subtraction:
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., ).
- Floats: Numbers with decimal points for accuracy (e.g., ).
- 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
iforforcannot 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, andif-elif-else. - Loops:
forloops (fixed number of repeats) andwhileloops (repeats while a condition is true). - Recursion: A function calling itself to solve a problem, reliant on a base case to prevent infinite loops.
- Variables: Storage containers with naming rules (snake_case, starts with letter/underscore, case-sensitive). Reserved words like
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>withhref), Images (<img>withsrcandalt), Lists (<ul>,<ol>,<li>), and Tables (<table>,<tr>,<td>,<th>).
- Structure: Includes
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
.cssfile).
- Syntax: Consists of a selector (e.g.,
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).
- Responsive Principles: Fluid grid layouts (using %), flexible images (
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 likeWHEREfor filtering andJOINfor combining tables.