Introduction to Computer Science

Introduction to Computer Science

  • Overview of the syllabus covering fundamental concepts in computer science.
  • Major sections include:
    • Section 1: Introduction to Computer Science
    • Section 2: Computational Thinking
    • Section 3: Algorithms and Pseudocode
    • Section 4: Operating Systems and File Systems
    • Section 5: Computer Architecture

Section 1: Introduction to Computer Science

Lesson 1: Introduction to Computer Science

Lesson 1.1: Data Types
  • Lesson Objectives:
    • Identify fundamental data types.
  • Lesson Reading: Computer Science Illuminated (pages 54-76)
  • Key Terms:
    • Analog Data (pg. 57): Data represented in a continuous and variable form.
    • Example: The varying voltage in an analog thermometer reading.
    • ASCII (American Standard Code for Information Interchange) [pg. 69]: A standard encoding system for text characters that uses numeric values to represent letters, numbers, and symbols.
    • Example: The letter “A” is represented as 65 in ASCII.
    • Bandwidth (pg. 56): The maximum rate of data transfer across a network or communication channel, usually measured in bits per second.
    • Example: A 100 Mbps internet connection can transfer 100 million bits per second.
    • Binary: A numerical system that uses only two digits, 0 and 1, to represent data in computing.
    • Example: The number 5 in binary is 101.
    • Boolean Expression: A logical statement that can only be true or false, using operators like AND, OR, and NOT.
    • Example: (x > 5) AND (y < 10) evaluates to true or false.
    • Character: A single letter, digit, or symbol used in writing text.
    • Example: ‘A’, ‘3’, or ‘#’.
    • Character Set (pg. 69): A collection of characters that a computer can recognize and process, like ASCII or Unicode.
    • Example: Unicode includes characters from multiple languages such as English, Chinese, and Arabic.
    • Compression Ratio (pg. 57): The size of the compressed data divided by the size of the original data.
    • Example: A 10 MB file compressed to 2 MB has a compression ratio of 5:1.
    • Control Structure: Programming constructs that control the flow of execution, such as loops and conditional statements.
    • Example: if statements and for loops.
    • Data (pg. 56): Raw facts and figures that can be processed to produce meaningful information.
    • Example: A list of temperatures recorded each day.
    • Data Compression (pg. 57): The process of reducing the size of data to save storage space or transmission time.
    • Example: Zipping a large folder of files.
    • Data Types (pg. 56): Categories of data that define what kind of value can be stored and how it can be used, like integers, floats, and strings.
    • Example: int age = 25; float price = 19.99;
    • Declaration: A programming statement that specifies the name and type of a variable or function without assigning a value.
    • Example: int count; declares a variable named count of type integer.
    • Digital Data (pg. 57): Data represented using discrete binary values (0s and 1s).
    • Example: A digital photo stored as pixels in a computer.
    • Floating Point (pg. 66): A way to represent real numbers with fractional parts using a format that includes a base and an exponent.
    • Example: 3.14 stored as a floating-point number.
Lesson 1.2: Variables
  • Lesson Objectives: Explain the concepts of variables and assignments in programming.
  • Lesson Reading: Programming Logic and Design (pages 29-35)
  • Key Terms:
    • Alphanumeric Values (pg. 30): Characters that include both letters (A–Z) and numbers (0–9).
    • Example: "A7B3" contains alphanumeric values.
    • Assignment Operator (pg. 34): A symbol used to assign a value to a variable, typically =.
    • Example: x = 10 assigns 10 to x.
    • Assignment Statement (pg. 34): A line of code that assigns a value to a variable.
    • Example: score = 95.
    • Binary Operator (pg. 34): An operator that takes two operands, such as +, -, *, or /.
    • Example: 3 + 5 uses + as a binary operator.
    • Camel Casing (pg. 32): A naming convention where the first letter is lowercase and each subsequent word starts with an uppercase letter.
    • Example: myVariableName.
    • Garbage (pg. 34): Unused or leftover data in memory that the program no longer needs or references.
    • Example: Memory from deleted objects in a program.
    • Hungarian Notation (pg. 32): A naming convention where a variable name starts with a prefix indicating its type.
    • Example: strName indicates a string variable.
    • Identifier (pg. 32): A name given to a variable, function, or other item in code to identify it.
    • Example: totalScore is an identifier.
    • Initializing a Variable (pg. 34): Assigning an initial value to a variable when it is declared.
    • Example: int x = 10;.
    • Kebab Case (pg. 32): A naming convention where words are all lowercase and separated by hyphens.
    • Example: my-variable-name.
    • Keyword (Reserved Word) (pg. 32): A reserved word in a programming language with a specific meaning that cannot be used as an identifier.
    • Example: if, while, class.
    • Lvalue (pg. 34): An expression that refers to a memory location and can appear on the left side of an assignment.
    • Example: x in x = 5.
    • Mixed Case with Underscores (pg. 32): A naming convention combining uppercase and lowercase letters with underscores between words.
    • Example: MyVariableName.
    • Numeric Constant (pg. 30): A fixed number value written directly in the code.
    • Example: 42.
    • Numeric Variable (pg. 31): A variable that holds a number value.
    • Example: int score = 100;.
Lesson 1.3: Constructs
  • Lesson Objectives: Differentiate how branches guide program flow through condition-based decisions versus how iteration repeats code blocks until conditions are met.
  • Lesson Reading: Computer Science Illuminated (pages 169-177)
  • Key Terms:
    • Abstract Step: A high-level action in an algorithm that describes what needs to be done without detailing how to do it.
    • Example: “Sort the list of names” is an abstract step without specifying the sorting method.
    • Algorithm (pg. 169): A step-by-step set of instructions designed to perform a specific task or solve a problem.
    • Example: Instructions to calculate the average of a list of numbers.
    • Branch: A point in an algorithm where a decision is made, leading to different actions based on conditions.
    • Example: An if-then statement that executes different code depending on a user’s input.
    • Infinite Loop: A loop that never ends because the termination condition is never met or is incorrectly written.
    • Example: A loop that keeps running because the stop condition is missing.
    • Input (pg. 170): Data that are provided to a program for processing.
    • Example: User typing a number into a calculator program.
    • Loop Control Variable: A variable that determines whether a loop will continue running or stop, often incremented or modified within the loop.
    • Example: i in for i = 0 to 10.
    • Nested Structure: A programming construct where one control structure is placed inside another.
    • Example: A for loop inside an if statement.
    • Output (pg. 170): Data that are produced by a program and presented to the user or another system.
    • Example: Printing “Hello, World!” to the screen.
    • Pretest Loop: A loop that evaluates its condition before executing the body of the loop.
    • Example: A while loop that checks a condition before running.
    • Pseudocode (pg. 169): A simplified, human-readable version of a program’s logic that outlines what the program does without strict syntax rules.
    • Example: Describing steps like “Check if score >= 60, then print Pass, else print Fail.”
