APCSP Unit 1 Vocabulary Notes
Bit
- Definition: The smallest unit of data in a computer, representing a binary value of either 0 or 1.
- Significance: Forms the basis of all digital data and computing; everything is ultimately represented in binary.
- Related concepts: Binary, Byte, ASCII, RGB.
- Example: A single switch in a digital circuit outputs either 0 or 1.
Byte
- Definition: A unit of data consisting of eight binary digits.
- Significance: Commonly used to represent a character (e.g., letters, numbers, spaces) in text encoding.
- Key relation: 1 byte=8 bits.
- Values: A byte can represent up to 28=256 distinct values.
- Examples: ASCII characters are typically encoded in 1 byte in many systems (with historical 7-bit ASCII).
Binary
- Definition: A base-2 numbering system with only two possible digits: 0 and 1.
- Significance: Foundation of digital data, computer memory addressing, and logic.
- Note: Other bases (e.g., base-10) are converted to binary for processing.
- Connection: Used to build bytes (8 bits) and represent instructions and data.
Algorithm
- Definition: A complete, well-defined sequence of steps for completing a task or solving a problem.
- Characteristics: Deterministic, finite, and unambiguous.
- Purpose: Enables a computer to perform tasks reliably and reproduce results.
- Examples: Sorting a list, finding the greatest common divisor, parsing input.
- Significance: Algorithms underpin all software and hardware behavior.
Program
- Definition: A sequence of instructions or steps, written in a language interpretable by a computer, to perform a task.
- Scope: Implemented as code that the computer executes to achieve a function.
- Relationship: A program is composed of statements, which may invoke algorithms.
- Practical note: Programs can fail due to logic errors, runtime errors, or resource constraints.
Blocks (Snap!)
- Definition: Puzzle-piece shapes used to create code in Snap!.
- Purpose: Visual, modular way to build programs without syntax errors.
- Benefit: Helps learners understand programming concepts like control flow, events, and data handling.
Scripts (Snap!)
- Definition: Linked blocks that define the behavior of objects (sprites) or the stage.
- Function: When scripts are run, they execute the sequence of connected blocks.
- Types: Different scripts can respond to events, user input, or timers.
Sprites
- Definition: Objects in Snap! that perform functions controlled by scripts.
- Role: Objects in the scene that can be programmed to move, react, or interact.
- Interaction: Sprites are controlled by their own scripts; they can communicate via messages or variables.
Stage
- Definition: The background of a project.
- Function: Provides the canvas on which sprites operate; can be manipulated via scripts.
- Significance: Central in visual programming environments for displaying results and feedback.
Logic error
- Definition: A mistake in the algorithm or program that causes incorrect or unexpected behavior.
- Distinction: Different from syntax errors (which break code) and runtime errors (which crash during execution).
- Detection: Often found via tracing, testing, or debugging.
Tracing
- Definition: Hand-simulating the execution of program code to verify its correctness.
- Purpose: Helps understand control flow, data changes, and potential edge cases without running the program.
- Benefit: Early detection of logic errors and understanding of how data transforms step by step.
Debugging
- Definition: The process of identifying and removing errors from software (or hardware).
- Steps: Reproduce error, locate source, apply fix, verify by testing.
- Tools: Tracing, testing, breakpoints, and other debugging techniques.
ASCII
- Definition: American Standard Code for Information Interchange; a character encoding standard for electronic communication.
- Note: Originally a 7-bit encoding; extended ASCII uses 8 bits for 256 possible characters.
- Significance: Early standard for representing text in computers and communication systems.
Overflow Error
- Definition: An error that occurs when calculated data cannot fit within the designated field or storage size.
- Example: Storing a value larger than the maximum representable in a fixed number of bits leads to wraparound or incorrect results.
- Consequence: Can corrupt data, cause crashes, or security vulnerabilities if unchecked.
Roundoff Error
- Definition: Error that occurs when real numbers cannot be represented exactly in a computer due to finite precision.
- Impact: Small cumulative inaccuracies in calculations; important in numerical computing.
- Example: Representing 31 in binary leads to approximation rather than exact value.
Underflow Error
- Definition: When a mathematical operation results in a number smaller than the device can store (often approaching zero or subnormal ranges).
- Consequence: May result in zero or loss of precision for very small numbers.
Pixel
- Definition: A minute area of illumination on a display screen; one of many from which an image is composed.
- Role: The smallest controllable element in a raster image or display; collectively form images.
RGB (Red, Green, Blue)
- Definition: A color representation system for displays where colors are created by combining red, green, and blue light.
- Information: Each color channel can be varied independently to produce a wide spectrum of colors.
- Common convention: In many systems, each channel is an 8-bit value, giving 2563=16,777,216 possible colors.
- Formula: extTotalcolors=28⋅3=224=16,777,216.
Heuristic
- Definition: A problem-solving approach (algorithm) used to find a satisfactory, rather than optimal, solution when optimality is impractical or impossible.
- Characteristic: Often faster and more scalable than exhaustive search but does not guarantee the best possible result.
- Example: Greedy algorithms, hill climbing, and the use of intuition in debugging or design.
- Significance: Useful in AI, optimization, and real-world problem solving where exact methods are infeasible.
Lossless Compression
- Definition: A data compression method that allows the original data to be perfectly reconstructed from the compressed data.
- Examples: ZIP, PNG (for images), FLAC (audio).
- Significance: Essential when exact data recovery is required (text, code, archival data).
Lossy Compression
- Definition: A data encoding and compression technique that deliberately discards some data to reduce size.
- Examples: JPEG (images), MP3 (audio), MPEG (video).
- Trade-off: Reduces file size at the cost of some loss of fidelity; acceptable for perceptual data where some loss is imperceptible.
Creative Commons (Public Copyright License)
- Definition: A license that enables free distribution of an otherwise copyrighted work.
- Purpose: Allows creators to grant others rights to share, use, and build upon their work.
- Key idea: Enables flexible reuse while preserving the creator’s attribution and chosen permissions.
Open Source
- Definition: Software that is freely available to use, modify, and redistribute.
- Rights: Can be redistributed and modified; source code is accessible.
- Relevance: Encourages collaboration, transparency, and community-driven improvements.
Open Access
- Definition: Online research output that is free of most restrictions on access and often with fewer restrictions on use.
- Distinction: Focuses on accessibility of scholarly work; aims to remove paywalls and restrictive licensing barriers.
- Practical impact: Facilitates wider dissemination, replication of results, and accelerated scientific progress.
Connections and practical implications
- Data representation: Bit, Byte, Binary underpin all digital information and encoding schemes (ASCII, RGB).
- Computation workflow: Algorithms drive programs, which are realized as Snap! blocks/scripts to control Sprites and Stage.
- Error handling and precision: Logic errors, tracing, and debugging are essential for reliable software; numeric issues include overflow, underflow, and roundoff errors in computations.
- Media and display: Pixels and RGB define how images and colors are represented on screens; understanding color depth and compression affects quality and performance.
- Data management and ethics: Lossless vs lossy compression affects data fidelity; licensing (Creative Commons, Open Source, Open Access) shapes how information and software can be shared and built upon.
Summary of key relationships
- 1 byte = 8 bits; 256 values per byte; supports character encoding like ASCII.
- RGB color uses 3 channels, typically 8 bits per channel, allowing about 16.78 million colors.
- Algorithms are implemented in programs through blocks (Snap!); tracing and debugging ensure correct behavior.
- Open licensing models (Creative Commons, Open Source, Open Access) promote sharing, collaboration, and accessibility in technology and information.