---
title: "AP Computer Science Principles Unit 4 Practice Test"
description: "A timed AP Computer Science Principles Unit 4 (Computer Systems & Networks) practice test in the AP format, drawn from 893 multiple-choice questions written for the unit. The standard version takes about 34 minutes."
canonical: "https://fiveable.me/ap-comp-sci-p/unit-test/4"
type: "unit-test"
subject: "AP Computer Science Principles"
unit: "Unit 4"
---

# AP Computer Science Principles Unit 4 Practice Test

## Overview

A timed AP Computer Science Principles Unit 4 (Computer Systems & Networks) practice test in the AP format, drawn from 893 multiple-choice questions written for the unit. The standard version takes about 34 minutes.

## Test Format

- 20 Multiple Choice Questions (34 minutes)

## Practice Questions

### Question 1

A video streaming service experiences a sudden surge in new subscribers, causing the recommendation engine to lag significantly and fail to update user preferences. Which of the following best describes the cause of this performance issue?

- (A) The system lacks scalability, preventing it from efficiently processing the increased volume of user data.
- (B) The system lacks encryption, preventing it from efficiently securing the increased volume of user data.
- (C) The system lacks redundancy, preventing it from efficiently backing up the increased volume of user data.
- (D) The system lacks portability, preventing it from efficiently transferring the increased volume of user data.

**Answer: (A)** Linking the surge in users to the system lag highlights scalability as the capacity of a system to adapt as the amount of data processing increases.

### Question 2

A global team of developers agrees to use the standard TCP/IP protocols for transmitting data between their servers rather than creating a custom protocol. How does this decision to use a standard abstraction reduce complexity for the team?

- (A) It eliminates the need to design and debug low-level data transmission rules from scratch.
- (B) It guarantees that the data transmitted between servers is automatically encrypted and secure.
- (C) It prevents the servers from communicating with devices that do not belong to the organization.
- (D) It increases the bandwidth available for data transmission by compressing the data packets.

**Answer: (A)** Linking the use of standard protocols to the avoidance of redundant low-level work.

### Question 3

A messaging app is being developed for journalists working in hostile environments where communication interception is a major threat. Which encryption protocol best fits this purpose?

- (A) End-to-end encryption where only the sender and receiver hold the keys
- (B) Server-side encryption where the service provider manages the keys
- (C) Transport layer security that encrypts data only while in transit
- (D) No encryption to ensure messages can be recovered if a password is lost

**Answer: (A)** Evaluating the security threat model indicates that third-party access must be eliminated. End-to-end encryption ensures that not even the service provider can access the messages, fitting the high-security purpose.

### Question 4

When sending an email, the email client uses standard protocols like the Simple Mail Transfer Protocol (SMTP) without handling the physics of signal transmission. How does this layering of abstraction manage complexity?

- (A) It separates concerns so software developers can build applications without managing electrical signals.
- (B) It eliminates latency so the email arrives at its destination instantly regardless of distance.
- (C) It prevents data loss so the email is guaranteed to be delivered even if the network cable is cut.
- (D) It encrypts the content so the email cannot be read by anyone other than the intended recipient.

**Answer: (A)** Layering allows developers to work at the application level, relying on lower layers to handle physical transmission details, which simplifies application development.

### Question 5

In a multiplayer online game, Player A sees Player B's character move across the screen. What data serves as the input to Player A's computer to enable this?

- (A) Data packets from the server containing Player B's coordinates serve as input to Player A.
- (B) The graphics rendered on Player A's monitor serve as input to the game's physics engine.
- (C) The keyboard commands from Player A serve as input to control Player B's character movement.
- (D) The local game files on Player A's hard drive serve as input to determine network speed.

**Answer: (A)** Tracing the network communication reveals the input source. Player A's computer receives coordinate data from the server as input to update the local game state.

### Question 6

A company plans to build a smart light bulb that users can control via an existing popular home automation hub. What technical specification must the developers investigate to ensure compatibility?

- (A) The communication protocols supported by the home automation hub
- (B) The maximum number of devices the home automation hub can simultaneously connect to
- (C) The operating system installed on the home automation hub's central processor
- (D) The electrical power consumption rating of the home automation hub during normal operation

**Answer: (A)** To interface with an external system, the device must use a compatible communication standard (like Zigbee or Wi-Fi) supported by that hub.

### Question 7