Lesson 1.4: Operators
  • Lesson Objective: Identify fundamental mathematic operators and order of operations.
  • Lesson Reading: Programming Logic and Design (pages 36-38)
  • Key Terms:
    • Left-to-Right Associativity (pg. 37): The rule that operators with the same precedence are evaluated from left to right in an expression.
    • Example: In 10 - 3 + 2, subtraction happens first, then addition.
    • Magic Number (pg. 36): A hard-coded number in a program that lacks context or explanation, making the code harder to understand and maintain.
    • Example: Using 3.14 directly in calculations instead of a named constant for π.
    • Named Constant (pg. 36): A variable with a value that is set once and cannot be changed, used to give meaningful names to fixed values.
    • Example: const PI = 3.14.
    • Overhead (pg. 36): The extra processing time, memory, or other resources required by a program beyond the actual task it is performing.
    • Example: Additional memory used to manage a dynamic array.
    • Rules of Precedence (Order of Operations) (pg. 37): The rules that define the sequence in which different operations are performed in an expression to ensure consistent results.
    • Example: In 2 + 3 * 4, multiplication happens before addition, giving 14 instead of 20.

Lesson 2: Data Structures and Functions

Lesson 2.1: Data Structures
  • Lesson Objective: Identify fundamental data structures such as arrays, linked lists, stacks, and queues.
  • Lesson Readings: Computer Science Illuminated (pages 204-205, pages 238-244)
  • Key Terms:
    • Abstract Data Type (pg. 240): A blueprint for organizing and working with data that defines what operations can be performed on the data without specifying how they are implemented.
    • Example: A “Stack” abstract data type defines push and pop operations without saying how it’s stored in memory.
    • Array (pg. 204): A collection of items stored in a contiguous memory block, each identified by an index number, allowing for efficient access based on position.
    • Example: numbers[0] = 5 stores 5 in the first position of an array.
    • Composite Variable: A variable that can hold multiple pieces of data, often grouped together under a single name.
    • Example: A record containing a student’s name, ID, and GPA.
    • Container (pg. 240): A data structure that holds a collection of elements, providing methods to add, remove, and access items.
    • Example: A list or array that stores multiple values.
    • Data Structure (pg. 240): A way of organizing and storing data in a computer's memory to enable efficient retrieval, insertion, and deletion.
    • Example: Using a linked list to manage a playlist of songs.
    • Linked List: A sequence of elements where each element points to the next one, forming a chain.
    • Example: A list of nodes representing train cars, each pointing to the next car.
    • Linked Structure (pg. 242): Any structure composed of elements connected by links or pointers, enabling dynamic relationships among data elements.
    • Example: A family tree where each person points to their children.
    • List (pg. 242): A collection of items arranged in a linear sequence, allowing for easy access, insertion, and deletion.
    • Example: A shopping list with items you can add or remove.
    • Queue (pg. 241): A data structure that follows first-in, first-out (FIFO) order; elements are added to the back and removed from the front.
    • Example: People standing in line at a ticket counter.
    • Record (pg. 205): A data structure that groups related pieces of information under a single name, typically consisting of multiple fields or attributes.
    • Example: A student record with name, ID, and GPA fields.
    • Stack (pg. 240): A data structure that follows last-in, first-out (LIFO) order; elements are added and removed from the same end, known as the top.
    • Example: A stack of plates where you take the top plate first.
Lesson 2.2: Subprograms
  • Lesson Objective: Describe the role and application of functions.
  • Lesson Reading: Computer Science Illuminated (pages 263-269)
  • Key Terms:
    • Argument (pg. 263): The actual value or data you pass to a function or subprogram when you call it.
    • Example: In print("Hello"), "Hello" is the argument.
    • Parameter (pg. 263): A variable in a function or subprogram definition that acts as a placeholder for the value (argument) you pass when calling the function.
    • Example: In def greet(name):, name is the parameter.
    • Parameter List (pg. 263): A set of parameters defined in a function or subprogram specifying the number and types of inputs the function can accept.
    • Example: def add(x, y): has a parameter list with two parameters.
    • Reference Parameter (pg. 264): A parameter type that allows a function to modify the actual variable passed to it.
    • Example: In some languages like C++, void doubleValue(int &num) changes the original variable.
    • Subprogram (Function) [pg. 263]: A block of code that performs a specific task and can be reused.
    • Example: A calculateTotal() function that adds up item prices.
    • Value Parameter (pg. 264): A parameter type that passes a copy of the argument’s value to the function, preventing changes to the original variable.
    • Example: In Python, arguments are passed by value for immutable types like integers.

Lesson 3: Object-Oriented Programming

Lesson 3.1: Object-Oriented Programming Basics
  • Lesson Objective: Describe the basic characteristics of object-oriented versus structured programming.
  • Lesson Reading: Computer Science Illuminated (pages 278-315)
  • Key Terms:
    • Asynchronous (pg. 311): An operation that runs independently of the main program flow, allowing other tasks to happen without waiting for it to complete.
    • Example: Loading data from a server while the rest of a program keeps running.
    • Bytecode (pg. 290): Low-level, platform-independent code that’s executed by a virtual machine, produced when source code is compiled.
    • Example: Java code is compiled into bytecode for the JVM.
    • Case Sensitive (pg. 303): When a programming language treats uppercase and lowercase letters as different.
    • Example: In Python, Variable and variable are not the same.
    • Class (pg. 280): A blueprint for creating objects, defining their properties and behaviors.
    • Example: A Car class might have speed and color attributes.
    • Compiler (pg. 289): A program that translates high-level source code into machine code or bytecode.
    • Example: C++ uses a compiler to create an executable file.
    • Encapsulation (pg. 282): Bundling data and the methods that operate on it into a single unit (a class) and restricting direct access to some parts.
    • Example: Making class attributes private and accessing them via methods.
    • Field (pg. 280): A variable that belongs to a class or an object, representing data stored in that object.
    • Example: self.name in a Python class is a field.
    • Inheritance (pg. 314): Creating a new class based on an existing one, reusing and extending its properties and methods.
    • Example: class Dog(Animal) inherits from Animal.
    • Instantiate (pg. 313): To create a specific instance (object) of a class.
    • Example: myCar = Car() creates an object of the Car class.
    • Interpreter (pg. 291): A program that executes source code directly, translating it line by line.
    • Example: Python uses an interpreter rather than a compiler.
    • Method (pg. 280): A function defined inside a class that represents an object’s behavior.
    • Example: drive() inside a Car class.
    • Object (pg. 280): An instance of a class containing its own data and methods.
    • Example: car1 and car2 are different objects of the Car class.
    • Paradigm (pg. 293): A style or approach to programming, like object-oriented, procedural, or functional.
    • Example: Python supports multiple paradigms.
    • Polymorphism (pg. 315): Allows different classes to be treated as instances of a common superclass, often using the same method name for different behaviors.
    • Example: Different shapes can each have their own area() method.
    • Strong Typing (pg. 298): Enforces that each variable has a specific data type and cannot be freely mixed, helping prevent type errors.
    • Example: You can’t add a string and an integer directly in strongly typed languages.

Section 2: Computational Thinking

Lesson 1: Computational Thinking and the Software Development Lifecycle

Lesson 1.1: Computational Thinking
  • Lesson Objective: Describe the computer problem-solving process.
  • Lesson Reading: Computer Science Illuminated (pages 190-196)
  • Key Terms:
  • Computer Problem-Solving Process (pg. 193):
    1. Analysis and Specification Phase: Examining and understanding a problem thoroughly to identify its requirements, constraints, and objectives.
    • Example: Determining what inputs and outputs a program needs before coding.
    1. Algorithm Development Phase: A step-by-step procedure or set of rules designed to solve a specific problem or perform a particular task.
    • Example: A recipe for baking a cake is an algorithm.
    1. Implementation Phase: Writing code or programming to execute the designed solution using a specific programming language or tool.
    • Example: Coding a calculator program in Python based on a previously created design.
    1. Maintenance Phase: The ongoing process of keeping a system, machine, or software in good working condition.
    • Example: Updating a mobile app to fix bugs and add new features.
  • Design: Planning and creating a solution to a problem based on the analysis; often involves creating algorithms and data structures.
    • Example: Drawing a flowchart or writing pseudocode before writing actual code.
  • Testing (pg. 196): Evaluating the solution by running the program with different inputs to ensure it produces the expected outputs and behaves correctly.
    • Example: Entering various numbers into a calculator program to check that it adds correctly.
Lesson 1.2: The Software Development Life
  • Lesson Objective: Describe the software development lifecycle and methods for completing it.
  • Lesson Reading: Programming Logic and Design (pages 6-11)
  • Key Terms:
  • Software Development Lifecycle (pg. 6): A systematic process consisting of several phases that are followed to produce high-quality software.
    • Example: A project goes through analysis, design, implementation, testing, and maintenance stages.
  • Phases of the Software Development Lifecycle:
    1. Understand the problem.
    2. Plan the logic.
    3. Code the program.
    4. Translate the program into machine language.
    5. Test the program.
    6. Put the program into production.
    7. Maintain the program.
  • End User (pg. 7): The person who ultimately uses a software application or system.
    • Example: Someone using a mobile banking app to check their account balance.
  • Debugging (pg. 10): The process of identifying and fixing errors or "bugs" in the code that cause unexpected behavior or incorrect results.
    • Example: Correcting a program that crashes when dividing by zero.
  • Documentation (pg. 7): All the paperwork and notes needed to produce, maintain, and understand a program.
    • Example: Writing comments in code, user manuals, or system diagrams.

Lesson 2: Codes of Ethics and Conduct

