Which of the following best explains how data is typically assembled in packets for transmission over the Internet?

📚

 > 

⌨️ 

 > 

✏️

Frequently Asked Questions

5 min readdecember 10, 2021

Which of the following best explains how data is typically assembled in packets for transmission over the Internet?

AP Computer Science Principles ⌨️

Bookmarked 3.3k • 79 resources

If I had one piece of advice for ANY AP test 📝, it is to know the exam like the back of your hand. This is especially true in APCSP since the exam has multiple parts including the MCQ ✍️ (Multiple Choice Questions) and the Create PT 💾 (Performance Task)! When you walk in on test day, the last thing you want to be thinking is “oh jeez, what will the questions look like?” or “How much time do we have for the multi-select section?”

If you know the exam, these fears will go away. If you consistently practice and know what to expect walking into the exam, it can relieve exam stress and help you with time management along with answering the questions.

Let's dive into the APCSP exam and take a look at how the exam is formatted and scored 💯

For the MCQ section 🧐, you will be given:

  • 120 Minutes

  • To Answer 70 MCQs

    • 57 "single-select" questions

    • 5 "single-select reading passage" questions

    • 8 "multi-select" questions

This section is weighted at 70% of your exam score so make sure to study well before the exam!

The other 30% of your exam score will come from Section Two, so make sure to check out all of our information about the Create PT 💾 (Performance Task):

📝 Read: AP Computer Science Principles - Create PT Help

This section will not 🚫 be tested during your AP Exam, but you will instead be given 12 hours of class-time to work on your coding masterpiece 🎉

In the MCQ section, about 30% of the questions will have pseudocode in the questions or answers! Pseudocode is a programming language that can't actually be used in an IDE (Integrated Development Environment) but is easily read 👓

The language is basically a combination of a block-based language (Scratch, Alice, etc.) and a basic typing language (Python, JS, etc.) You will get a reference sheet (linked below 🔗) on exam day, but we highly recommend trying to learn and practice with pseudocode before exam day so you don't have to waste time reading and translating then!

On the Reference Sheet for Pseudocode, there are eight code categories! These are super useful to know so you don't waste valuable time on exam day trying to find the exact line of code in these six pages. Here are the categories to know:

  1. Assignment, Display, and Input

  2. Arithmetic Operators and Numeric Procedures

  3. Rational and Boolean Operators

  4. Selection

  5. Iteration

  6. List Operations (largest category)

  7. Procedures and Calls

  8. Robot (the most fun 🤪 category!)

There are five Big Ideas in AP Computer Science Principles that are tested on the AP Exam. You can reference this table to see which units you should study 📖 the most and least:

Big Idea MCQ Weighting

There are also five Computational Thinking Practices in the APCSP exam 🎊 If you don't recognize these names, don't worry too much, these are mostly for teachers to spiral these themes through the Big Ideas! Check these out with the practice questions ✍️ later:

Computational Thinking PracticeWeight
1️⃣ Practice 1: Computational Solution Design18-25%
2️⃣ Practice 2: Algorithms and Program Development20-28%
3️⃣ Practice 3: Abstraction in Program Development7-12%
4️⃣ Practice 4: Code Analysis12-19%
5️⃣ Practice 5: Computing Innovations28-33%

All questions in this section are courtesy of the College Board's APCSP CED updated for 2021!

1. Which of the following best explains how data is typically assembled in packets for transmission over the Internet?

(A) Each packet contains data to be transmitted, along with metadata containing information used for routing the data.

(B) Each packet contains an encrypted version of the data to be transmitted, along with metadata containing the key needed to decrypt the data.

(C) Each packet contains only the metadata used to establish a direct connection so that the data can be transmitted.

(D) Each packet contains multiple data files bundled together, along with metadata describing how to categorize each data file.

2. Each student that enrolls at a school is assigned a unique ID number, which is stored as a binary number. The ID numbers increase sequentially by 1 with each newly enrolled student. If the ID number assigned to the last student who enrolled was the binary number 1001 0011, what binary number will be assigned to the next student who enrolls?

(A) 1001 0100

(B) 1001 0111

(C) 1101 0100

(D) 1101 0111

3. The following procedure is intended to return the number of times the value val appears in the list myList. The procedure does not work as intended.

Which of the following changes can be made so that the procedure will work as intended?

(A) Changing line 6 to IF(item = count)

(B) Changing line 6 to IF(myList[item] = val)

(C) Moving the statement in line 5 so that it appears between lines 2 and 3

(D) Moving the statement in line 11 so that it appears between lines 9 and 10

The APCSP MCQ section is definitely not as hard as other AP exams. Make sure to practice and use the tips in this article and you should be all set for that Five 👍

A network packet is a basic unit of data that's grouped together and transferred over a computer network, typically a packet-switched network, such as the internet. Each packet or chunk of data forms part of a complete message and carries pertinent address information that helps identify the sending computer and intended recipient of the message.

A network packet has three parts: the packet header, payload and trailer. The size and structure of a network packet are dependent on the underlying network structure or protocol used. Conceptually, a network packet is like a postal package. In this scenario, the header is the box or envelope, the payload is content and the trailer is the signature. The header contains instructions related to the data in the packet.

A network packet works by choosing the best route available to its destination This is a route taken by all the other packets within a message, making the network traffic more efficient in terms of balancing a load across various pieces of equipment. For instance, if there's an issue with a piece of equipment during message transmission, the packets are redirected through routers to ensure the entire message gets to its destination.

Generally, most networks today operate on the TCP/IP stack, which makes it possible for devices connected to the internet to communicate with one another across different networks.

What are the parts of a network packet?