A voting system uses this algorithm: Step 1: Read `voterID`. Step 2: Check `votedList`. Step 3: If `voterID` is in `votedList`, reject. Step 4: Add `voterID` to `votedList` and accept. Two machines run this algorithm simultaneously. If both read the same ID at the same time, what is the risk?

- (A) Both machines might accept the vote because the ID was not yet added
- (B) Both machines might reject the vote because the ID was already added
- (C) One machine will accept and the other will reject the vote correctly
- (D) The system will crash due to simultaneous access to the list file

**Answer: (A)** This describes a race condition. If Machine A and Machine B both execute Step 2 before either executes Step 4, both will see the ID is missing and both will proceed to accept the vote, resulting in a double vote.

### Question 8

A chat application fails to display messages in the correct order due to network delays. The developer switches from a raw data stream to using a TCP/IP library that handles sequencing. How does this abstraction correct the error?

- (A) It manages the complexity of packet ordering and retransmission, presenting a reliable stream of data to the application.
- (B) It eliminates the need for error checking by ensuring all packets arrive in the correct sequence without any possibility of data loss or corruption.
- (C) It hides the implementation details of packet ordering from the application, allowing the developer to focus on message display logic rather than network protocol specifics.
- (D) It reduces the complexity of the application code by removing the need for the developer to manually implement packet sequencing logic at the application layer.

**Answer: (A)** Network protocols abstract the unreliable nature of the internet, providing a guaranteed order of delivery that fixes the sequencing error.

### Question 9

IPv4 addresses use 32 bits, limiting the number of unique devices. IPv6 uses 128 bits. How does a network library abstraction manage the complexity of transitioning between these standards?

- (A) It provides a unified interface that handles both address types transparently
- (B) It forces all devices to upgrade to IPv6 before they can communicate data
- (C) It converts all IPv6 addresses into IPv4 addresses by truncation logic
- (D) It assigns multiple devices to the same IP address to save address space

**Answer: (A)** The library hides the low-level bit differences between the protocols, allowing the application to work regardless of the underlying address size.

### Question 10

The Internet Protocol version 4 (IPv4) uses 32-bit addresses, limiting the network to approximately 4.3 billion unique devices. Which solution was adopted to permanently solve this address exhaustion?

- (A) Implementing IPv6, which uses 128-bit addresses to vastly expand the space.
- (B) Implementing Network Address Translation (NAT) to allow multiple devices to share a single IPv4 address.
- (C) Implementing classless routing protocols to subdivide the 32-bit address space more efficiently.
- (D) Implementing a hierarchical addressing system to allow reuse of IPv4 addresses across different geographic regions.

**Answer: (A)** Evaluating the limitation of $$2^{32}$$ addresses led to the development of IPv6. Using 128 bits ($$2^{128}$$) provides an effectively infinite number of addresses, solving the exhaustion problem.

## Review the Unit

- [4.1 The Internet](/ap-comp-sci-p/unit-4/internet/study-guide/HouTEH6ypgVs8tNInelL)
- [4.2 Fault Tolerance](/ap-comp-sci-p/unit-4/fault-tolerance/study-guide/OXw6cjIfolXV4VbZRll8)
- [4.3 Parallel and Distributed Computing](/ap-comp-sci-p/unit-4/parallel-distributed-computing/study-guide/wkNxn30shWZFeNUlcild)
- [Big Idea 4 Overview: Computer Systems and Networks](/ap-comp-sci-p/unit-4/review/study-guide/WfuUHs2qFBVKy24rtsZ9)

## Other Unit Tests

- [Unit 1: Creative Development](/ap-comp-sci-p/unit-test/1)
- [Unit 2: Data](/ap-comp-sci-p/unit-test/2)
- [Unit 3: Algorithms and Programming](/ap-comp-sci-p/unit-test/3)
- [Unit 5: Impact of Computing](/ap-comp-sci-p/unit-test/5)

## About This Document

Canonical Fiveable pages are available as Markdown at the same path plus `.md`.

- [llms.txt](https://fiveable.me/llms.txt): index of Fiveable's sections and URL patterns
- [llms-full.txt](https://fiveable.me/llms-full.txt): complete subject and unit listing
- [MCP server](https://fiveable.me/mcp): call Fiveable as tools instead of fetching pages (`https://fiveable.me/api/mcp`)
- [MCP server for AP teachers](https://fiveable.me/mcp/teachers): a teacher's classes, assignments and AP-rubric grading (`https://fiveable.me/api/mcp/teacher`)
