Data transmission and packets
Sending data around
- Data transmission moves data from one place to another.
- The data is broken into small equal pieces called packets.
- We also choose how it travels: serial/parallel and the direction.
Packets and packet switching
- A packet has three parts: a header (sender + receiver IP addresses, packet number), the payload (the data), and a trailer (end marker + error check).
- Benefits of packets: only a lost packet is resent (not the whole file); packets can take different routes; many users share the connection.
- In packet switching, routers read each header and pick a route; packets may arrive out of order and are reordered by packet number.
Practice
A packet header contains:
The header carries control info (addresses + packet number); the payload is the data; the trailer marks the end + error check.
Practice
A benefit of splitting data into packets is:
Only the lost/damaged packet is resent, packets can avoid busy routes, and many users share the line.
Serial vs parallel
- Serial sends one bit at a time down one wire — cheaper, and good over long distances (bits stay in order).
- Parallel sends several bits at once down several wires — faster but only over short distances (bits can arrive at slightly different times).
Practice
Serial transmission:
Serial = one bit at a time (cheaper, long-distance reliable); parallel = many bits at once (fast, short-distance).
Direction, and USB
- Simplex — one direction only (computer → printer).
- Half-duplex — both directions, one at a time (walkie-talkie).
- Full-duplex — both directions at once (phone call).
- USB: one standard connector, auto-detects the device and loads the driver, carries power, and only fits one way.
Practice
Full-duplex transmission means data travels:
Full-duplex is both ways at once; half-duplex is both ways one-at-a-time; simplex is one way.
Practice
A benefit of USB is that:
USB uses one standard connector, auto-detects devices, carries power, and only fits one way.
You've got it
Key idea
- a packet = header (addresses + number) + payload + trailer; only lost packets are resent
- packet switching: routers route each packet; reordered by packet number
- serial = one bit/one wire (long distance); parallel = many bits/many wires (short)
- simplex / half-duplex / full-duplex = one way / one-at-a-time / both-at-once