Kami Export - Comp sci principles study guide (1)

AP Computer Science Principles Study Guide

Page 1

Unit 1: The Internet
Lesson 1: Personal Innovations
  • Innovation: A new or improved idea, device, or product.
    Key Idea: Computer Science is transforming various sectors such as energy, fashion, medicine, and public safety.
Lesson 2: Sending Binary Messages
  • Binary: A number system consisting of only 1s and 0s.
  • Bit: The smallest unit of information in a computer, represented as a 0 or 1.
    Note: Binary questions have two answers (yes/no).
Lesson 3: Sending Binary Messages with the Internet Simulator
  • Bandwidth: The maximum transmission capacity measured in bit rates.
    • Example: 8 bits/second.
  • Bit Rate: The number of bits transmitted per unit of time.
  • Latency: Time taken for a bit to travel from sender to receiver.
  • Protocol: A set of rules for data transmission between devices.

Page 2

Key Concepts about the Internet
  • The internet is a physical system used for information transmission, analogous to a mailbox but operates in bits.
  • Conversions of Bits: 8 bits = 1 byte 1024 bytes = 1 kilobyte 1024 kilobytes = 1 megabyte.
  • Sending Bits:
    • Electricity: Uses binary signals to communicate.
    • Using a Timer for Better Communication: Improved bit rates.
    • Increasing Bandwidth: Necessary for higher speeds in data transmission.
  • Light:
    • Utilizes fiber optic cables for high-speed data transfer without signal loss.

Page 3

Other Transmission Media
  • Radio:
    • Wireless and shorter range communication.
    • Converts binary messages into radio waves.
Lesson 4: Number Systems
  • Patterns in number systems must be adhered to for accuracy.
Lesson 5: Binary Numbers
  • Encoding in binary using place values is more complex than decimal systems.
Lesson 6: Sending Numbers
  • Protocol: Governs data exchange.
  • Quick Question: For a 75x75 coordinate grid, the minimum bits required to encode coordinates?
    Answer: c) 13 bits.

Page 4

Sending Text
  • Abstraction: Simplifying complex representations.
  • ASCII: A coding representation for characters.
  • Quick Questions:
    • Minimum bits to encode 26 letters + space: 5 bits.
    • Standard QWERTY keyboard with 47 keys including Shift: Needs 7 bits.

Page 5

ASCII and Data Representation
  • ASCII encodes both letters and numbers.
  • How many bits to store the text "150" in ASCII? Answer: 24 bits.

Page 6

Lesson 8: The Internet
  • IETF: Develops internet standards (TCP/IP).
  • Net Neutrality: All internet traffic should be treated equally by ISPs.
Lesson 9: IP Addresses
  • IP Address: A unique identifier for devices on the internet.
  • Packet: A small block of information sent through a network.
  • Quick Questions:
    • Traditional IP addresses: 32 bits, IPv4 allows 4 billion addresses.

Page 7

DNS and Its Function
  • DNS (Domain Name System): Translates website names to IP addresses.
  • Important for unique IP address handling and groups of DNS servers.

Page 8

Routers and Redundancy
  • Network Redundancy: Ensures reliability during high use/failures.
  • Routers forward data across the network using addressing information.
Lesson 11: Packets and Reliability
  • TCP (Transmission Control Protocol): Ensures reliable, ordered delivery of data packets.
  • Information travels in packets that may take different routes to the destination.

Page 9

DNS and HTTP
  • DNS: Translates domain names to IP addresses.

- HTTP (HyperText Transfer Protocol): Used for transmitting web pages.

Page 10

Digital Information
Lesson 1: Bytes and File Sizes
  • Example Quick Question: Is saving 10,000 photos on an 8GB phone possible? Answer: No.
Lesson 2: Text Compression
  • Heuristic: Approach for satisfactory problem-solving.
  • Lossless Compression: Original data can be perfectly reconstructed.

- Lossy Compression: Irreversible, discards some data.

Page 11

Encoding Images
  • Metadata: Data describing other data, e.g., image size and resolution.
  • Pixel: Fundamental unit in digital images.
Lesson 4: Encoding Color Images
  • Hexadecimal (Base-16): Utilizes 0-9 and A-F to represent numbers.
  • RGB Model: Combines varying intensities of red, green, and blue for color representation.

Page 12

Lossy vs Lossless Compression
  • Emphasizes reliability in data replication vs low detail tolerance in lossy methods.

Page 13

Intro to Programming
Lesson 1: Programming Languages
  • Abstraction: Reduces information to focus on relevant concepts.

- Algorithms: Precise instructions for processes executed by computers.

Page 14

Creating Functions
  • Functions are named blocks of instructions.
  • Steps: Define a function, call it with its name.

Page 15

Function Characteristics
  • Meaningful function names enhance understanding.

- Functions help simplify programming and can call each other.

Page 16

APIs and Function Parameters
  • API (Application Program Interface): A collection of commands available to programmers.

- Parameter: Extra information to customize function actions.

Page 17

Utilizing Parameters
  • Provides flexibility in function operation, avoiding duplicated code.

- Comments: Notes in code for reference and guidance.

Page 18

Looping and Random Numbers

- Identifies and controls repeated behaviors through various loop types.

Page 19

Big Data
  • Big Data: Datasets too large for traditional processing.

- Moore's Law: Computing power doubles every 1.5-2 years.

Page 20

Data Innovations

- Highlights the significance of code in medicine and identifying health issues.

Page 21

Costs of Free

- Personal Data Risks: Technology companies often collect user data without extensive regulations.

Page 22

Simple Encryption
  • Caesar Cipher: Shift of the alphabet for encryption.

- Describes the importance of protecting personal data online.

Page 23

Asymmetric Encryption

- Complex encryption and decryption processes with different keys to ensure security.

Page 24

Cybercrime and Security

- Recognizes threats from cybercrime and the significance of security measures.

Page 25

Protecting Against Cyber Threats

- Importance of strong passwords and verifying web resources.

Page 26

Event-Driven Programming

- Callback Function: Triggered by specific events in a program.

Page 27

Multi-Screen Apps

- Debugging and navigating through multiple screens in applications.

Page 28

Variables and Data Types

- Data Type: Defines how data is interpreted and processed.

Page 29

### User Input and Strings