Lesson 2.1: Codes of Ethics and Professional Conduct
  • Lesson Objective: Identify ethical violations in the computer science field.
  • Lesson Reading: Computer Science Illuminated (page 114)
  • Key Terms:
  • Code of Ethics: Professional code of conduct and ethical guidelines established by organizations and industry associations to govern the behavior of computer scientists and technology professionals.
    • Example: A programmer follows ethical guidelines to protect user data and avoid software piracy.
  • Institute of Electrical and Electronics Engineers (IEEE): An international organization focused on fostering innovation and excellence in electrical, electronics, and computing engineering.
    • To hold paramount the safety, health, and welfare of the public, to strive to comply with ethical design and sustainable development practices, and to disclose promptly factors that might endanger the public or the environment;
    • To avoid real or perceived conflicts of interest whenever possible, and to disclose them to affected parties when they do exist;
    • To be honest and realistic in stating claims or estimates based on available data;
    • To reject bribery in all its forms;
    • To improve the understanding by individuals and society of the capabilities and societal implications of conventional and emerging technologies, including intelligent systems;
    • To maintain and improve our technical competence and to undertake technological tasks for others only if qualified by training or experience, or after full disclosure of pertinent limitations;
    • To seek, accept, and offer honest criticism of technical work, to acknowledge and correct errors, and to credit properly the contributions of others;
    • To treat fairly all persons and to not engage in acts of discrimination based on race, religion, gender, disability, age, national origin, sexual orientation, gender identity, or gender expression;
    • To avoid injuring others, their property, reputation, or employment by false or malicious action;
    • To assist colleagues and co-workers in their professional development and to support them in following this code of ethics.
  • Association for Computing Machinery (ACM): An international organization dedicated to advancing computing as a science and profession
    • Contribute to society and to human well-being, acknowledging that all people are stakeholders in computing.
    • Avoid harm.
    • Be honest and trustworthy.
    • Be fair and take action not to discriminate.
    • Respect the work required to produce new ideas, inventions, creative works, and computing artifacts.
    • Respect privacy.
    • Honor confidentiality.
  • General Ethical Principles:
    • Professional Responsibilities:
    • 2.1 Strive to achieve high quality in both the processes and products of professional work.
    • 2.2 Maintain high standards of professional competence, conduct, and ethical practice.
    • 2.3 Know and respect existing rules pertaining to professional work.
    • 2.4 Accept and provide appropriate professional review.
    • 2.5 Give comprehensive and thorough evaluations of computer systems and their impacts, including analysis of possible risks.
    • 2.6 Perform work only in areas of competence.
    • 2.7 Foster public awareness and understanding of computing, related technologies, and their consequences.
    • 2.8 Access computing and communication resources only when authorized or when compelled by the public good.
    • 2.9 Design and implement systems that are robustly and usably secure.
    • Professional Leadership Principles:
    • 3.1 Ensure that the public good is the central concern during all professional computing work.
    • 3.2 Articulate, encourage acceptance of, and evaluate fulfillment of social responsibilities by members of the organization or group.
    • 3.3 Manage personnel and resources to enhance the quality of working life.
    • 3.4 Articulate, apply, and support policies and processes that reflect the principles of the Code.
    • 3.5 Create opportunities for members of the organization or group to grow as professionals.
    • 3.6 Use care when modifying or retiring systems.
    • 3.7 Recognize and take special care of systems that become integrated into the infrastructure of society.
    • Compliance with the Code:
    • 4.1 Uphold, promote, and respect the principles of the Code.
    • 4.2 Treat violations of the Code as inconsistent with membership in the ACM.
  • Privacy: Respecting and protecting individuals' privacy and confidentiality in the collection, storage, and use of personal data.
    • Example: Ensuring that a user's password is encrypted and not stored in plain text.
  • Professionalism: Demonstrating competence, responsibility, and accountability in all professional activities and interactions.
    • Example: Writing clear code, documenting it well, and meeting project deadlines.
  • Public Interest: Prioritizing the well-being and safety of the public in the design, development, and deployment of computing technology and systems.
    • Example: Designing software that prevents harm, like a reliable healthcare app.
  • Security: Ensuring the security and integrity of computing systems and data, taking measures to prevent unauthorized access, misuse, and harm.
    • Example: Implementing firewalls and secure authentication in a network system.

Lesson 3: Ethical and Societal Considerations

Lesson 3.1: Ethical and Societal Considerations in Computer Science
  • Key Terms:
    • Copyright: A legal right granted to the creators of original works—such as literature, music, and art—protecting the creator's work from being used without permission.
    • Example: A musician owns the copyright to their song, so others can’t legally distribute it without permission.
    • Cyberbullying: Harassment and intimidation conducted through digital platforms, including social media, messaging apps, and online forums.
    • Example: Posting threatening messages about someone online.
    • Cybercrime: Illegal activities conducted using computers and the internet, such as hacking, identity theft, and online fraud.
    • Example: Stealing credit card information through phishing emails.
    • Fair Use: A legal doctrine that allows the limited use of copyrighted material without permission under certain conditions.
    • Example: Using a short clip from a movie for educational commentary in a class.
    • File Sharing: The practice of distributing or providing access to digital files—such as documents, music, or software—over the internet or a network.
    • Example: Sharing a PDF of a report with classmates via Google Drive.
    • Intellectual Property: Creations of the mind, such as inventions, literary and artistic works, designs, symbols, names, and images.
    • Example: A software developer owns the intellectual property of an app they created.
    • Malware: Malicious software; any software designed to harm, exploit, or compromise the operation of computers, networks, or devices.
    • Example: A virus that deletes files from a computer.
    • Patent: A legal right granted to an inventor giving them exclusive control over the use and commercialization of their invention for a specific period.
    • Example: A company patents a new type of solar panel to prevent competitors from copying it.
    • Peer-to-Peer Networks: A decentralized network where each participant (peer) has equal privileges and can directly share resources, such as files, with other peers without needing a central server.
    • Example: Torrent networks used to share large media files.
    • Piracy: The unauthorized use, reproduction, or distribution of copyrighted materials, such as software, music, movies, and books.
    • Example: Downloading a movie illegally from the internet.
    • Trademark: A symbol, word, or phrase legally registered or established by use as representing a company or product.
    • Example: The Nike “swoosh” logo is a registered trademark.

Section 3: Algorithms and Pseudocode

Lesson 1: Algorithms

Lesson 1.1: Common Fundamental Algorithms
  • Lesson Objectives:
    • Describe the logic and structure of a fundamental algorithm.
    • Distinguish between correct and incorrect algorithms.
  • Lesson Reading: Computer Science Illuminated (pages 197-218)
  • Key Terms:
  • Composite Variables (Composite Data Structures):
    • Array (pg. 204): A collection of homogeneous items stored at contiguous memory locations; each item can be accessed using an index.
    • Example: An array of numbers like [1, 2, 4, 8, 16]
    • Index: A numerical representation of an element’s position within an array or list.
    • Example: In the array [10, 20, 30], the index of 20 is 1.
    • Record (pg. 206): A composite variable that can store multiple fields of different data types, usually related to a single entity (heterogeneous).
    • Example: An “Employee” record might include name, age, and hourly wage.
    • Heterogeneous: A term describing a collection of items that are of different types.
    • Example: A record containing a student’s name (string), ID (integer), and GPA (float).
    • Homogeneous: A term describing a collection of items that are all of the same type.
    • Example: An array containing only integers.
  • Search Algorithms:
    • Binary Search (pg. 208): A search algorithm that finds the position of a target value within a sorted array by repeatedly dividing the search interval in half.
    • Divide and conquer.
    • Example: Searching for 23 in a sorted list: [2, 5, 8, 12, 16, 23, 38, 56, 72, 91]
    • Sequential Search (Linear Search) [pg. 206]: A search algorithm that checks each element in a list one by one until the desired element is found or the list ends.
    • Example: Looking through a contact list from top to bottom to find a name.
  • Sort Algorithms:
    • Bubble Sort (pg. 215): A simple sorting algorithm that repeatedly steps through a list, compares adjacent elements (two items that are right next to each other in a list or array), and swaps them if they are in the wrong order.
    • Example: Sorting a list of names alphabetically by repeatedly swapping out-of-order pairs.
    • Insertion Sort (pg. 218): A sorting algorithm that builds the final sorted array one item at a time by inserting each new item into its correct position.
    • Example: Sorting playing cards in your hand by inserting each new card into the right spot.
    • Selection Sort (pg. 212): A simple sorting algorithm that repeatedly finds the minimum element from the unsorted part of a list and moves it to the beginning.
    • Example: Sorting numbers by repeatedly selecting the smallest remaining number.
