0% of the question bank attempted

What a Computer Actually Does

A computer is a machine that stores and manipulates data as electrical signals, following a stored program of instructions.
  • The CPU (central processing unit) fetches, decodes, and executes instructions one step at a time
  • RAM (memory) holds the program and data currently in use; it is fast but erased when power is lost
  • Storage (SSD/hard drive) holds data permanently, even without power
  • Input devices (keyboard, mouse, sensors) bring data in; output devices (screen, speaker) send results out
  • The fetch-decode-execute cycle repeats billions of times per second, measured in Hertz (clock speed)

Binary: The Language of Computers

Computers represent all data using binary (base-2), a number system with only two digits: 0 and 1, because transistors are easiest to build as simple on/off switches.
  • A single binary digit (0 or 1) is called a bit
  • 8 bits grouped together form a byte, the basic unit of storage (e.g., one character)
  • Each bit position represents a power of 2: 1, 2, 4, 8, 16, 32, 64, 128...
  • To convert binary to decimal, add the powers of 2 where there is a 1 (e.g., 1011 = 8+0+2+1 = 11)
  • To convert decimal to binary, repeatedly divide by 2 and record the remainders
  • Everything digital — text, images, sound, video — is ultimately stored as sequences of bits

Hexadecimal and Other Number Systems

