AP Computer Science Principles Computer Systems and Networks — Worked Answer Explanations

Unit 4 · 12 questions explained

Below is a complete answer key for our AP Computer Science Principles Computer Systems and Networks practice questions. For each question you'll find the correct choice, a full written explanation of how to get there, and — for every wrong answer — a short note on exactly why it's tempting and where it goes wrong. Reading these straight through is one of the fastest ways to find the gaps in a unit before exam day.

Prefer to test yourself first? Take the timed Computer Systems and Networks practice test and come back here to review, or head back to the Computer Systems and Networks unit overview.

In-content ad
  1. Question 1 · Easy

    On the Internet, data is sent as small units called packets. Which of the following BEST describes why packets are used instead of sending the entire message as one continuous stream?

    • A
      Packets allow data to travel at faster-than-light speeds through fiber optic cables.
      Why not A: Data travels at a significant fraction of the speed of light in cables regardless of packet size; packets do not affect the physical propagation speed.
    • B
      Packets allow multiple messages to share network paths, enable rerouting around failures, and permit out-of-order delivery that can be reassembled at the destination.Correct
    • C
      Packets encrypt the data so it cannot be read while in transit.
      Why not C: Packetization and encryption are separate concerns; packets are not inherently encrypted.
    • D
      Packets are used only for audio and video streaming; text is still sent as a continuous stream.
      Why not D: All Internet data — text, images, audio, video — is transmitted as packets; there is no continuous-stream mode for text in IP networks.
    Explanation

    Packet switching breaks data into small packets that can travel independently over any available path in the network. This design allows many connections to share the same physical links (statistical multiplexing), lets packets be rerouted around congested or broken links (fault tolerance), and allows the destination to reassemble the original message from out-of-order packets.

    Key takeaway

    Packets enable shared network paths, fault-tolerant rerouting, and reassembly at the destination — core features of Internet packet switching.

  2. Question 2 · Easy

    Which of the following BEST describes the role of a router on the Internet?

    • A
      A router stores web pages so users can access them faster.
      Why not A: Storing web pages is the function of a web cache or content delivery network, not a router.
    • B
      A router encrypts data before it leaves a device's network interface.
      Why not B: Encryption is typically handled by protocols like TLS at a higher layer; routers forward packets based on addresses, they do not generally encrypt.
    • C
      A router forwards packets from one network to another, choosing the path each packet should take toward its destination.Correct
    • D
      A router assigns unique usernames and passwords to each device on the network.
      Why not D: Authentication credentials are managed by authentication systems; routers handle packet forwarding based on IP addresses.
    Explanation

    Routers are the traffic directors of the Internet. Each router maintains a routing table that maps destination IP address ranges to next-hop interfaces. When a packet arrives, the router reads the destination IP address, looks it up in its table, and forwards the packet to the next router along the path toward the destination.

    Key takeaway

    A router forwards packets toward their destination by choosing the best next hop based on destination IP address and routing tables.

  3. Question 3 · Easy

    The Internet was designed so that if one path between two computers is unavailable, data can still reach its destination by taking a different path. This property is called:

    • A
      Encryption
      Why not A: Encryption protects data confidentiality; it is unrelated to routing around failures.
    • B
      Abstraction
      Why not B: Abstraction is a software design concept; the ability to reroute around failures is a network design property.
    • C
      Fault toleranceCorrect
    • D
      Scalability
      Why not D: Scalability refers to a system's ability to handle growing workloads; the ability to survive node or link failures is fault tolerance.
    Explanation

    Fault tolerance means a system continues to operate correctly even when some of its components fail. The Internet was designed with fault tolerance as a core principle: packets can be routed around broken links or failed routers through alternative paths. This redundancy was a deliberate design choice inspired partly by the need for resilient military communications.

    Key takeaway

    Fault tolerance is the Internet's ability to reroute around failures — packets find alternative paths when a link or router is unavailable.

  4. Question 4 · Easy

    Which of the following BEST describes what TCP (Transmission Control Protocol) adds to the basic packet-delivery service of IP?

    • A
      TCP encrypts each packet so that only the intended recipient can read it.
      Why not A: Encryption is provided by protocols like TLS, not by TCP itself. TCP handles reliability, not confidentiality.
    • B
      TCP guarantees reliable, ordered delivery — it detects lost packets and requests retransmission, and reassembles data in the correct order.Correct
    • C
      TCP assigns an IP address to each device on the network.
      Why not C: IP address assignment is handled by DHCP; TCP manages data delivery after addresses are established.
    • D
      TCP determines which physical path packets take through the network.
      Why not D: Routing (path selection) is performed by routers using IP; TCP operates end-to-end between two hosts, not hop-by-hop through routers.
    Explanation

    IP delivers packets on a best-effort basis with no guarantees — packets can be lost, duplicated, or arrive out of order. TCP adds a reliability layer on top of IP: it numbers each packet (sequence numbers), acknowledges receipt, requests retransmission of lost packets, and reassembles data in the correct order. Together, TCP/IP provides reliable end-to-end communication over an unreliable network.

    Key takeaway

    TCP adds reliable, ordered delivery on top of IP by using sequence numbers, acknowledgments, and retransmission of lost packets.

  5. Question 5 · Easy

    A university uses a single server to host its website. As enrollment grows, the website becomes slow for users. The IT department adds two more identical servers and distributes incoming web requests evenly among all three.

    This approach BEST demonstrates which computing concept?

    • A
      Sequential computing — the three servers process one request at a time in order.
      Why not A: Having three servers handle different requests simultaneously is parallel, not sequential, processing.
    • B
      Distributed computing — workload is spread across multiple servers to improve performance and scalability.Correct
    • C
      Fault tolerance — the extra servers ensure the site never goes down.
      Why not C: While redundant servers do add fault tolerance, the question emphasizes distributing load to improve performance for a growing user base, which is distributed computing / horizontal scalability.
    • D
      Encryption — data is split across three servers so no single server has the complete message.
      Why not D: Splitting data for encryption purposes (secret sharing) is different from distributing requests for load balancing.
    Explanation

    Distributing incoming requests across multiple servers is horizontal scaling via distributed (and parallel) computing. Each server handles a subset of the total requests simultaneously, increasing overall throughput without requiring any single machine to be faster. This is a core strategy for scalable web infrastructure.

    Key takeaway

    Distributing work across multiple servers (horizontal scaling) improves performance and scalability as demand grows.

  6. Question 6 · Easy

    Two tasks must be completed: Task A takes 6 minutes and Task B takes 4 minutes. If run sequentially, total time is 10 minutes. If run in parallel on two processors, what is the minimum possible time to complete BOTH tasks?

    • A
      2 minutes
      Why not A: 2 minutes would require both tasks to finish in that time; Task A alone takes 6 minutes regardless of parallelism.
    • B
      5 minutes
      Why not B: 5 minutes = (6+4)/2 averages the times, but parallel tasks do not average — the longest task determines the total time.
    • C
      6 minutesCorrect
    • D
      10 minutes
      Why not D: 10 minutes is the sequential time; with two processors running simultaneously, they finish in max(6, 4) = 6 minutes.
    Explanation

    When two independent tasks run in parallel on two separate processors, they execute simultaneously. Task A finishes at 6 minutes; Task B finishes at 4 minutes. Both are done when the longer task finishes: max(6, 4) = 6 minutes. Parallel execution time is determined by the longest task, not the sum.

    Key takeaway

    Parallel execution time equals the duration of the longest task (max), not the sum; parallel computing is limited by the slowest component.

  7. Question 7 · Easy

    Which of the following BEST describes the concept of open protocols on the Internet?

    • A
      Open protocols mean the Internet has no security and anyone can read all data transmitted.
      Why not A: "Open" refers to publicly specified, not unencrypted. Security is added through additional protocols like TLS/HTTPS.
    • B
      Open protocols are publicly documented standards that allow any device or software from any manufacturer to communicate on the Internet.Correct
    • C
      Open protocols are owned by a single company that licenses them to other manufacturers.
      Why not C: Proprietary protocols are owned by companies; open protocols are documented by standards bodies (IETF, W3C) and available to all.
    • D
      Open protocols require all devices to use the same operating system to ensure compatibility.
      Why not D: The value of open protocols is OS independence — a Windows PC, a Mac, an Android phone, and a Linux server can all communicate using the same open protocols.
    Explanation

    Open protocols are standardized, publicly documented specifications for how systems should communicate. Because the specifications are public and freely usable, any manufacturer or developer can implement them. This openness is why devices from thousands of different manufacturers — running different operating systems — can all participate in the Internet seamlessly.

    Key takeaway

    Open protocols are publicly specified standards enabling interoperability among any device or manufacturer without proprietary licensing.

  8. Question 8 · Medium

    A pipeline to process data consists of three sequential stages that cannot be parallelized: Stage 1 takes 2 seconds, Stage 2 takes 8 seconds, Stage 3 takes 3 seconds. A programmer proposes splitting Stage 2 into four equal parallel tasks (each 2 seconds) running on four processors simultaneously.

    What is the total pipeline time after this optimization?

    • A
      4 seconds
      Why not A: 4 seconds would be Stage 2's time (2 seconds) plus ignoring Stages 1 and 3; the sequential stages still add their full durations.
    • B
      7 secondsCorrect
    • C
      13 seconds
      Why not C: 13 seconds is the original total (2+8+3) without the Stage 2 parallelization.
    • D
      3.25 seconds
      Why not D: 3.25 = 13/4 divides the total by the number of processors, but only Stage 2 is parallelized; Stages 1 and 3 remain sequential.
    Explanation

    Only Stage 2 is parallelized. Splitting Stage 2 into 4 equal tasks running in parallel takes max(2, 2, 2, 2) = 2 seconds instead of 8. Stages 1 and 3 are sequential and unchanged:

    • Stage 1: 2 seconds
    • Stage 2 (parallelized): 2 seconds
    • Stage 3: 3 seconds
    • Total: 2 + 2 + 3 = 7 seconds
    Key takeaway

    Only the parallelized portion speeds up; sequential stages still add their full time. Total = sum of sequential stages + max(parallel sub-tasks).

  9. Question 9 · Medium

    The Internet protocol stack is organized into layers, where each layer provides services to the layer above it and uses services from the layer below it. Which of the following BEST describes why this layered (abstraction) model is useful?

    • A
      The layered model forces all Internet traffic to travel through a central server that manages routing for the entire Internet.
      Why not A: The Internet has no central routing server; layering is about abstraction and modularity, not centralization.
    • B
      The layered model allows each layer to be changed or upgraded independently without affecting other layers, as long as the interface between layers stays the same.Correct
    • C
      The layered model encrypts each layer's data before passing it down, providing security at every level.
      Why not C: Layers do not automatically encrypt data passing between them; security protocols like TLS are added at specific layers, not all of them.
    • D
      The layered model eliminates packet loss by duplicating packets at each layer.
      Why not D: Packet loss is handled by TCP's retransmission mechanisms; layers do not duplicate packets for reliability.
    Explanation

    The layered architecture is a form of abstraction: each layer has a defined interface and hides its implementation details from adjacent layers. This means Ethernet (the physical layer) can be replaced with fiber optics or Wi-Fi without changing TCP or HTTP. Similarly, web browsers can be upgraded without changing the underlying network hardware. Each layer is independently replaceable as long as the interface is preserved.

    Key takeaway

    Layered network architecture allows each layer to be upgraded independently, as long as the interface between adjacent layers is preserved.

  10. Question 10 · Medium

    A company hosts its website on a single server in one data center. The website goes down whenever the data center loses power. Which of the following upgrades would MOST improve the website's fault tolerance?

    • A
      Upgrading the server's processor to a faster model.
      Why not A: A faster processor improves performance but does nothing to prevent downtime caused by a power outage at the data center.
    • B
      Compressing the website's files so they take less storage space.
      Why not B: File compression reduces storage use; it has no effect on availability during a data center outage.
    • C
      Encrypting all connections using HTTPS.
      Why not C: HTTPS improves security; it does not prevent downtime caused by a power failure.
    • D
      Replicating the website on servers in multiple geographically distributed data centers, with traffic rerouted automatically when one center goes down.Correct
    Explanation

    Fault tolerance requires redundancy. A single server in a single data center is a single point of failure. Replicating across multiple data centers in different geographic locations means that a power outage, natural disaster, or network failure at one location does not take the entire site down — traffic is automatically rerouted to operational servers. This is the standard approach to high-availability web hosting.

    Key takeaway

    Geographic redundancy (multiple data centers) eliminates single points of failure, allowing automatic failover when one location goes down.

  11. Question 11 · Hard

    A program runs four tasks. Tasks A and B can run in parallel (no dependencies between them). Task C depends on the output of Task A. Task D depends on the outputs of both B and C.

    • Task A: 3 seconds
    • Task B: 5 seconds
    • Task C: 2 seconds (starts after A)
    • Task D: 1 second (starts after B and C both finish)

    Assuming unlimited parallel processors, what is the minimum time to complete all four tasks?

    • A
      6 secondsCorrect
    • B
      8 seconds
      Why not B: 8 = 3+2+1+2 (extra) or another incorrect trace; the critical path through B→wait for C→D determines the minimum.
    • C
      11 seconds
      Why not C: 11 = 3+5+2+1 adds all task durations sequentially, ignoring that A and B overlap in time.
    • D
      5 seconds
      Why not D: 5 seconds only accounts for Task B; Task D cannot start until both B and C finish (C finishes at second 5), so D starts at 5 and ends at 6.
    Explanation

    Run A and B in parallel:

    • A finishes at t=3. C starts at t=3, finishes at t=5.
    • B finishes at t=5.
    • D can start only when BOTH B (t=5) and C (t=5) are done → D starts at t=5, finishes at t=6.

    Timeline: t=0 → A and B start; t=3 → C starts; t=5 → B and C done, D starts; t=6 → D done. Total: 6 seconds.

    Key takeaway

    With dependencies, find the critical path: trace the longest chain of dependent tasks to determine the minimum completion time.

  12. Question 12 · Hard

    A wireless network uses radio waves to transmit data from a laptop to a router. The router connects to the Internet via a fiber optic cable. At each step in this transmission, what is the fundamental representation of data?

    • A
      Text characters in the wireless segment and binary digits in the fiber segment.
      Why not A: The physical medium changes (radio waves vs. light pulses), but data is always ultimately represented as binary sequences at both stages.
    • B
      Binary sequences (bits) at all stages — represented as radio wave patterns in the wireless segment and as light pulses in the fiber segment.Correct
    • C
      Analog signals throughout, since radio waves and light are inherently analog.
      Why not C: Modern wireless (Wi-Fi) and fiber networks use digital modulation schemes that encode binary digits onto the physical medium; they are not analog data transmission systems.
    • D
      Decimal numbers in the wireless segment converted to binary only when entering the fiber cable.
      Why not D: Data is binary (bits) throughout digital computer networks; it does not exist as decimal numbers in transmission.
    Explanation

    All digital data is ultimately binary — sequences of 0s and 1s. The physical medium changes how those bits are encoded: in Wi-Fi, radio waves are modulated (e.g., using QAM encoding) to represent bit patterns; in fiber optics, pulses of light represent bits. But in both cases the underlying information is binary digits. The abstraction stack (bits → bytes → packets → application data) remains the same regardless of the physical medium.

    Key takeaway

    Data is always binary (bits) across all digital network media; only the physical encoding changes (radio waves, light pulses, electrical signals).