Lesson 2: Mathematics Representation in Pseudocode
Lesson 2.1: Pseudocode for Arithmetic
  • Lesson Objective: Use pseudocode to outline arithmetic operations effectively in problem-solving scenarios.
  • Lesson Reading: Programming Logic and Design (pages 12-15)
  • Key Terms:
  • Pseudocode (pg. 12): A simplified, human-readable version of a program’s code that outlines logic without strict syntax.
    • Example: sum = a + b
  • Basic Arithmetic Operations:
    1. Addition: sum = a + b;
    2. Subtraction: difference = a - b;
    3. Multiplication: product = a * b;
    4. Division: quotient = a / b
  • Combining Operations:
    • Multiple arithmetic steps can be combined to solve more complex problems.
    • Example:
    • a = 10
    • b = 20
    • c = 30
    • sum = a + b + c
    • average = sum / 3
  • Variables and Constants: Used to store values for computation; constants have fixed values.
    • Example: length = 10
  • Flowchart (pg. 12): A flowchart visually represents an algorithm using symbols and arrows.
    • Terminal Symbol (pg.14): Marks the start or end of a process.
    • Processing Symbol (pg.14): Represents actions or calculations.
    • Input/Output Symbol (pg.14): Indicates where data enters or leaves the process.
    • Flowline (pg.14): Shows the sequence of steps.
Lesson 2.2: Floating-Point Numbers, Functions, and Other Topics
  • Lesson Objective: Recognize fundamental mathematical functions that can be used in pseudocode with integers and floats.
  • Key Terms:
  • Floating-Point Number: A number that can have a fractional part represented with a decimal point.
    • Example: pi = 3.14159
    • radius = 2.5
    • area = pi * (radius ^ 2)
  • Integer Division: Division between two integers that produces a whole number quotient, discarding any remainder.
    • Example:
    • total_items = 17
    • itemsperbox = 4
    • boxesneeded = totalitems // itemsperbox
  • Type Conversion (Type Casting): The process of changing a value from one data type to another.
    • Implicit Conversion: Automatic type conversion performed by the programming language when no data loss occurs.
    • Example:
    • num_int = 10;
    • num_float = 2.5;
    • result = numint + numfloat
    • Explicit Conversion: Manual type conversion performed by the programmer.
    • Example:
    • num_str = “123”;
    • numint = int(numstr)
  • sqrt(): A function that calculates the square root of a number.
    • Example: distance = sqrt(x^2 + y^2)
  • abs(): A function that returns the absolute value of a number.
    • Example: difference = abs(a - b)
  • round(): A function that rounds a floating-point number to a specified number of decimal places or to the nearest integer.
    • Example: rounded_value = round(value, 2)

Lesson 3: Pseudocode

Lesson 3.1: Introduction to Programming
  • Lesson Objective: Interpret the pseudocode representation of a fundamental algorithm.
  • Lesson Reading: Programming Logic and Design (pages 68-74)
  • Key Terms:
  • Selection Structure (If/Else):
    • Selection Structure (pg. 68): A control structure that chooses different paths of execution based on conditions, such as if statements or switch cases.
    • Example: Using if-elif-else to choose an action based on user input.
    • Single-Alternative If (pg. 68): An if statement that provides only one path of execution if the condition is true; no action is taken if the condition is false.
    • Example: If score >= 60 then pass.
    • Null Case (pg.68): A situation in which no action is taken, often used as the default case in a switch statement or when no conditions in an if statement are met.
    • Example: If no user input is given, do nothing.
    • Dual-Alternative If (pg. 68): An if statement that provides two paths: one for when the condition is true and another for when it is false (also known as if-else).
    • Example: If score >= 60 then pass else fail.
  • Loop Structures:
    • Loop Structure (pg. 69): A way to repeat a block of code multiple times based on a condition, such as for loops or while loops.
    • Example: Using a for loop to iterate through a list of numbers.
    • Loop Body (pg. 69): The set of statements inside a loop that are executed each time the loop runs.
    • Example: In for i = 1 to 5, the statements inside the loop are the loop body.
    • While Loop (pg. 69): A loop that repeats a block of code as long as a specified condition is true.
    • Example: While counter < 10, increment counter by 1.

Section 4: Operating Systems and File Systems

Lesson 1: Operating Systems

Lesson 1.1: Operating Systems
  • Lesson Objective: Identify the basic components of operating systems.
  • Lesson Reading: Computer Science Illuminated (pages 327-348)
  • Key Terms:
  • Operating System OS (pg. 328): Main software that manages hardware and software resources.
    • Example: Windows, Linux, or macOS handle memory, CPU, and file access.
  • System Software (pg. 328): Software that provides a platform for other programs.
    • Example: OS utilities, device drivers, and antivirus programs.
  • Application Software (pg. 328): Programs designed for users to perform tasks.
    • Example: Word processors, web browsers, or video games.
  • Mainframe (pg. 333): A large, powerful computer that supports many users at once.
    • Example: A bank uses a mainframe to handle millions of transactions daily.
  • Dumb Terminal (pg. 333): A simple input/output device with no processing power.
    • Example: A monitor and keyboard that connect to a central computer.
