AP Computer Science Principles Notes

Main Ideas

  • Creativity: Important for innovation.
  • Abstractions: Minimize details to focus on relevant information.
  • Data/Information: Input for computing; computation translates raw data into consumable information.
  • Algorithms: Used to develop solutions to computational problems.
  • Programming: Enables problem-solving and algorithm creation.
  • The Internet: Understanding its structure and function is crucial, especially regarding cybersecurity.
  • Global Impact: Computation has changed communication and problem-solving.

Unit 1: The Internet

  • The Internet: A group of connected computers and servers.
  • Prototype: An original model for later versions.
  • Innovation: A new method, idea, or device.
  • Binary: Representing information using two options (0 or 1).
  • Bit: Binary Digit; the single unit of information (0 or 1).
  • Bandwidth: Transmission capacity measured by bit rate.
  • Bit rate: Bits conveyed or processed per unit of time (e.g., 8 bits/sec).
  • Latency: Time for a bit to travel from sender to receiver.
  • Protocol: Rules governing data exchange between devices.
  • Abstraction: A simplified representation of complexity.
  • ASCII: Universally recognized raw text format.
  • IP Address: A number assigned to devices connected to the Internet.
  • Packets: Small information chunks from larger information.
  • Network Redundancy: Multiple backups for reliability.
  • Router: Forwards data across a network.
  • DNS (Domain Name System): Translates domain names to IP addresses.
  • IETF (Internet Engineering Task Force): Develops Internet standards and protocols.
  • Request for Comments: How standards are defined and published on the IETF website.
  • HTTP (HyperText Transfer Protocol): Protocol for transmitting web pages.
  • TCP(Transmission Control Protocol): Provides reliable, ordered, error-checked delivery of packets; often paired as TCP/IP.
  • URL (uniform resource locator): Easy-to-remember web page address.
  • SSL (Secure Sockets Layer): Security technology for encrypted link between web server and browser.
  • SSL Certificate: Obtained from a Certification Authority (CA).
  • TLS (Transport Layer Security): Cryptographic protocol for secure communication over networks; successor to SSL.
  • SMTP (Simple Mail Transfer Protocol): For formatting and sending email messages.
  • POP (Post Office Protocol)/IMAP (Internet Message Access Protocol): Used to retrieve emails.
  • HTML (Hypertext Markup Language): Code used to format web pages.
  • Net Neutrality: All Internet traffic treated equally by Internet Service Providers.

Sending Information

  • Internet is like a postal service for binary information.
  • Binary information consists of bits (on/off, yes/no).
  • Bits are sent via light, electricity, or wirelessly.
    • Copper wire: cheap, but signal loss.
    • Fiber optic cable: fast, no signal loss, but expensive and hard to work with.
    • Radio waves: mobile, but short range.
  • Bits represented as 1 or 0 (binary or base2 system).

Reading Binary

  • Binary: Base-2 system (on/off).
  • Calculated from right to left; each digit is 2^n (n is the position from the right starting at 0).
  • Example:
    • 0101 1001
      1. Number digits from right to left (7654 3210)
      2. Each digit is 2^n (2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0)
      3. Disregard digits with 0: (2^6 2^4 2^3 2^0)
      4. Add the numbers: 64+16+8+1
      5. Answer: 89
  • ASCII: Uses 8 bits (a byte) to represent a character.

How Information Travels

  1. Information is divided into numbered packets.
  2. Packets are sent independently through routers.
    • Information for reconstruction is included (sender, receiver, source file, packet number).
    • Network redundancy uses extra routers for fault tolerance.
  3. TCP/IP reassembles packets in the correct order.
    • Missing data prompts a resend request.

Unit 2: Digital Information

  • Heuristic: Problem-solving approach for satisfactory solutions when optimal ones are impractical.
  • Lossless Compression: Original data perfectly reconstructed.
  • Lossy Compression: Irreversible; some data discarded (e.g., .jpg).
  • Image: Data used for graphics/pictures.
  • Metadata: Data describing other data (e.g., image size, colors).
  • Pixel: