AP Computer Science Principles: Unit 2 Study Guide - Internet, Networking, & Security
Assessment Overview & Logistics
Instructor: Mr. Akif
Assessment Date: 09/2026
Duration & Format: 1 Hour duration, 30 total questions comprising Multiple Choice Questions (MCQs) and Free Response Questions (FRQs), administered entirely on paper.
Assessment Type & Weighting: Summative assessment representing a major component of the overall course grade.
Question Composition: Mix of official AP Exam questions and instructor-authored items.
Preparation Material: Practice problem bundle accessible on AP Classroom.
Data Compression
Lossy Compression:
Definition: A data compression technique where redundant or non-essential details are permanently discarded from the original file to minimize storage size.
Key Trade-off: Yields significantly smaller file sizes at the cost of slight loss in quality; the original binary file cannot be perfectly reconstructed.
Primary Applications: Audio files (), images (), and video files () where lost detail is largely unnoticeable to human perception.
Lossless Compression:
Definition: A data compression method that compresses file size while retaining full integrity of all original data bits.
Key Trade-off: Restores the exact original data upon decompression, but results in a lower compression ratio (larger file size) compared to lossy methods.
Primary Applications: Software executables, code files, text documents (, ), medical records/images, and archives (, ).
Run-Length Encoding (RLE):
Mechanism: A lossless compression algorithm that replaces consecutive identical data values (runs) with a single value and its repetition count (e.g., sequence
AAAAABBbecomes5A2B).Scenario Selection Criteria: Highly effective for simple, non-complex data containing long continuous sequences of repeating elements (e.g., monochrome bitmap images or simple icon graphics). Ineffective or counterproductive for high-entropy data (e.g., complex photographic images or text with low repetition) where it can increase total file size.
Cryptography
Cryptographic Key:
A specific piece of data (a sequence of numbers or characters) utilized by cryptographic algorithms to encrypt plaintext or decrypt ciphertext.
Encryption vs. Decryption:
Encryption: The systematic mathematical encoding of readable plaintext into unreadable ciphertext to guarantee confidentiality across unsecured communications.
Decryption: The reverse process of converting ciphertext back into its original readable plaintext using a corresponding key.
Caesar Cipher:
A simple monoalphabetic substitution cipher where each character in a plaintext message is replaced by another character shifted a fixed number of positions down the alphabet (e.g., with a shift value of , character
Amaps toD).
Symmetric vs. Asymmetric Encryption:
Symmetric Encryption: Uses a single shared secret key for both encryption and decryption. Requires a secure method for pre-sharing keys between communication parties, presenting a distribution risk over public networks.
Asymmetric Encryption: Uses a mathematically related key pair consisting of a public key and a private key to secure data without exchanging secret keys beforehand.
Public Key Encryption:
Public Key: Publicly distributed to anyone; used by senders to encrypt data intended exclusively for the key owner.
Private Key: Kept strictly confidential by the owner; used exclusively by the owner to decrypt data encrypted with their corresponding public key.
Internet Hardware & Signal Transmission
Physical Encoding of Digital Signals:
Conversion of binary data (s and s) into physical phenomena for transport across physical transmission media:
Electricity: High and low voltage pulses over conductive copper lines.
Light: Pulses of light (photons) routed through glass or plastic fiber optics.
Radio Waves: Modulated high-frequency electromagnetic radio signals transmitted wirelessly through atmospheric space.
Hardware Media Types:
Ethernet / Copper Cables: Transmits signals as electrical pulses. Cost-effective for short distances; prone to signal attenuation and electromagnetic interference.
Fiber Optic Cables: Transmits signals as light pulses. Provides immense bandwidth, long-range transmission capability, and zero susceptibility to electromagnetic interference.
Wi-Fi / Wireless Access Points: Transmits signals using radio frequency waves. Enables mobility without wired infrastructure; affected by range limitations, solid wall obstructions, and channel interference.
Key Network Metrics:
Bandwidth: The maximum theoretical data capacity or maximum transmission speed of a network connection, measured in bits per second (e.g., , ).
Bitrate: The actual rate of physical bit transfer accomplished across a network channel over a given unit of time (e.g., ).
Latency: The duration of time taken for a data packet to travel from its source origin to its target destination, measured in milliseconds ().
Internet Addressing & IP Protocols
Internet Protocol (IP):
The core network-layer protocol responsible for defining unique device addresses and routing data packets across global inter-networks.
IPv4 vs. IPv6 Specification:
IPv4: Uses a address structure expressed as four decimal numbers () separated by dots (e.g., ). Supports approximately unique device addresses.
IPv6: Uses a address structure expressed as eight hexadecimal blocks separated by colons (e.g., ). Supports unique addresses, solving IPv4 address depletion.
Hierarchical Structure of IP Addresses:
IP addressing is hierarchical, functioning like a postal delivery system:
Network ID (Prefix): Identifies the broad network or subnetwork.
Host ID (Suffix): Identifies the specific individual device connected to that network.
Domain Name System (DNS)
URL Components:
Domain: Human-friendly text name assigned to identify a web server (e.g.,
example.com).Path: The specific file directory path on the server pointing to the requested file resource (e.g.,
/images/photo.jpg).Full URL Anatomy: Protocol (
https://), Subdomain (www.), Domain Name (example.com), Port (:443), and Path (/docs/page.html).
Complete DNS Lookup Process (Free Response Question):
User Request: User inputs a web address (e.g.,
example.com) into a web browser.Local Cache & Resolver Query: The browser checks its local cache. If the address is missing, it submits a query to a DNS Recursive Resolver (typically provided by the ISP).
Root Server Query: The Recursive Resolver queries a global Root Name Server to locate the Top-Level Domain (TLD) server handling
.comdomains.TLD Server Query: The Root Server responds with the IP address of the TLD Name Server, which the resolver then queries for
example.com.Authoritative Server Query: The TLD server responds with the address of the Authoritative Name Server responsible for
example.com. The resolver queries this Authoritative server.IP Resolution & Caching: The Authoritative server returns the actual IP address corresponding to
example.com. The resolver caches this record and sends the IP address back to the user's browser to open a connection.
Network Routing & Fault Tolerance
Routing Cost:
A comparative metric calculated by dynamic routing protocols to select the optimal transmission path for data packets. Parameters affecting cost include latency, bandwidth, physical distance, monetary cost, hop count, and traffic congestion.
Fault-Tolerant Systems:
Definition: System design capability that allows a network to continue operating without interruption during individual router, link, or hardware failures.
Mechanism: Relies on redundancy (the presence of multiple alternative routing paths connecting network nodes). If a specific path or router drops, protocols immediately reroute traffic through backup operational pathways.
Packets, Metadata, & Core Internet Protocols
Protocol Definition:
A standardized, mutually agreed-upon system of rules governing how devices format, transmit, route, and interpret digital data across networks.
Key Internet Protocols:
TCP (Transmission Control Protocol): Transport layer protocol responsible for reliable, ordered, and error-checked data stream delivery. Handles breaking data into packets, reassembling packets, tracking missing packets, and requesting retransmissions.
IP (Internet Protocol): Network layer protocol providing logical addressing and routing mechanisms to deliver packets across disparate physical networks.
HTTP (Hypertext Transfer Protocol): Application layer protocol facilitating client-server communication and hypermedia document transfer for the World Wide Web.
Data Packets & Metadata:
Packet: A small chunk into which larger digital messages are broken for independent transmission over packet-switched networks.
Metadata: Operational data contained within packet headers used to route and manage data. Includes source IP address, destination IP address, packet sequence numbers, protocol identifiers, packet size, and error-checking checksums.
Multi-Step Webpage Retrieval Process
Step-by-Step Procedure (Free Response Question):
Address Entry: The user enters a URL into their web browser.
DNS Resolution: The browser performs a DNS lookup query to resolve the requested domain name into its corresponding numerical IP address.
TCP Connection: The browser initiates and completes a TCP handshake with the target web server IP address to establish a secure, reliable socket connection.
HTTP Request: The browser generates and sends an HTTP GET request to the web server over the established TCP connection.
Server Processing & Packetization: The web server processes the request, locates the requested HTML file, breaks the data payload into multiple TCP packets, wraps them with IP headers, and sends them out.
Dynamic Packet Routing: Individual IP packets travel independently across routers using optimal paths determined by routing algorithms.
TCP Reassembly: The client browser receives the incoming packets, checks metadata for missing or corrupted packets, requests retransmissions if needed, and reassembles them in correct numerical sequence.
Browser Rendering: The browser parses the reassembled HTML, CSS, and script code to render the final webpage on the user's screen.
Societal Impact of the Internet & Intellectual Property
Pervasive Impact of the Internet:
Fundamentally reshaped global communication, commercial trade, remote employment, distributed learning, healthcare access, and entertainment media.
Citizen Science:
Collaborative scientific research where members of the public actively assist scientists by collecting, analyzing, and reporting distributed experimental data via digital network tools.
Crowdfunding:
The practice of raising financial contributions for projects, businesses, or philanthropic causes from a large number of internet users through specialized web platforms.
Digital Divide:
The persistent gap between demographic or geographic regions with high-speed internet access and modern technology infrastructure and those lacking access due to socioeconomic or geographic barriers.
Open Source:
Software development movement where source code is made freely available for anyone to view, use, modify, adapt, and distribute without license fees.
Creative Commons:
A standardized legal licensing framework that allows creators to retain copyright while granting public permission to share, reuse, or build upon their intellectual property under tailored conditions.
Digital Millennium Copyright Act (DMCA):
A United States copyright statute that protects digital intellectual property by penalizing the unauthorized production, distribution, or circumvention of technological protection measures (such as DRM).
Cybersecurity Threats & Authentication
Types of Cyber Attacks:
DDoS (Distributed Denial of Service): An attack in which multiple infected host systems (a botnet) flood a targeted web server or network resource with artificial traffic, depleting bandwidth and computing capacity to make the service unavailable to legitimate users.
DNS Hijacking / Spoofing: An attack vector where corrupt DNS records are injected into a resolver's cache, falsely redirecting users from legitimate domain addresses to fraudulent, malicious web servers.
Phishing: A social engineering attack where malicious actors send deceptive, highly convincing messages (e.g., fraudulent emails) disguised as legitimate organizations to trick victims into surrendering sensitive credentials or personal data.
Certificate Authority (CA):
A trusted commercial or institutional organization that validates the identity of entities owning web servers and issues digital SSL/TLS certificates. CAs establish authenticity and enable secure encrypted HTTPS protocols on the internet.