Processes
  • Process (pg. 329): An instance of a running program with its own state and memory.
    • Example: Opening two browser windows creates two separate processes.
  • Process Management (pg. 329): Handling process creation, scheduling, and termination.
    • Example: The OS decides which program runs first and keeps track of all active processes.
  • Process States (pg. 342): Stages a process goes through: new, ready, running, waiting, terminated.
    • Example: A program waiting for user input is in the waiting state.
  • Process Control Block (PCB) (pg. 343): Data structure storing all information about a process.
    • Example: CPU uses PCB to keep track of program counter, registers, and memory allocation.
  • Context Switch (pg. 343): The process of storing and restoring the state of a CPU so multiple processes can share a single CPU.
    • Example: When the OS pauses a running program to let another program run, it saves the first program’s CPU state and restores it later so it can continue where it left off.
Memory Management
  • Memory Management (pg. 334): Controlling how memory is allocated, used, and freed in a computer.
    • Example: The OS decides which program goes where in RAM to avoid conflicts.
  • Address Binding (pg. 334): The process of connecting a program’s symbolic addresses to actual physical addresses in memory.
    • Example: When a program refers to variable X, address binding ensures the CPU knows where X is physically stored.
  • Logical Address (pg. 334): The address generated by the CPU while running a program, before translation to physical memory.
    • Example: A program thinks it’s using memory location 1000, but that address may map elsewhere in RAM.
  • Physical Address (pg. 334): The real location in the computer’s memory hardware where data is stored.
    • Example: After translation, the CPU writes data to RAM location 4096.
Memory Partitioning
  • Partition Memory Management (pg. 337): Dividing memory into sections or partitions, each for a different process.
    • Example: A 4GB RAM split into two 2GB partitions to run two programs simultaneously.
  • Fixed Partition Technique (pg. 337): Memory divided into partitions of fixed sizes, each holding one process.
    • Example: One 512MB partition for Program A, another 512MB for Program B.
  • Dynamic Partition Technique (pg. 337): Memory divided into variable-sized partitions depending on process needs.
    • Example: Program A needs 700MB, Program B 300MB; partitions adjust accordingly.
  • Single Contiguous Memory Management (pg. 336): All processes loaded into one continuous block of memory.
    • Example: Early computers loaded a single program into memory at a time.
  • Paged Memory Technique (pg. 339): Dividing memory into fixed-size pages to reduce fragmentation.
    • Example: A program’s 1MB memory split into 4KB pages spread across RAM.
  • Frame (pg. 339): A fixed-size block of physical memory that holds a page of virtual memory.
    • Example: Page 5 of a program fits into frame 12 of RAM.
  • Page (pg. 339): A fixed-size block of a program’s virtual memory.
    • Example: A 16KB program is split into four 4KB pages.
CPU Scheduling
  • CPU Scheduling (pg. 329): Deciding which processes run on the CPU and in what order.
    • Example: Running multiple apps efficiently without freezing the system.
  • First-Come, First-Served (FCFS) (pg. 344): CPU scheduling where the earliest request runs first.
    • Example: Printing jobs sent in order without priority.
  • Shortest Job Next (SJN) (pg. 345): CPU scheduling that picks the process with the shortest expected time.
    • Example: A 2-second task runs before a 10-second task to minimize waiting.
  • Round-Robin (pg. 346): CPU scheduling where each process gets a fixed time slice in rotation.
    • Example: Each browser tab gets 50ms of CPU time in turn.
  • Time Slice (pg. 348): The fixed amount of CPU time given to a process in round-robin scheduling.
    • Example: 50ms per process before moving to the next.
  • Preemptive Scheduling (pg. 344): Running processes can be interrupted by higher-priority processes.
    • Example: A video call process interrupts background downloads.
  • Non-Preemptive Scheduling (pg. 344): A running process runs until it finishes before another starts.
    • Example: Printing a large document cannot be interrupted by another job.
  • Multiprogramming (pg. 329): Running multiple programs concurrently to maximize CPU use.
    • Example: Listening to music while writing a document.
  • Timesharing (pg. 333): Multiple users share CPU time via time slices.
    • Example: Several people use a single server at the same time.
Lesson 2: File Systems
Lesson 2.1: File Systems
  • Lesson Objective: Identify the purpose of and commonalities between file systems.
  • Lesson Reading: Computer Science Illuminated (pages 358-376)
  • Key Terms:
  • File (pg. 360): A named collection of data stored on a computer system, which can be text, an image, an executable, or any other type of information.
    • Example: report.docx, photo.png, and program.exe are all files.
  • File System (pg. 360): The method and data structure an operating system uses to organize and store files on storage devices such as hard drives.
    • Example: NTFS on Windows or ext4 on Linux.
  • File Type (pg. 361): The classification or category of a file based on its content and format that determines how it can be used or opened.
    • Example: A .txt file is a text file, and a .jpg file is an image file.
  • File Extension (pg. 361): A suffix attached to the end of a filename indicating the format or type of the file.
    • Example: .docx, .png, .exe indicate file type.
  • Text File (pg. 360): A file that contains plain text characters, typically encoded in ASCII or Unicode, and is readable by text editors and word processors.
    • Example: notes.txt contains readable text.
  • Binary File (pg. 360): A file that contains data in a format that is not human-readable; typically used to store executable programs or complex data structures.
    • Example: program.exe is a binary file.
  • Sequential File Access (pg. 363): Accessing data in a file by sequentially reading or writing from the beginning to the end.
    • Example: Reading a text log file line by line from the start.
  • Direct File Access (pg. 365): The ability to retrieve or manipulate data from a file directly without sequentially accessing preceding data.
    • Example: Accessing record 50 directly in a database file without reading records 1–49.