Network packets are similar in function to a postal package. A network packet or unit of data goes through the process of encapsulation, which adds information to it as it travels toward its destination and marks where it begins and ends.

A network packet is made up of the following three parts:

An IPv4 packet comprises the following components.
  1. Packet header. The header is the beginning or front part of a packet. Any processing or receiving device, such as a router or a switch, sees the header first. The following 13 fields are included in an IPv4 protocol header:
    • Version. This field indicates the format of the internet header.
    • Internet header length (IHL). IHL is the length of the internet header in 32-bit words that points to the beginning of the data.
    • Type of service. This indicates the abstract parameters of the quality of service desired.
    • Total length. This is the length of the datagram measured in octets that includes the internet header and data. This field allows the length of a datagram to be up to 65,535 octets.
    • Identification. The sender assigns an identifying value to aid in assembling the fragments of a datagram.
    • Flags. These are various control flags.
    • Fragment offset. This field indicates where in the datagram this fragment belongs. The fragment offset is measured in units of eight octets, or 64 bits. The first fragment has offset zero.
    • Time to live (TTL). The TTL field indicates the maximum time the datagram is allowed to remain in the internet system. If this field contains the value of zero, then the datagram must be destroyed.
    • Protocol. This field indicates the next-level protocol used in the data portion of the internet datagram.
    • Header checksum. A checksum detects corruption in the header of the IPv4 packets.
    • Source address. This is the 32-bit source IP address.
    • Destination address. This is the 32-bit destination IP address.
    • Options. This field is optional, and its length can be variable. A source route option is one example, where the sender requests a certain routing path. If an option is not 32 bits in length, it uses padding options in the remaining bits to make the header an integral number of 4-byte blocks.
  2. Payload. This is the actual data information the packet carries to its destination. The IPv4 payload is padded with zero bits to ensure that the packet ends on a 32-bit boundary.
  3. Trailer. Sometimes, certain network protocols also attach an end part or trailer to the packet. An IP packet doesn't contain trailers, but Ethernet frames do.
Structure of a packet

IPv6 is the newer version of IPv4, which was developed in the early 1980s. And, despite the introduction and adoption of the modern IPv6, IPv4 still routes most of today's internet traffic.

IPv6 uses different IP headers for data packets, as an IPv6 address is four times larger than an IPv4 address. It's a more streamlined version of IPv4 and provides better support for real-time traffic by eliminating the fields that are rarely used or are unnecessary.

IPv6 header and extensions

Why use packets?

Packets are used for efficient and reliable transmission of data. Instead of transferring a huge file as a single data block, sending it in smaller packets improves transmission rates. Packets also enable multiple computers to share the same connection. For example, if one person is downloading a file, the computer can send packets to the server, while another user is simultaneously sending packets to the same server.

While it's possible to transfer data without using packets, it would be highly impractical to send the data without first slicing it into smaller chunks.

The following are some of the benefits of using packets:

  • Different paths can be used to route packets to their destination. This process is known as packet switching.
  • If an error occurs, the packets can be stored and retransmitted later.
  • Packets use the best route available for delivery. This enables them to be routed across congested parts of the network without slowing them down in a specific spot.
  • To ensure secure delivery, packets can be encrypted.

Packet switching vs. circuit switching

In the world of telecommunications, both circuit switching and packet switching are popular methods of connecting communicating devices together. However, they differ in their methodology. Packet switching is used for grouping data into packets for transmission over a digital network. It's an efficient way to handle transmissions on a connectionless network, such as the internet.

On the other hand, circuit-switched transmission is used for voice networks. In circuit switching, lines in the network are shared among many users as with packet switching. However, each connection requires the dedication of a particular path for the duration of the connection.

The following highlights the major pros and cons of both technologies.

Packet switching

  • It is a connectionless service and doesn't require a dedicated path between the sender and the receiver.
  • Each packet carries pertinent information, such as source, destination and protocol identifiers, which help the packet select the best available route to its destination.
  • The grouping of data into packets in a packet-switched network enables interoperable networking across these different networks and devices until the packets reach the destination where the receiving hosts reassemble them to their original form. For example, a host in a packet-switched network, such as Ethernet, can send data that traverses its local network without having any information about the destination's local area network or any of the devices or networks between its LAN and the destination's LAN.
  • While packet-switched networks can't guarantee reliable delivery, they do minimize the risk of data loss, as the receiving device can request the missing packet upon detection and the originating device can then resend it.
  • No bandwidth reservation is required in advance, and no call setup is required.
  • Protocols used in packet switching are complex. If the security protocols aren't used during packet transmission, the connection is insecure.
  • Since it isn't a dedicated connection, packet switching can't be used in applications that require little delay and higher service quality.
  • Packet switching is reliable, as it helps to eliminate packet loss, as data packets can be resent if they don't reach their destination.

Circuit switching

  • It reserves the entire bandwidth in advance, as a connection setup is required for data transfers. The reserved bandwidth improves the quality of the connection and network performance due to the reduced congestion.
  • It requires a dedicated path before the data can travel between the source and the destination, which makes it impossible to transmit other data even when the channel is free. For example, even if there's no transfer of data, the link is still maintained until it's terminated by users.
  • Circuit switching is suitable for long and continuous communication due to its dedicated nature.
  • A lot of bandwidth gets wasted as other senders can't use the same path during congestion.
  • Circuit switching is fully transparent; the sender and receiver can use any bit rate format or framing method.
  • Circuit switching is less reliable than packet switching, as it doesn't have the means to resend lost packets.

Learn how TCP/IP and the Open Systems Interconnection model differ when it comes to network communications.