Hexadecimal (base-16) is a compact way to represent binary values, since each hex digit maps exactly to 4 bits.
  • Hex uses digits 0-9 and letters A-F, where A=10, B=11, C=12, D=13, E=14, F=15
  • One hex digit represents exactly 4 bits (a 'nibble'), so 2 hex digits represent one byte
  • Hex is commonly used for colors (#FF0000 = red), memory addresses, and error codes
  • To convert hex to binary, translate each hex digit into its 4-bit binary equivalent
  • Decimal (base-10) is what humans normally use; computers use binary internally for hardware simplicity

How Data Is Represented

Different kinds of data (numbers, text, images, sound) are all encoded into binary using agreed-upon schemes.
  • ASCII assigns each English letter, digit, and symbol a number from 0-127, stored as a byte
  • Unicode (like UTF-8) extends this to represent characters from virtually every language and emoji
  • Images are stored as grids of pixels, each pixel's color encoded as binary RGB values
  • Sound is captured by sampling the wave thousands of times per second and storing each sample as a number
  • File size depends on how much data is stored: more pixels, higher sample rates, or longer text mean larger files

Hardware Components

A computer's physical hardware works together, with each component playing a specialized role in processing information.
  • CPU: executes instructions; measured in GHz (clock speed) and number of cores
  • RAM: temporary, volatile working memory; more RAM lets more programs run smoothly at once
  • Storage (SSD/HDD): permanent, non-volatile; SSDs are faster than traditional spinning hard disks
  • Motherboard: connects all components together and lets them communicate
  • GPU: specialized processor originally for graphics, now also used for parallel computations like AI

Operating Systems and Software

The operating system (OS) is software that manages hardware resources and provides a platform for other programs to run.
  • Examples of operating systems: Windows, macOS, Linux, Android, iOS
  • The OS manages memory allocation, scheduling which program uses the CPU, and file storage
  • System software (like the OS) supports the computer itself; application software (like a browser) helps users do tasks
  • A file system organizes how data is stored and retrieved from storage devices
  • Drivers are small programs that let the OS communicate with specific hardware devices
RAM is temporary/volatile working memory, not permanent storage — data in RAM is lost when power is off
A byte is 8 bits, not 10 bits — binary place values are powers of 2, not powers of 10
The CPU executes instructions; it is the GPU, not the CPU, that is optimized for massively parallel tasks like graphics
Hexadecimal is a human-friendly shorthand for binary, not a separate system computers use internally — hardware still stores everything in binary

Variables and Data Types

A variable is a named storage location that holds a value which can change while a program runs; every value has a data type that determines what operations are valid on it.
  • Common data types: integer (whole numbers), float/double (decimals), string (text), boolean (true/false)
  • A variable is created (declared) with a name and often an initial value, e.g., age = 16
  • Variable names should be descriptive and follow naming rules (no spaces, can't start with a digit)
  • Type matters: adding two integers gives a number, but adding two strings concatenates (joins) them
  • Some languages require declaring the type explicitly (statically typed); others infer it automatically (dynamically typed)

Operators and Expressions

Operators combine values and variables into expressions that produce a result, covering arithmetic, comparison, and logic.
  • Arithmetic operators: + (add), - (subtract), * (multiply), / (divide), % (modulo/remainder)
  • Comparison operators: == (equal), != (not equal), <, >, <=, >= — these produce a boolean result
  • Logical operators: AND, OR, NOT combine boolean expressions (e.g., age >= 13 AND age <= 19)
  • Order of operations (PEMDAS-like precedence) applies: multiplication/division before addition/subtraction
  • The assignment operator (=) stores a value into a variable; it is different from the equality operator (==)

Input, Output, and Program Structure

Programs typically follow a pattern of receiving input, processing it, and producing output, structured as a sequence of statements executed in order.
  • Output statements (like print) display information to the user
  • Input statements collect data from the user, often read in as a string that may need converting to a number
  • A statement is a single instruction; a program is a sequence of statements executed top to bottom by default
  • Comments (e.g., starting with # or //) are ignored by the computer but help humans understand code
  • Syntax errors occur when code doesn't follow a language's grammar rules and won't run at all

Debugging and Errors

Errors (bugs) are inevitable in programming; recognizing the type of error is the first step to fixing it.
  • Syntax errors: code violates the language's grammar rules (e.g., missing a colon or parenthesis)
  • Runtime errors: code is valid but fails while running (e.g., dividing by zero, opening a missing file)
  • Logic errors: code runs without crashing but produces the wrong result due to flawed reasoning
  • Debugging strategies include reading error messages carefully, using print statements to trace values, and testing small pieces separately
  • A debugger is a tool that lets you pause execution and inspect variable values step by step

Writing Readable, Reliable Code

Good programming style makes code easier to read, test, and maintain, both for yourself and others.
  • Use meaningful variable and function names instead of single letters like x or temp
  • Keep consistent indentation to show code structure (especially important in Python)
  • Break repeated logic into functions rather than copy-pasting the same code multiple times
  • Test code with a range of inputs, including edge cases like zero, negative numbers, or empty strings
  • Version control (like Git) tracks changes to code over time and allows collaboration

Programming Paradigms and Languages

Programming languages provide different tools and styles for expressing solutions, but most fundamentals transfer between them.
  • Popular beginner languages include Python, JavaScript, and Java, each with different syntax but similar core concepts
  • A compiler translates entire source code into machine code before running; an interpreter executes code line by line
  • High-level languages (like Python) are closer to human language; low-level languages (like assembly) are closer to hardware
  • Procedural programming organizes code as a sequence of steps/functions; object-oriented programming organizes code around objects with data and behavior
  • Libraries and frameworks provide pre-written code so programmers don't have to solve common problems from scratch
= is assignment (stores a value), not ==, which is comparison (checks equality)
A syntax error prevents code from running at all; a logic error lets code run but produces a wrong answer, not a crash
Concatenating strings with + joins text together, not adds numbers — '2' + '2' gives '22' in many languages, not 4
Compiled and interpreted are about when/how code is translated, not about which language is 'better' — both approaches are valid

Conditionals (if/else)

Conditionals let a program make decisions, executing different code depending on whether a condition is true or false.
  • An if statement runs a block of code only when its condition evaluates to true
  • else runs when the if condition is false; else if (or elif) checks an additional condition
  • Conditions are boolean expressions, often built with comparison operators (==, <, >, etc.)
  • Nested conditionals place an if statement inside another to check multiple layers of logic
  • Only one branch of an if/elif/else chain executes per run, not multiple

Loops: For and While

Loops let a program repeat a block of code multiple times without rewriting it, controlled by a counter or a condition.
  • A for loop typically repeats a fixed or known number of times, often iterating over a range or collection
  • A while loop repeats as long as a condition remains true, useful when the number of repetitions isn't known in advance
  • An infinite loop happens when the loop's condition never becomes false — a common bug to watch for
  • break exits a loop immediately; continue skips to the next iteration without finishing the current one
  • Loop variables (like i in 'for i in range(10)') track progress through the repetition

Functions and Parameters

A function is a reusable, named block of code that performs a task, optionally accepting inputs (parameters) and returning an output.
  • Defining a function specifies its name, parameters, and the code it runs when called
  • Calling a function executes its code, passing in specific values called arguments
  • A return statement sends a value back to wherever the function was called, ending the function
  • Parameters are placeholders in the function definition; arguments are the actual values passed in when calling
  • Functions with no explicit return statement typically return a special 'nothing' value (e.g., None in Python)

Scope

Scope determines where in a program a variable can be accessed, which prevents naming conflicts and controls how data flows.
  • A local variable is defined inside a function and can only be used within that function
  • A global variable is defined outside all functions and can be accessed from anywhere in the program
  • Variables with the same name in different scopes are treated as entirely separate variables
  • Using too many global variables can make code harder to debug, since any function might change them
  • When a function ends, its local variables are typically destroyed and no longer accessible

Combining Control Flow

Real programs combine conditionals, loops, and functions together to build more complex, useful behavior.
  • A loop can contain a conditional inside it to make decisions on each iteration (e.g., check each item in a list)
  • A function can contain loops and conditionals inside its body to perform complex logic
  • Recursion is when a function calls itself to solve a smaller version of the same problem, eventually reaching a base case
  • Every recursive function needs a base case (a stopping condition) or it will run forever, similar to an infinite loop
  • Tracing through code step-by-step (mentally or on paper) helps verify control flow logic works as intended

Common Patterns and Pitfalls

Certain patterns in control flow appear repeatedly across programs, along with common mistakes beginners make.
  • Accumulator pattern: use a variable (like total = 0) that updates inside a loop to build up a result
  • Off-by-one errors happen when a loop runs one time too many or too few, often from range/index miscounting
  • Forgetting to update a loop's counter or condition variable can cause an infinite loop
  • Comparing floats for exact equality can be unreliable due to how decimals are stored in binary
  • Testing loops and conditionals with boundary values (like 0, the first item, or the last item) catches many bugs
break exits the loop entirely; continue skips only the current iteration and keeps looping — they are not the same
Parameters are the names in a function's definition; arguments are the actual values passed in when calling it
A local variable inside a function is not accessible outside it, even though a global variable with a similar name might exist
An infinite loop is a bug caused by a condition that never becomes false, not an intentional feature

Arrays and Lists

An array (or list) stores multiple values together in a single ordered collection, each accessible by a numeric index.
  • Indexing typically starts at 0, so the first element is at index 0, the second at index 1, and so on
  • Arrays have a fixed size in many languages, while lists (like Python lists) can grow or shrink dynamically
  • Common operations include accessing an element by index, adding an element, removing an element, and searching
  • Accessing an element by index is fast (constant time), but searching for a value without knowing its index is slower
  • A 2D array (array of arrays) can represent grids, like a tic-tac-toe board or a spreadsheet

Stacks and Queues

Stacks and queues are ordered collections that restrict how you add and remove elements, following specific access patterns.
  • A stack follows LIFO (Last In, First Out): the most recently added item is the first one removed
  • Stack operations are called push (add to top) and pop (remove from top); think of a stack of plates
  • A queue follows FIFO (First In, First Out): the first item added is the first one removed
  • Queue operations are called enqueue (add to back) and dequeue (remove from front); think of a checkout line
  • Stacks are used for undo functionality and function call tracking; queues are used for task scheduling and print jobs

Dictionaries / Hash Maps

A dictionary (also called a hash map or associative array) stores data as key-value pairs, letting you look up a value quickly using a unique key instead of a numeric index.
  • Each key in a dictionary must be unique; the value it maps to can be any data type, including another data structure
  • Looking up a value by its key is typically very fast (close to constant time) due to hashing
  • Common uses include storing a phone book (name to number), counting word frequency, or caching results
  • Unlike arrays, dictionaries are generally not ordered by position (though some modern languages preserve insertion order)
  • A hash function converts a key into an index internally, which is how fast lookups are achieved

Sets

A set is a collection that stores only unique values, with no duplicates and typically no guaranteed order.
  • Adding a duplicate value to a set has no effect — the set still contains only one copy
  • Sets support operations like union (combine), intersection (common elements), and difference (elements in one but not another)
  • Checking whether a value exists in a set is typically very fast, similar to a dictionary lookup
  • Sets are useful for removing duplicates from a collection or quickly testing membership
  • Unlike a list, a set does not let you access elements by a numeric index

Trees and Graphs (Introductory)

Trees and graphs are structures used to represent hierarchical or interconnected data, going beyond simple linear sequences.
  • A tree consists of nodes connected by edges, starting from a root node, with each node having child nodes below it
  • A binary tree restricts each node to at most two children, often labeled left and right
  • A graph is a more general structure of nodes (vertices) connected by edges, which can represent networks like social connections or maps
  • Trees are used to represent file systems, organizational charts, and decision-making processes
  • Graphs can be 'directed' (edges have a one-way direction) or 'undirected' (edges go both ways)

Choosing the Right Data Structure

Different data structures have different strengths, and choosing the right one depends on what operations your program needs to perform efficiently.
  • Use an array/list when order matters and you need to access items by position
  • Use a stack when you need to process the most recently added item first (like undo history)
  • Use a queue when you need to process items in the order they arrived (like a task queue)
  • Use a dictionary when you need fast lookups by a meaningful key rather than a position
  • Use a set when you need to guarantee uniqueness or quickly check if something exists in a collection
A stack is LIFO, not FIFO — the last item added is the first removed, unlike a queue
Accessing an array element by index is fast; searching for a value's position without an index is slower, especially in an unsorted array
Dictionaries are not guaranteed to be ordered by position the way arrays are (even if some languages preserve insertion order as an implementation detail)
A tree is a specific, hierarchical type of graph (no cycles, one root), not a completely separate unrelated concept from graphs

What Is an Algorithm?

An algorithm is a precise, step-by-step procedure for solving a problem or completing a task, which a computer can follow exactly.
  • An algorithm must be unambiguous: each step must have exactly one clear meaning
  • An algorithm must eventually terminate (finish), unlike an infinite loop
  • The same problem can often be solved by multiple different algorithms, some more efficient than others
  • Pseudocode is an informal, human-readable way to describe an algorithm's steps before writing real code
  • A good algorithm should work correctly for all valid inputs, not just the examples it was designed for

Searching Algorithms

Searching algorithms find whether (and where) a target value exists within a collection of data.
  • Linear search checks each element one at a time from the start until it finds the target or reaches the end
  • Linear search works on unsorted data but can be slow for large collections since it may check every element
  • Binary search repeatedly cuts a sorted collection in half, comparing the middle element to the target
  • Binary search requires the data to be sorted first, but is much faster than linear search on large datasets
  • Binary search eliminates half the remaining possibilities with each comparison, making it very efficient

Sorting Algorithms

Sorting algorithms arrange data into a specific order (like ascending numbers or alphabetical order), which is often a prerequisite for efficient searching.
  • Bubble sort repeatedly compares adjacent elements and swaps them if they're out of order, passing through the list multiple times
  • Selection sort repeatedly finds the smallest remaining element and moves it to its correct position
  • Bubble sort and selection sort are simple to understand but slow on large datasets compared to more advanced algorithms
  • Merge sort divides the data in half repeatedly, sorts each half, then merges the sorted halves back together (a 'divide and conquer' approach)
  • More advanced sorting algorithms (like merge sort or quicksort) scale much better to large amounts of data than simple sorts

Big-O Notation: Measuring Efficiency

Big-O notation describes how an algorithm's running time (or memory use) grows as the size of its input grows, allowing comparison of efficiency independent of hardware.
  • O(1) — constant time: the operation takes the same amount of time regardless of input size (e.g., accessing an array element by index)
  • O(n) — linear time: time grows proportionally with input size (e.g., linear search checking every element once)
  • O(log n) — logarithmic time: time grows very slowly as input grows, by repeatedly cutting the problem in half (e.g., binary search)
  • O(n²) — quadratic time: time grows with the square of input size, often from nested loops over the same data (e.g., bubble sort)
  • Big-O focuses on the worst-case (or general) growth trend for large inputs, not exact timing on any one computer

Problem-Solving Strategies

Effective problem solving in computer science often follows a repeatable process: understand, plan, implement, and test.
  • Break a large problem into smaller, more manageable subproblems (decomposition)
  • Look for patterns: has a similar problem been solved before, or can this be reduced to a known problem?
  • Abstraction means focusing on the important details of a problem while ignoring irrelevant complexity
  • Write pseudocode or draw a diagram/flowchart before jumping straight into code
  • Test your solution with simple cases first, then edge cases (like empty input or very large input)

Algorithm Design Trade-offs

Choosing an algorithm often involves trade-offs between speed, memory usage, and simplicity, rather than one single 'best' choice.
  • A faster algorithm may use more memory (a common time-versus-space trade-off)
  • A simpler algorithm may be easier to write correctly but slower than a more complex, optimized one
  • For small inputs, a simple algorithm's inefficiency may not matter in practice
  • For large inputs, choosing an efficient algorithm (like binary search over linear search) can make a huge practical difference
  • Real-world engineering often favors 'good enough and correct' over 'theoretically fastest but error-prone'
Binary search only works on sorted data — running it on unsorted data gives incorrect results
O(log n) is much faster than O(n) for large inputs, not slower — logarithmic growth is very slow-growing, which is good
Big-O describes growth trends for large inputs, not a literal count of seconds or a guarantee about small inputs
An algorithm that works on the example given isn't automatically correct — it must be verified against edge cases and all valid inputs

The Internet vs. the Web

The internet is a global network of interconnected computers, while the World Wide Web is a system of linked documents (websites) that runs on top of that network.
  • The internet is the physical/logical infrastructure: cables, routers, satellites, and protocols connecting devices worldwide
  • The Web (WWW) is one application that uses the internet, alongside others like email and file transfer
  • A network is any group of connected devices that can share data; the internet is a 'network of networks'
  • Data on the internet travels in small chunks called packets, which are reassembled at the destination
  • The internet has no single owner; it operates through cooperating networks following shared standard protocols

IP Addresses and DNS

Every device on the internet needs a unique address to send and receive data, and a naming system to make those addresses human-friendly.
  • An IP address (like 192.168.1.1) is a numeric label uniquely identifying a device on a network
  • IPv4 addresses use four numbers (0-255) separated by dots; IPv6 was created because IPv4 addresses were running out
  • DNS (Domain Name System) translates human-readable domain names (like google.com) into numeric IP addresses
  • Without DNS, users would need to memorize IP addresses instead of easy-to-remember website names
  • A domain name is registered and can point to different IP addresses over time as servers change

How Web Pages Are Loaded

Loading a website involves a client (your browser) requesting data from a server, which responds with the content to display.
  • A client is the device/program requesting a resource (typically a web browser); a server stores and provides resources
  • HTTP (Hypertext Transfer Protocol) is the set of rules browsers and servers use to communicate requests and responses
  • HTTPS is the secure version of HTTP, encrypting data in transit using SSL/TLS so it can't easily be intercepted
  • A URL (Uniform Resource Locator) specifies the address of a resource, including protocol, domain, and path
  • HTML structures a webpage's content, CSS styles its appearance, and JavaScript adds interactivity

HTTP Requests, Responses, and Status Codes

Communication between a browser and server follows a request-response pattern, with standardized codes indicating the outcome.
  • Common HTTP methods: GET (retrieve data), POST (send/submit data), PUT (update data), DELETE (remove data)
  • A 200 status code means 'OK' — the request succeeded
  • A 404 status code means 'Not Found' — the requested resource doesn't exist at that address
  • A 500 status code means 'Internal Server Error' — something went wrong on the server's side
  • Cookies are small pieces of data a server asks a browser to store, often used for login sessions or preferences

Web Development Basics

Building websites typically combines structural, visual, and behavioral layers, alongside a place to store and serve the site.
  • HTML (HyperText Markup Language) uses tags to define the structure and content of a webpage, like headings and paragraphs
  • CSS (Cascading Style Sheets) controls a webpage's visual presentation: colors, fonts, layout, spacing
  • JavaScript is a programming language that runs in the browser to make web pages interactive and dynamic
  • Front-end development focuses on what users see and interact with directly (client-side)
  • Back-end development focuses on servers, databases, and logic that runs behind the scenes (server-side)

Networking Concepts and Security Basics

Understanding how networks are structured and protected is foundational to using the internet safely.
  • A firewall monitors and controls incoming/outgoing network traffic based on security rules
  • Encryption scrambles data so only someone with the correct key can read it, protecting data in transit or storage
  • A Wi-Fi router connects devices within a local network and typically connects that network to the wider internet
  • Bandwidth measures how much data can be transferred over a network connection in a given time
  • Public Wi-Fi networks are riskier than private ones because data may be more easily intercepted by others on the same network
The internet and the World Wide Web are not the same thing — the Web is a service (linked documents) that runs on top of the internet infrastructure
HTTPS is not just 'HTTP but newer' — it specifically adds encryption (via SSL/TLS) to protect data in transit
A 404 error means the resource wasn't found, not that the whole internet is down — it's specific to that URL/request
IP addresses identify devices numerically; domain names are the human-friendly labels DNS maps to those numbers, not the reverse

Encryption Basics

Encryption scrambles readable data (plaintext) into unreadable data (ciphertext) using a key, so only someone with the right key can reverse the process.
  • Symmetric encryption uses the same key to encrypt and decrypt (fast, but the key must be shared secretly, e.g. AES)
  • Asymmetric encryption uses a public key to encrypt and a private key to decrypt — the public key can be shared openly (e.g. RSA)
  • HTTPS uses a combination: asymmetric encryption to safely exchange a symmetric session key, then symmetric encryption for the actual data
  • Hashing is different from encryption: a hash is one-way and cannot be reversed, used to verify passwords or file integrity without storing the original
  • The lock icon in a browser means the connection is encrypted (HTTPS/TLS), not that the website itself is trustworthy
  • Longer keys and modern algorithms resist brute-force attacks; outdated algorithms (like old DES) can be cracked with enough computing power

Data Breaches

A data breach happens when unauthorized parties gain access to sensitive stored data, often through stolen credentials, software vulnerabilities, or social engineering.
  • Common causes include weak/reused passwords, unpatched software, phishing attacks, and misconfigured databases left publicly accessible
  • Breached data often includes usernames, passwords, credit card numbers, or personal identifiers, which attackers sell or use for identity theft
  • Companies mitigate damage by hashing and salting stored passwords, so a stolen database doesn't reveal plaintext passwords
  • Two-factor authentication (2FA) limits damage from breaches: even a stolen password isn't enough to log in without the second factor
  • After a breach, best practice is to notify affected users, force password resets, and patch the vulnerability that caused it
  • Reusing the same password across sites means one breach can compromise all your other accounts (credential stuffing)

Cookies & Tracking

Cookies are small pieces of data websites store in your browser to remember information between visits, such as login state, preferences, or browsing behavior.
  • First-party cookies are set by the site you're visiting (e.g. keeping you logged in); third-party cookies are set by other domains embedded on the page (e.g. ad networks)
  • Third-party cookies enable cross-site tracking: an advertiser can see that the same browser visited many different sites, building a behavior profile
  • Session cookies expire when you close the browser; persistent cookies remain until their expiration date or you delete them
  • Browsers increasingly block third-party cookies by default, pushing advertisers toward alternatives like device fingerprinting
  • Local storage and web storage are similar to cookies but hold more data and aren't automatically sent with every request
  • Clearing cookies logs you out of sites and removes tracking history, but doesn't remove data already collected by trackers

Privacy Regulations (GDPR-style)

Privacy laws like the EU's GDPR (General Data Protection Regulation) give individuals rights over their personal data and require organizations to handle it responsibly.
  • Core rights include the right to access your data, the right to correct it, and the right to erasure ("right to be forgotten")
  • Companies must obtain clear, informed consent before collecting personal data — pre-checked boxes or buried fine print don't count
  • Data minimization means collecting only the data actually needed for a stated purpose, not everything possible
  • Organizations must report data breaches to regulators and affected users within a set time frame (72 hours under GDPR)
  • GDPR applies to any company handling EU residents' data, regardless of where the company is based, which is why many global sites show cookie consent banners
  • Violations can result in significant fines, calculated as a percentage of a company's global revenue

Cybersecurity Fundamentals

Cybersecurity is the practice of protecting systems, networks, and data from unauthorized access, damage, or disruption.
  • Phishing tricks users into revealing credentials or installing malware by impersonating a trusted source (email, text, or fake website)
  • Malware is a broad term for malicious software: viruses attach to files and spread, worms self-replicate across networks, and ransomware encrypts files and demands payment
  • A firewall filters network traffic based on rules, blocking unauthorized access while allowing legitimate traffic through
  • The principle of least privilege means giving users and programs only the access they need to do their job, limiting damage if an account is compromised
  • Software updates and patches fix known security vulnerabilities — delaying updates leaves systems exposed to attacks that already have public exploits
  • Social engineering exploits human trust rather than technical flaws, making user awareness a critical defense alongside technical safeguards
A hash is one-way and cannot be decrypted, not a form of encryption you can reverse with a key.
The HTTPS padlock means the connection is encrypted, not that the site itself is safe or legitimate.
Third-party cookies enable cross-site tracking; first-party cookies just support the site you're actually visiting, not ad networks.
Clearing your cookies removes local tracking data, not the data companies already collected and stored on their servers.

Algorithmic Bias

Algorithmic bias occurs when a computer system produces systematically unfair outcomes for certain groups, usually because of biased training data or flawed design choices, not because a program is intentionally programmed to discriminate.
  • Bias often comes from training data that reflects historical human bias — a hiring algorithm trained on past resumes may learn to favor the same demographics that were historically hired
  • Underrepresentation in training data (e.g. facial recognition trained mostly on lighter-skinned faces) can make a system perform worse for underrepresented groups
  • Proxy variables can encode bias indirectly: a model might not use race directly but use zip code, which correlates strongly with race in many places
  • Feedback loops can worsen bias over time: a biased predictive policing model sends more patrols to a neighborhood, generates more arrests there, and 'confirms' its own bias
  • Auditing models for disparate impact across groups (not just overall accuracy) is a key technique for catching bias before deployment
  • Removing a sensitive attribute (like race) from a dataset does not guarantee fairness, since other correlated features can still encode it

AI Ethics

AI ethics addresses the responsibilities that come with building and deploying artificial intelligence systems that can affect people's lives, rights, and opportunities.
  • Transparency means users and affected people can understand, at some level, how and why an AI system reached a decision
  • Accountability means a person or organization — not 'the algorithm' — is responsible when an AI system causes harm
  • Explainability is especially important in high-stakes domains like healthcare, lending, or criminal justice, where a wrong or opaque decision has serious consequences
  • Privacy concerns arise because many AI systems are trained on large amounts of personal data, sometimes collected without full user awareness or consent
  • The trolley-problem style dilemmas around autonomous vehicles illustrate that AI systems can face genuine ethical trade-offs, not just technical bugs
  • Deepfakes and generative AI raise new ethical questions around consent, misinformation, and the erosion of trust in audio/video evidence

Intellectual Property & Licensing

Intellectual property (IP) law protects creative and technical work; in software, licenses define exactly how others are legally allowed to use, modify, and distribute that work.
  • Copyright automatically protects original code and creative work the moment it's created, giving the creator exclusive rights to copy, modify, and distribute it
  • Open-source licenses (like MIT or GPL) grant others permission to use and modify code, but under specific conditions the license spells out
  • Permissive licenses (MIT, Apache) allow nearly unrestricted reuse, even in proprietary closed-source products, as long as attribution is kept
  • Copyleft licenses (like GPL) require that any derivative work using the code must also be released under the same open license — this is sometimes called a 'viral' license
  • Patents protect novel inventions or processes (including some software methods) for a limited time, preventing others from using them without a license
  • Using someone else's code without checking its license, or violating a license's terms (e.g. shipping GPL code in closed-source software), can create real legal liability

Careers in Tech

The tech industry offers many distinct career paths that require different skill combinations, from writing code to designing systems to analyzing data.
  • Software engineers design, build, and maintain applications and systems; roles often specialize into front-end (user interfaces), back-end (servers/databases), or full-stack (both)
  • Data scientists and data analysts extract insights from data, often using statistics, programming (like Python or SQL), and visualization tools
  • UX/UI designers focus on how usable and intuitive a product feels, blending research, psychology, and visual design rather than writing production code
  • DevOps and systems/network engineers keep infrastructure running reliably — deploying code, managing servers, and ensuring uptime and security
  • Cybersecurity specialists focus on protecting systems from attacks, including roles like penetration testers who are hired to find vulnerabilities before attackers do
  • A traditional four-year degree is one path into tech, but bootcamps, certifications, self-teaching, and portfolios of personal projects are all recognized alternative routes

Ethics & Careers: Exam Lens

Questions on this unit test whether you can identify real ethical failure modes and distinguish them from unrelated technical concepts covered elsewhere in the course.
  • Expect scenario-based questions: you'll be given a situation (a biased hiring tool, a scraped dataset, a mislabeled license) and asked to name the underlying issue
  • Distinguish between bias in data, bias in algorithm design, and bias in how a system's output is used by humans — exam questions often hinge on this distinction
  • Know the difference between copyright, patents, and licenses — they're related but protect different things and are tested separately
  • Be ready to distinguish an ethical/legal question (should we do this?) from a purely technical one (can we do this?) — both types appear, but they test different reasoning
  • Career-path questions test whether you know which role does which kind of work, not just that the roles exist
Algorithmic bias is usually the result of skewed training data or flawed design, not deliberate programmer intent to discriminate.
A permissive license like MIT allows use in closed-source software; a copyleft license like GPL requires derivatives to stay open-source — mixing them up is a common exam trap.
Copyright protects creative/expressive works automatically at creation, while a patent must be formally applied for and approved to protect an invention or process.
High overall accuracy does not prove a model is fair — it can still perform far worse for specific subgroups, which is why disparate-impact audits matter.
Term
Press Enter or Space to flip the card. Left and right arrows move between cards. 1 marks it known, 2 marks it still learning.
Click or press Enter to flip · Rate yourself to track weak cards
Browse all 100 flashcards as a list

Unit 1: Computing Basics & Binary

Bit
The smallest unit of digital data, representing either a 0 or a 1.
Byte
A group of 8 bits, commonly used as the basic unit of storage size.
Binary
A base-2 number system using only the digits 0 and 1, used internally by all digital computers.
Hexadecimal
A base-16 number system using digits 0-9 and letters A-F; each hex digit represents exactly 4 bits.
RAM (Random Access Memory)
Volatile, fast working memory that temporarily holds data and programs currently in use; contents are lost when power is off.
CPU (Central Processing Unit)
The hardware component that fetches, decodes, and executes program instructions; often called the computer's 'brain.'
Operating System (OS)
System software that manages hardware resources (memory, CPU, storage) and provides a platform for running applications.
ASCII
A character encoding standard that assigns a numeric value to each English letter, digit, and common symbol.
Unicode / UTF-8
A character encoding standard that extends ASCII to represent text from virtually all the world's languages and symbols.
Non-volatile storage
Storage, such as an SSD or hard drive, that retains its data even when the power is turned off.

Unit 2: Programming Fundamentals

Variable
A named storage location in a program that holds a value, which can be changed while the program runs.
Data type
A classification (such as integer, float, string, or boolean) that determines what kind of value a variable holds and what operations are valid on it.
Syntax error
An error that occurs when code does not follow the grammatical rules of the programming language, preventing it from running.
Logic error
A bug where code runs without crashing but produces an incorrect result due to a flaw in the reasoning or algorithm.
Runtime error
An error that occurs while a program is executing, such as dividing by zero or accessing a missing file.
Compiler
A program that translates entire source code into machine code before the program is run.
Interpreter
A program that translates and executes source code line-by-line, without producing a separate machine-code file first.
Concatenation
The operation of joining two or more strings together into one, often using the + operator.
Boolean
A data type with only two possible values: true or false.
Function
A named, reusable block of code that performs a specific task and can be called multiple times from a program.

Unit 3: Control Flow & Functions

Conditional (if statement)
A control structure that executes a block of code only when a specified boolean condition is true.
For loop
A loop structure typically used to repeat code a known or fixed number of times, often iterating over a range or collection.
While loop
A loop structure that repeats a block of code as long as a specified condition remains true.
Function
A reusable, named block of code that performs a specific task and can accept inputs (parameters) and return a value.
Parameter vs. argument
A parameter is the placeholder variable in a function's definition; an argument is the actual value passed in when the function is called.
Return statement
A statement that sends a value back to the code that called a function and immediately ends that function's execution.
Scope
The region of a program where a particular variable can be accessed, such as local (inside a function) or global (throughout the program).
Recursion
A technique where a function calls itself to solve smaller instances of the same problem, requiring a base case to stop.
Infinite loop
A loop whose stopping condition never becomes false, causing it to repeat forever unless forcibly stopped.
Base case
The condition in a recursive function that stops further recursive calls, preventing infinite recursion.

Unit 4: Data Structures Intro

Array / List
An ordered collection of elements, each accessible by a numeric index, typically starting at 0.
Stack
A LIFO (Last In, First Out) data structure where elements are added and removed from the same end (the top), via push and pop.
Queue
A FIFO (First In, First Out) data structure where elements are added at the back (enqueue) and removed from the front (dequeue).
Dictionary / Hash map
A data structure that stores key-value pairs, allowing fast lookup of a value using its unique key.
Set
A collection that stores only unique values, with no duplicates, supporting operations like union and intersection.
Tree
A hierarchical data structure of nodes connected by edges, starting from a single root node, with no cycles.
Graph
A structure consisting of nodes (vertices) connected by edges, which may be directed or undirected, used to model networks and relationships.
Hashing
The process of converting a key into an index using a hash function, enabling fast data lookup in a hash map.
Root node
The topmost node in a tree, from which all other nodes descend; it has no parent.
Leaf node
A node in a tree that has no children, located at the end of a branch.

Unit 5: Algorithms & Problem Solving

Algorithm
A precise, finite, step-by-step procedure for solving a problem or completing a task.
Linear search
A search algorithm that checks each element of a collection one at a time until the target is found or the end is reached; runs in O(n) time.
Binary search
A search algorithm that repeatedly halves a sorted collection to locate a target value; runs in O(log n) time but requires sorted data.
Big-O notation
A mathematical notation used to describe how an algorithm's runtime or memory usage grows as the size of its input increases.
O(n²) - Quadratic time
A growth rate where runtime increases with the square of the input size, often caused by nested loops over the same data, as in bubble sort.
O(log n) - Logarithmic time
A growth rate where runtime increases very slowly as input grows, typical of algorithms that repeatedly halve the problem, like binary search.
Bubble sort
A simple sorting algorithm that repeatedly compares and swaps adjacent out-of-order elements; runs in O(n²) time.
Merge sort
A divide-and-conquer sorting algorithm that splits data in half, recursively sorts each half, and merges the results; more efficient than bubble sort for large data.
Pseudocode
An informal, human-readable description of an algorithm's steps, used for planning before writing actual code.
Decomposition
A problem-solving strategy of breaking a large, complex problem into smaller, more manageable subproblems.

Unit 6: Web & Internet How It Works

Internet
A global network of interconnected computer networks that communicate using standardized protocols.
World Wide Web (WWW)
A system of linked documents (webpages) accessed via the internet, using HTTP/HTTPS and URLs.
IP address
A unique numeric label assigned to a device on a network, used to identify and locate it for data transmission.
DNS (Domain Name System)
A system that translates human-readable domain names (like example.com) into numeric IP addresses.
HTTP / HTTPS
HTTP is the protocol used for communication between web browsers and servers; HTTPS is its encrypted, secure version.
URL
A Uniform Resource Locator specifying the address of a resource on the internet, including protocol, domain, and path.
Client-server model
A structure where a client (e.g., a browser) requests resources or services from a server, which stores and provides them.
HTTP status code
A three-digit code returned by a server indicating the result of a request, such as 200 (OK), 404 (Not Found), or 500 (Server Error).
Packet
A small unit of data that is transmitted across a network and reassembled with other packets at its destination.
Encryption
The process of scrambling data so that only someone with the correct key can read it, protecting data in transit or storage.

Unit 7: Data & Privacy

Encryption
The process of converting readable data (plaintext) into unreadable form (ciphertext) using a key, reversible only by someone with the correct key.
Symmetric Encryption
Encryption that uses the same key to both encrypt and decrypt data; fast, but requires securely sharing the key.
Asymmetric Encryption
Encryption using a public key to encrypt and a mathematically linked private key to decrypt, allowing the public key to be shared openly.
Hashing
A one-way function that converts data into a fixed-length string; used to verify passwords or file integrity, but cannot be reversed.
Data Breach
An incident where unauthorized parties access sensitive stored data, often via stolen credentials, phishing, or unpatched software.
Two-Factor Authentication (2FA)
A security method requiring two forms of proof (like a password plus a code sent to your phone) before granting access.
Cookie
A small piece of data a website stores in your browser to remember information like login state or preferences between visits.
Third-Party Cookie
A cookie set by a domain other than the one you're visiting, commonly used by advertisers to track browsing across multiple sites.
GDPR
The EU's General Data Protection Regulation, which grants individuals rights over their personal data and requires organizations to handle it responsibly.
Right to Erasure
A GDPR right allowing individuals to request that a company delete their personal data ("right to be forgotten").
Phishing
A social engineering attack that tricks users into revealing credentials or installing malware by impersonating a trusted source.
Malware
Malicious software designed to damage, disrupt, or gain unauthorized access to a system, including viruses, worms, and ransomware.
Ransomware
Malware that encrypts a victim's files and demands payment in exchange for the decryption key.
Firewall
A system that filters network traffic based on security rules, blocking unauthorized access while permitting legitimate traffic.
Principle of Least Privilege
A security practice of giving users and programs only the minimum access necessary to perform their function.
Social Engineering
Manipulating people (rather than exploiting technical flaws) into giving up confidential information or access.
Data Minimization
The privacy principle of collecting only the personal data actually needed for a specific, stated purpose.
Credential Stuffing
An attack where stolen username/password pairs from one breach are tried on other sites, exploiting password reuse.
Salting
Adding random data to a password before hashing it, so identical passwords produce different hashes and are harder to crack in bulk.
Device Fingerprinting
A tracking technique that identifies a browser/device by its unique combination of settings and hardware traits, used as third-party cookies decline.

Unit 8: Ethics & Careers

Algorithmic Bias
Systematically unfair outcomes produced by a computer system for certain groups, usually caused by biased training data or flawed model design.
Proxy Variable
A feature that indirectly encodes a sensitive attribute (like race) through correlation, such as zip code, even when that attribute is excluded from a dataset.
Feedback Loop (in AI)
A cycle where a biased model's outputs generate new data that reinforces and amplifies the original bias over time.
Disparate Impact
A situation where a policy or algorithm that appears neutral produces significantly worse outcomes for one group compared to others.
AI Transparency
The degree to which people can understand how and why an AI system reached a particular decision.
Explainability
The ability to describe, in human-understandable terms, why an AI model produced a specific output — critical in high-stakes decisions.
Accountability (AI Ethics)
The principle that a person or organization, not the algorithm itself, bears responsibility when an AI system causes harm.
Deepfake
AI-generated audio or video that convincingly fabricates a person saying or doing something they never actually did.
Copyright
Legal protection that automatically applies to original creative or technical work, giving the creator exclusive rights to copy, modify, and distribute it.
Patent
Legal protection for a novel invention or process, granted for a limited time after formal application, preventing others from using it without permission.
Open-Source License
A license that grants others legal permission to use, modify, and share source code, under conditions the license specifies.
Permissive License
An open-source license (e.g. MIT, Apache) allowing broad reuse, including in closed-source products, typically requiring only attribution.
Copyleft License
An open-source license (e.g. GPL) requiring that derivative works built on the code also be released under the same open license.
Front-End Developer
A software engineer who builds the user-facing part of an application: layout, interactivity, and visual presentation.
Back-End Developer
A software engineer who builds the server-side logic, databases, and APIs that power an application behind the scenes.
Data Scientist
A professional who extracts insights and builds predictive models from data using statistics, programming, and visualization.
UX/UI Designer
A professional who designs how usable, intuitive, and visually coherent a product feels, blending research and visual design.
DevOps Engineer
A professional who manages the deployment pipeline and infrastructure that keeps software running reliably in production.
Penetration Tester
A cybersecurity professional hired to deliberately attempt to break into systems, finding vulnerabilities before real attackers do.
Coding Bootcamp
An intensive, short-term training program (often a few months) designed to teach practical programming skills as an alternative to a traditional degree.
Press 1–4 to answer · Enter for next

Unit 1: Computing Basics & Binary

What a Computer Actually Does
A computer is a machine that stores and manipulates data as electrical signals, following a stored program of instructions.
Binary: The Language of Computers
Computers represent all data using binary (base-2), a number system with only two digits: 0 and 1, because transistors are easiest to build as simple on/off switches.
Hexadecimal and Other Number Systems
Hexadecimal (base-16) is a compact way to represent binary values, since each hex digit maps exactly to 4 bits.
How Data Is Represented
Different kinds of data (numbers, text, images, sound) are all encoded into binary using agreed-upon schemes.
Hardware Components
A computer's physical hardware works together, with each component playing a specialized role in processing information.
Operating Systems and Software
The operating system (OS) is software that manages hardware resources and provides a platform for other programs to run.
Key fact
1 byte = 8 bits; 1 kilobyte (KB) ≈ 1000 bytes; 1 megabyte (MB) ≈ 1,000,000 bytes
Key fact
Binary 1011 = decimal 11; decimal 25 = binary 11001
Key fact
ASCII uses 7-8 bits per character; UTF-8 can use 1-4 bytes per character to support all languages
Key fact
Moore's Law observed that transistor counts (and roughly computing power) doubled about every two years

Unit 2: Programming Fundamentals

Variables and Data Types
A variable is a named storage location that holds a value which can change while a program runs; every value has a data type that determines what operations are valid on it.
Operators and Expressions
Operators combine values and variables into expressions that produce a result, covering arithmetic, comparison, and logic.
Input, Output, and Program Structure
Programs typically follow a pattern of receiving input, processing it, and producing output, structured as a sequence of statements executed in order.
Debugging and Errors
Errors (bugs) are inevitable in programming; recognizing the type of error is the first step to fixing it.
Writing Readable, Reliable Code
Good programming style makes code easier to read, test, and maintain, both for yourself and others.
Programming Paradigms and Languages
Programming languages provide different tools and styles for expressing solutions, but most fundamentals transfer between them.
Key fact
The modulo operator (%) returns the remainder of division, e.g., 7 % 2 = 1
Key fact
In most languages, = assigns a value while == checks for equality
Key fact
Python uses indentation to define code blocks; languages like Java use curly braces {}
Key fact
A compiler translates code before execution; an interpreter translates and runs it line-by-line

Unit 3: Control Flow & Functions

Conditionals (if/else)
Conditionals let a program make decisions, executing different code depending on whether a condition is true or false.
Loops: For and While
Loops let a program repeat a block of code multiple times without rewriting it, controlled by a counter or a condition.
Functions and Parameters
A function is a reusable, named block of code that performs a task, optionally accepting inputs (parameters) and returning an output.
Scope
Scope determines where in a program a variable can be accessed, which prevents naming conflicts and controls how data flows.
Combining Control Flow
Real programs combine conditionals, loops, and functions together to build more complex, useful behavior.
Common Patterns and Pitfalls
Certain patterns in control flow appear repeatedly across programs, along with common mistakes beginners make.
Key fact
An if/elif/else chain executes exactly one branch per run, never more than one
Key fact
A for loop is best when the number of repetitions is known; a while loop is best when it depends on a condition
Key fact
Every function call with a return statement produces a value that can be stored or used elsewhere
Key fact
A recursive function must have a base case to avoid infinite recursion

Unit 4: Data Structures Intro

Arrays and Lists
An array (or list) stores multiple values together in a single ordered collection, each accessible by a numeric index.
Stacks and Queues
Stacks and queues are ordered collections that restrict how you add and remove elements, following specific access patterns.
Dictionaries / Hash Maps
A dictionary (also called a hash map or associative array) stores data as key-value pairs, letting you look up a value quickly using a unique key instead of a numeric index.
Sets
A set is a collection that stores only unique values, with no duplicates and typically no guaranteed order.
Trees and Graphs (Introductory)
Trees and graphs are structures used to represent hierarchical or interconnected data, going beyond simple linear sequences.
Choosing the Right Data Structure
Different data structures have different strengths, and choosing the right one depends on what operations your program needs to perform efficiently.
Key fact
Arrays/lists are zero-indexed in most programming languages: the first element is at index 0
Key fact
Stack = LIFO (Last In, First Out); Queue = FIFO (First In, First Out)
Key fact
Dictionary lookups by key are typically much faster than searching an unsorted list for a value
Key fact
A set automatically eliminates duplicate values

Unit 5: Algorithms & Problem Solving

What Is an Algorithm?
An algorithm is a precise, step-by-step procedure for solving a problem or completing a task, which a computer can follow exactly.
Searching Algorithms
Searching algorithms find whether (and where) a target value exists within a collection of data.
Sorting Algorithms
Sorting algorithms arrange data into a specific order (like ascending numbers or alphabetical order), which is often a prerequisite for efficient searching.
Big-O Notation: Measuring Efficiency
Big-O notation describes how an algorithm's running time (or memory use) grows as the size of its input grows, allowing comparison of efficiency independent of hardware.
Problem-Solving Strategies
Effective problem solving in computer science often follows a repeatable process: understand, plan, implement, and test.
Algorithm Design Trade-offs
Choosing an algorithm often involves trade-offs between speed, memory usage, and simplicity, rather than one single 'best' choice.
Key fact
Binary search requires sorted data and runs in O(log n) time, much faster than linear search's O(n) for large datasets
Key fact
Bubble sort and selection sort run in O(n²) time, making them inefficient for large datasets
Key fact
Big-O notation describes how runtime grows with input size, not the exact number of seconds a program takes
Key fact
Decomposition (breaking a problem into smaller parts) is a foundational problem-solving strategy in computer science

Unit 6: Web & Internet How It Works

The Internet vs. the Web
The internet is a global network of interconnected computers, while the World Wide Web is a system of linked documents (websites) that runs on top of that network.
IP Addresses and DNS
Every device on the internet needs a unique address to send and receive data, and a naming system to make those addresses human-friendly.
How Web Pages Are Loaded
Loading a website involves a client (your browser) requesting data from a server, which responds with the content to display.
HTTP Requests, Responses, and Status Codes
Communication between a browser and server follows a request-response pattern, with standardized codes indicating the outcome.
Web Development Basics
Building websites typically combines structural, visual, and behavioral layers, alongside a place to store and serve the site.
Networking Concepts and Security Basics
Understanding how networks are structured and protected is foundational to using the internet safely.
Key fact
DNS translates human-readable domain names into numeric IP addresses
Key fact
HTTPS encrypts data between browser and server; HTTP does not
Key fact
A 404 status code means the requested resource was not found; a 200 means success
Key fact
HTML structures content, CSS styles it, and JavaScript adds interactivity

Unit 7: Data & Privacy

Encryption Basics
Encryption scrambles readable data (plaintext) into unreadable data (ciphertext) using a key, so only someone with the right key can reverse the process.
Data Breaches
A data breach happens when unauthorized parties gain access to sensitive stored data, often through stolen credentials, software vulnerabilities, or social engineering.
Cookies & Tracking
Cookies are small pieces of data websites store in your browser to remember information between visits, such as login state, preferences, or browsing behavior.
Privacy Regulations (GDPR-style)
Privacy laws like the EU's GDPR (General Data Protection Regulation) give individuals rights over their personal data and require organizations to handle it responsibly.
Cybersecurity Fundamentals
Cybersecurity is the practice of protecting systems, networks, and data from unauthorized access, damage, or disruption.
Key fact
Encryption scrambles data reversibly with a key; hashing transforms data one-way and cannot be reversed.
Key fact
HTTPS combines asymmetric encryption (to exchange a key) with symmetric encryption (to protect the actual data).
Key fact
GDPR gives users rights to access, correct, and erase their personal data, and requires breach notification within 72 hours.
Key fact
Two-factor authentication and unique passwords are the most effective everyday defenses against account breaches.

Unit 8: Ethics & Careers

Algorithmic Bias
Algorithmic bias occurs when a computer system produces systematically unfair outcomes for certain groups, usually because of biased training data or flawed design choices, not because a program is intentionally programmed to discriminate.
AI Ethics
AI ethics addresses the responsibilities that come with building and deploying artificial intelligence systems that can affect people's lives, rights, and opportunities.
Intellectual Property & Licensing
Intellectual property (IP) law protects creative and technical work; in software, licenses define exactly how others are legally allowed to use, modify, and distribute that work.
Careers in Tech
The tech industry offers many distinct career paths that require different skill combinations, from writing code to designing systems to analyzing data.
Ethics & Careers: Exam Lens
Questions on this unit test whether you can identify real ethical failure modes and distinguish them from unrelated technical concepts covered elsewhere in the course.
Key fact
Algorithmic bias usually comes from biased or unrepresentative training data, not from an explicit intent to discriminate.
Key fact
Removing a sensitive attribute from a dataset does not eliminate bias if correlated proxy variables (like zip code) remain.
Key fact
Copyleft licenses (like GPL) require derivative works to be released under the same license; permissive licenses (like MIT) do not.
Key fact
Accountability in AI ethics means a person or organization is responsible for an AI system's harms — not the algorithm itself.
Common mistakes for each unit — read the mistake, then make sure you know why it's wrong.

Unit 1: Computing Basics & Binary

Watch out
RAM is temporary/volatile working memory, not permanent storage — data in RAM is lost when power is off
Watch out
A byte is 8 bits, not 10 bits — binary place values are powers of 2, not powers of 10
Watch out
The CPU executes instructions; it is the GPU, not the CPU, that is optimized for massively parallel tasks like graphics
Watch out
Hexadecimal is a human-friendly shorthand for binary, not a separate system computers use internally — hardware still stores everything in binary

Unit 2: Programming Fundamentals

Watch out
= is assignment (stores a value), not ==, which is comparison (checks equality)
Watch out
A syntax error prevents code from running at all; a logic error lets code run but produces a wrong answer, not a crash
Watch out
Concatenating strings with + joins text together, not adds numbers — '2' + '2' gives '22' in many languages, not 4
Watch out
Compiled and interpreted are about when/how code is translated, not about which language is 'better' — both approaches are valid

Unit 3: Control Flow & Functions

Watch out
break exits the loop entirely; continue skips only the current iteration and keeps looping — they are not the same
Watch out
Parameters are the names in a function's definition; arguments are the actual values passed in when calling it
Watch out
A local variable inside a function is not accessible outside it, even though a global variable with a similar name might exist
Watch out
An infinite loop is a bug caused by a condition that never becomes false, not an intentional feature

Unit 4: Data Structures Intro

Watch out
A stack is LIFO, not FIFO — the last item added is the first removed, unlike a queue
Watch out
Accessing an array element by index is fast; searching for a value's position without an index is slower, especially in an unsorted array
Watch out
Dictionaries are not guaranteed to be ordered by position the way arrays are (even if some languages preserve insertion order as an implementation detail)
Watch out
A tree is a specific, hierarchical type of graph (no cycles, one root), not a completely separate unrelated concept from graphs

Unit 5: Algorithms & Problem Solving

Watch out
Binary search only works on sorted data — running it on unsorted data gives incorrect results
Watch out
O(log n) is much faster than O(n) for large inputs, not slower — logarithmic growth is very slow-growing, which is good
Watch out
Big-O describes growth trends for large inputs, not a literal count of seconds or a guarantee about small inputs
Watch out
An algorithm that works on the example given isn't automatically correct — it must be verified against edge cases and all valid inputs

Unit 6: Web & Internet How It Works

Watch out
The internet and the World Wide Web are not the same thing — the Web is a service (linked documents) that runs on top of the internet infrastructure
Watch out
HTTPS is not just 'HTTP but newer' — it specifically adds encryption (via SSL/TLS) to protect data in transit
Watch out
A 404 error means the resource wasn't found, not that the whole internet is down — it's specific to that URL/request
Watch out
IP addresses identify devices numerically; domain names are the human-friendly labels DNS maps to those numbers, not the reverse

Unit 7: Data & Privacy

Watch out
A hash is one-way and cannot be decrypted, not a form of encryption you can reverse with a key.
Watch out
The HTTPS padlock means the connection is encrypted, not that the site itself is safe or legitimate.
Watch out
Third-party cookies enable cross-site tracking; first-party cookies just support the site you're actually visiting, not ad networks.
Watch out
Clearing your cookies removes local tracking data, not the data companies already collected and stored on their servers.

Unit 8: Ethics & Careers

Watch out
Algorithmic bias is usually the result of skewed training data or flawed design, not deliberate programmer intent to discriminate.
Watch out
A permissive license like MIT allows use in closed-source software; a copyleft license like GPL requires derivatives to stay open-source — mixing them up is a common exam trap.
Watch out
Copyright protects creative/expressive works automatically at creation, while a patent must be formally applied for and approved to protect an invention or process.
Watch out
High overall accuracy does not prove a model is fair — it can still perform far worse for specific subgroups, which is why disparate-impact audits matter.