Directories
  • Directory (pg. 366): A container used to organize files into a hierarchical structure on a computer system.
    • Example: Documents, Downloads, and Pictures are directories on most computers.
  • Directory Tree (pg. 366): A graphical representation or hierarchical structure of directories and subdirectories in a file system.
    • Example: Showing C:\ with subfolders Documents, Pictures, and Downloads arranged in a tree layout.
  • Root Directory (pg. 366): The top-level directory in a file system hierarchy, which contains all other directories and files.
    • Example: / on Linux or C:\ on Windows is the root directory.
  • Working Directory (pg. 367): The current directory in a file system from which a user or program is operating.
    • Example: When you open a terminal, the default folder you are in is your working directory.
  • Path (pg. 370): A string of characters that specifies the location of a file or directory in a file system.
    • Example: /home/user/Documents/report.docx is a path to a file.
  • Absolute Path (pg. 370): The complete and specific location of a file or directory in a file system, starting from the root directory.
    • Example: C:\Users\Alice\Documents\report.docx shows the full path to the file.
  • Relative Path (pg. 370): A path that specifies the location of a file or directory relative to the current working directory.
    • Example: If your current directory is C:\Users\Alice, then Documents\report.docx refers to the same file as the absolute path above.
Disk Scheduling
  • Disk Scheduling (pg. 371): The method an operating system uses to efficiently schedule access to disk resources, aiming to reduce seek time and optimize performance.
    • FCFS: First-Come, First-Served, a disk scheduling or CPU scheduling method where requests are handled in the order they arrive.
    • Example: If three disk read requests arrive in order A, B, C, the disk services them A → B → C.
    • SSTF: Shortest Seek Time First, a disk scheduling method that selects the request closest to the current head position to minimize movement.
    • Example: If the disk head is at track 50 and requests are at tracks 45, 55, and 60, it will service 45 first because it’s closest.
    • SCAN: A disk scheduling method where the disk head moves in one direction, servicing requests until it reaches the end, then reverses direction.
    • Example: The head moves from track 0 to 199, servicing requests along the way, then reverses back toward 0.
    • CSCAN: Circular SCAN, a disk scheduling method where the disk head moves in one direction servicing requests and, upon reaching the end, quickly returns to the beginning without servicing requests on the return trip.
    • Example: The head moves from track 0 to 199, servicing requests, then jumps back to track 0 to start the next cycle.
  • Seek Time: The time it takes for a hard drive's read/write head to move to the track where the data are stored.
    • Example: A hard drive might take 5ms to move the head to the correct track before reading data.

Section 5: Computer Architecture

Lesson 1: Computing Components

Lesson 1.1: Computing Components
  • Lesson Objective: Identify the major components of a computer system.
  • Lesson Reading: Computer Science Illuminated (pages 122-139)
  • Key Terms:
  • von Neumann Architecture:
    • Central Processing Unit (CPU) (pg. 125): The main component of a computer that executes instructions and processes data.
    • Example: An Intel Core i7 CPU executes programs and calculations on a PC.
    • Arithmetic Logic Unit (ALU) (pg. 125): The part of the CPU that performs arithmetic calculations and logical operations.
    • Example: Adding two numbers or comparing values is done by the ALU.
    • Control Unit (pg. 125): The part of the CPU that directs its operation, managing the execution of instructions and coordinating other components.
    • Example: Fetching instructions from memory and sending control signals to the ALU.
    • Input Unit (pg. 125): Devices and components used to input data into a computer system, such as keyboards and mice.
    • Example: Typing on a keyboard or moving a mouse.
    • Output Unit (pg. 125): Devices and components used to output data from a computer system, such as monitors and printers.
    • Example: Displaying text on a screen or printing a document.
    • Program Counter (pg.128): A register in the CPU that holds the address of the next instruction to be executed.
    • Example: After executing instruction 5, the program counter points to instruction 6.
    • Instruction Register (pg.128): A register in the CPU that holds the current instruction being executed.
    • Example: The CPU decodes and executes the instruction stored in the instruction register.
    • Bus Width (pg. 128): The number of bits that can be transmitted simultaneously on a data bus, affecting data transfer speed.
    • Example: A 64-bit bus transfers 64 bits at a time, doubling speed compared to a 32-bit bus.
    • Addressability (pg. 126): The capability of a system to access and manipulate each unit of data in memory individually.
    • Example: A system with byte-addressable memory can access each individual byte.
    • Register (pg. 127): A small, fast storage location within the CPU used to hold temporary data and instructions.
    • Example: Storing the result of an addition temporarily before writing it to memory.
    • Pipelining (pg. 130): A CPU performance enhancement technique where multiple instruction phases are overlapped to improve processing speed.
    • Example: While one instruction is being executed, the next is being decoded.
    • Cache Memory (pg. 130): A small, fast type of volatile memory that stores frequently accessed data to speed up processing.
    • Example: Storing recently used instructions so the CPU can access them quickly.
    • Motherboard (pg. 130): The main circuit board of a computer, housing the CPU, memory, and other essential components.
    • Example: All major components like CPU, RAM, and GPU connect to the motherboard.
    • Sector (pg. 134): The smallest unit of data storage on a disk, typically part of a track.
    • Example: A 512-byte sector stores part of a block on a hard disk.
    • Track (pg. 134): A circular path on the surface of a disk where data is magnetically recorded and read.
    • Example: A single circular track on a hard drive platter.
    • Block (pg. 134): A fixed-size unit of data stored and accessed on a disk or in memory.
    • Example: A 4KB block on a hard drive stores part of a file.
    • Cylinder (pg. 134): A set of tracks located at the same position on multiple disk platters in a hard drive.
    • Example: All tracks aligned vertically across platters form a cylinder.
    • Access Time (pg. 135): The time it takes for a system to retrieve data from memory or storage.
    • Example: It takes 10ns for RAM to return requested data to the CPU.
    • Latency (pg. 135): The delay before a transfer of data begins following an instruction for its transfer.
    • Example: A hard drive may have a 5ms latency before it starts reading data.
    • Transfer Rate (pg. 135): The speed at which data can be transmitted from one device to another, usually measured in bits per second.
    • Example: A USB 3.0 drive can transfer data at up to 5 Gbps.
Lesson 2: Networking for Home and Enterprise
Lesson 2.1: Networking Architecture and Technologies
  • Lesson Objective: Identify network architecture and its fundamental components.
  • Lesson Reading: Computer Science Illuminated (pages 496-514)
  • Key Terms:
  • Access Control Policy: Rules that determine who can access specific resources or data in a system and which actions they can perform.
    • Example: Only HR staff can view employee salary records.
  • Bandwidth (pg. 496): The maximum amount of data that can be transmitted over a network connection in a given amount of time.
    • Example: Streaming HD video uses more bandwidth than browsing websites.
  • Client/Server Model (pg. 496): A network setup where clients request services from centralized servers.
    • Example: Your browser requests a webpage from a web server.
  • Computer Network (pg. 496): A group of interconnected computers and devices that share data and resources.
    • Example: Your home Wi-Fi connects your laptop, phone, and printer.
  • Data Transfer Rate (pg. 496): The speed at which data is transmitted between devices.
    • Example: Downloading a 1GB file in 10 seconds means a high transfer rate.
  • File Server (pg. 497): A server that stores and manages files for network access.
    • Example: A school server holds assignments for students to download.
  • Firewall: A security system that controls network traffic based on rules.
    • Example: It blocks unauthorized access to your computer.
  • Node (Host) (pg. 496): Any device connected to a network.
    • Example: Your printer is a node on your home network.
  • Port: A virtual point where network connections start and end.
    • Example: Port 80 is used for websites.
  • Protocol (pg. 496): Rules for formatting and transmitting data over a network.
    • Example: HTTP is a protocol for websites.
  • P2P Model (pg. 497): A network model where devices share resources directly without a central server.
    • Example: Torrenting files uses P2P.
Internet Connections
  • Latency: The delay before data starts transferring.
    • Example: High latency causes lag in online games.
  • Internet Backbone: The main infrastructure of the internet made of high-speed lines.
    • Example: Like the interstate system for data.
  • Internet Service Provider (ISP): A company that provides internet access.
    • Example: Comcast and AT&T are ISPs.
  • Phone Modem: A device that converts digital data to analog for phone lines.
    • Example: Used in dial-up internet—slow but nostalgic!
  • Digital Subscriber Line (DSL): Internet access through telephone lines, faster than dial-up.
    • Example: DSL was common before fiber internet became widespread.
  • Cable Modem: A device that provides internet access by connecting to a cable television line.
    • Example: The box your internet provider installs to get you online.
  • Broadband: A high-speed internet connection that is always on and faster than dial-up.
    • Example: Cable and fiber-optic internet are types of broadband.
  • Upload: Sending data from a local device to a remote server.
    • Example: Posting a photo to Instagram is an upload.
  • Download: Transferring data from a remote server to a local device.
    • Example: Saving a PDF from a website to your laptop.
Packet Switching
  • Packet: A small unit of data sent over a network.
    • Example: Sending a photo online breaks it into packets.
  • Packet Switching: Sending data in packets that take different paths to the destination.
    • Example: Like mailing pieces of a puzzle separately and reassembling them later.
  • Router: A device that directs data between networks.
    • Example: Your home router connects you to the internet.
  • Repeater: A device that retransmits signals to extend network range.
    • Example: A Wi-Fi extender is a repeater.
Open Systems and Protocols
  • Proprietary System: A privately owned system requiring specific software or hardware.
    • Example: Apple’s iOS is proprietary—you can’t change its code.
  • Interoperability: The ability of systems to work together and exchange information.
    • Example: An Android phone syncing with a Windows PC.
  • Open System: A system that uses open standards and can interact with others.
    • Example: Android is open—developers can build apps for it freely.
  • Open Systems Interconnection (OSI) Reference Model: A framework that standardizes network functions into seven layers.
    • Example: Like a recipe with steps for sending a message online.
      Number
    • Layer 7 Application layer
    • Layer 6 Presentation layer
    • Layer 5 Session layer
    • Layer 4 Transport layer
    • Layer 3 Network layer
    • Layer 2 Data Link layer
    • Layer 1 Physical layer
  • Network Protocols:
    • Ethernet: A wired method of networking computers in a LAN.
    • Example: Plugging your computer into the router with a cable.
    • Protocol Stack: Layers of protocols that work together to handle communication.
    • Example: TCP/IP is a common protocol stack.
    • TCP/IP: Protocols that govern how data is transmitted over the internet.
    • Example: Ensures your email gets sent and received correctly.
    • Ping: A tool that checks if a device is reachable and how fast it responds.
    • Example: Gamers use ping to test connection speed to servers.
    • User Datagram Protocol (UDP): Sends data without checking for errors; faster but less reliable.
    • Example: Used for live video streams where speed matters more than perfection.
    • Traceroute: A tool that shows the path data takes to reach a destination.
    • Example: Like tracking a package through delivery stops.
Network Addresses
  • Gateway: A device that connects different networks.
    • Example: Your home router links your local network to the internet.
  • Hostname: A unique name assigned to a device on a network.
    • Example: Your laptop might be named “Johns-MacBook” on Wi-Fi.
  • ICANN: The organization that manages domain names and IP addresses.
    • Example: ICANN oversees “.com” and “.org” domains.
  • Internet Protocol (IP): Rules for formatting and sending data over networks.
    • Example: IP ensures your email reaches the right inbox.
  • IP Address: A unique number assigned to each device on a network.
    • Example: Like a street address for your computer.
  • MIME Type: A standard that indicates the format of a file.
    • Example: “image/jpeg” means it’s a JPEG photo.
  • Network Neutrality: The principle that all internet traffic should be treated equally.
    • Example: ISPs shouldn’t slow down Netflix to favor their own streaming service.
  • Top-Level Domain (TLD): The last part of a domain name.
    • Example: “.com” in “amazon.com”.
  • Domain Name: A human-readable address used to identify a website.
    • Example: “google.com” is a domain name.
  • Domain Name Server: A server that turns website names into IP addresses.
    • Example: Typing “amazon.com” gets translated to its IP address so your browser can find it.
  • Domain Name System (DNS): The system that manages domain name to IP address translation.
    • Example: Like a phonebook for websites.
  • Domain Squatting: Registering domain names to sell them later for profit.
    • Example: Buying “famousbrand.com” hoping the brand will pay to get it back.
  • Web Server (pg. 497): A computer that hosts websites and delivers web pages.
    • Example: Visiting a site means a web server sends you the page.
  • Wireless (pg. 496): Transmitting data without physical connections.
    • Example: Your phone connects to Wi-Fi wirelessly.