Data Communication

Every message that crosses a network — a web page, an e-mail, a video call — needs a sender, a receiver, something to travel through and rules both ends agree on. This chapter is about those pieces: how much a channel can carry, which directions data may flow in, how a network sets up the path a message takes, the wired and wireless media that carry signals, and the protocols that govern particular jobs such as fetching a web page, transferring a file or sending mail. The paper asks mostly for matches — a medium with its property, a protocol with its job — so learn each one with what makes it different.
Overview

Components and Measures of Data Communication

1 min read · 4 parts

Data communication is the exchange of data between two or more networked devices. It has five components: the sender, which creates and sends the message; the receiver, which accepts it; the message itself — text, numbers, images, sound or video; the communication medium, the path it travels along, wired or wireless; and the protocol, the set of rules both sides follow so that the message is understood.

  • Bandwidth is the range of frequencies a channel can carry, measured in hertz (Hz) — kHz, MHz, GHz. A wider band can carry more data.
  • Data transfer rate is the number of bits sent per second, measured in bits per second (bps) — Kbps, Mbps, Gbps, Tbps.
Modes of data flow
ModeDirectionExample
Simplexone way onlykeyboard to computer; a radio broadcast
Half-duplexboth ways, but only one way at a timewalkie-talkie
Full-duplexboth ways at the same timea telephone call

Data communication is the exchange of data between two or more networked devices. It has five components: the sender, which creates and sends the message; the receiver, which accepts it…

Switching Techniques

1 min read · 1 part

In a large network a message passes through many intermediate devices, and switching decides how its path is set up. In circuit switching, a dedicated path between sender and receiver is established before any data is sent, reserved for the whole conversation and released at the end — the traditional telephone call. Its resources sit idle during silences, but once the circuit is up, data arrives in order with no waiting. In packet switching, the message is broken into small packets, each carrying the destination address and a sequence number; packets travel independently, possibly by different routes, sharing the links with other traffic, and are reassembled in order at the destination. No path is reserved, so links are used efficiently; the Internet works this way.

Circuit switching versus packet switching
Circuit switching
  • Dedicated path set up first
  • Path reserved for the whole conversation
  • Data arrives in order, no waiting
  • Resources idle during silences
  • Traditional telephone call
Packet switching
  • Message broken into packets
  • No path reserved
  • Packets reassembled in order at destination
  • Links used efficiently
  • The Internet

In a large network a message passes through many intermediate devices, and switching decides how its path is set up. In circuit switching, a dedicated path between sender and receiver is…

Transmission Media

1 min read · 4 parts

Guided (wired) media carry signals along a physical path. Twisted-pair cable has pairs of insulated copper wires twisted together, the twisting reducing interference from outside and between pairs; it is cheap and used for telephone lines and Ethernet LANs with RJ45 connectors, in unshielded (UTP) and shielded (STP) forms. Coaxial cable has a copper core, insulation, a braided metal shield and an outer cover; the shield gives it better protection from interference and more bandwidth than twisted pair, and it is used for cable TV. Optical fibre carries data as light through a glass or plastic core surrounded by cladding, the light staying inside by total internal reflection; it offers very high bandwidth over long distances and is immune to electromagnetic interference, but it is costly and harder to install and join, so it forms network backbones.

Unguided (wireless) media
MediumApproximate bandBehaviourUsed for
Radio waves3 kHz – 1 GHzomnidirectional; travel long distances and pass through wallsAM and FM radio, cordless phones
Microwaves1 GHz – 300 GHzunidirectional, line of sight; cannot pass through solid obstacles, so towers are placed highsatellite links, mobile networks, long-distance links between towers
Infrared300 GHz – 400 THzvery short range, line of sight; blocked by walls, so it stays inside a roomTV remote controls, short links between nearby devices

Mobile telecommunication has moved through generations. 1G carried analog voice; 2G made voice digital and added SMS; 3G brought mobile Internet and video calls; 4G brought high-speed mobile broadband; and 5G adds much higher speeds and very low delay, suited to connecting large numbers of devices.

Generations of mobile telecommunication
  1. 1GAnalog voice
  2. 2GDigital voice and SMS
  3. 3GMobile Internet, video calls
  4. 4GHigh-speed mobile broadband
  5. 5GHigher speed, very low delay

Guided (wired) media carry signals along a physical path. Twisted-pair cable has pairs of insulated copper wires twisted together, the twisting reducing interference from outside and…

Protocols

1 min read · 2 parts

A protocol is a set of rules governing how data is formatted, sent and received, so that devices built by different makers can communicate. The book describes five:

The protocols and their jobs
ProtocolJob
HTTP — HyperText Transfer Protocoltransfers web pages: the browser (client) sends a request and the web server sends a response
FTP — File Transfer Protocoltransfers files between a client and a server — uploading and downloading
PPP — Point-to-Point Protocolcarries data over a direct link between two nodes, such as a computer dialling in to its Internet service provider
SMTP — Simple Mail Transfer Protocolsends e-mail from the sender's client to the mail server and between mail servers (reading mail from a mailbox uses other protocols, such as POP3)
TCP/IP — Transmission Control Protocol / Internet Protocolthe Internet's core suite: TCP breaks data into packets, checks that all arrive and puts them back in order; IP addresses each packet and routes it to its destination
⚠️ TCP and IP do different halves
Reliability and order belong to TCP; addressing and routing belong to IP. A question that credits IP with re-sending lost packets, or TCP with choosing the route, has swapped them.

A protocol is a set of rules governing how data is formatted, sent and received, so that devices built by different makers can communicate. The book describes five:

Worked Calculations: Transfer Time and Address Space

1 min read · 1 part

Data rates are quoted in bits per second while file sizes are quoted in bytes, and one byte is 8 bits, so the unit conversion is where students slip. A 10 MB file sent over a link of 8 Mbps takes 10 × 8 / 8 = 10 seconds, and a 25 MB file over 20 Mbps takes 25 × 8 / 20 = 10 seconds as well. In practice the real time is longer because of protocol overhead, delay and congestion. The size of the addressing space is a similar calculation: an IPv4 address has 32 bits and so allows 2³² = 4,294,967,296 addresses, while an IPv6 address has 128 bits and allows 2¹²⁸, about 3.4 × 10³⁸, which solves the shortage of IPv4 addresses.

Two quick calculations
QuestionWorkingAnswer
10 MB over 8 Mbps10 × 8 / 810 s
25 MB over 20 Mbps25 × 8 / 2010 s
IPv4 addresses2³²4,294,967,296

Data rates are quoted in bits per second while file sizes are quoted in bytes, and one byte is 8 bits, so the unit conversion is where students slip. A 10 MB file sent over a link of 8 Mbps…

Key takeaways

  • Data communication needs a sender, a receiver, a message, a medium and a protocol.
  • Bandwidth is measured in hertz; data transfer rate in bits per second.
  • Simplex is one way (keyboard), half-duplex one way at a time (walkie-talkie), full-duplex both ways at once (telephone).
  • Circuit switching reserves a path before sending; packet switching sends independent packets that may take different routes.
  • Twisted pair is cheap, coaxial better shielded, optical fibre uses light by total internal reflection and ignores electromagnetic interference.
  • Radio waves are omnidirectional and pass walls; microwaves and infrared need line of sight, infrared only over a short range.
  • HTTP for web pages, FTP for files, PPP for a direct two-node link, SMTP for sending mail, TCP/IP for reliable addressed delivery.

Practice questions (24)

Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.

  1. On a walkie-talkie, both people can talk, but only one can speak at a time. Which mode of data communication is this?

    1. Simplex
    2. Full-duplex
    3. Half-duplex
    4. Broadcast
    Show answer

    Answer: C — Half-duplex

    Data flows in both directions, but never in both at once, which is half-duplex. Simplex allows one direction only, like a keyboard sending to a computer. Full-duplex allows both at the same time, as on a telephone call. Broadcast describes one sender reaching many receivers, not the direction of an exchange.
  2. In which switching technique is a dedicated path between sender and receiver set up before any data is transmitted, and kept for the whole session?

    1. Circuit switching
    2. Packet switching
    3. Hashing
    4. Routing by DNS
    Show answer

    Answer: A — Circuit switching

    Circuit switching establishes and reserves the whole path first, as a traditional telephone call does, and releases it only when the session ends. Packet switching is the opposite approach: no path is reserved and each packet finds its own way. Hashing is a searching technique, and DNS translates names into addresses rather than setting up paths.
  3. Which statement about packet switching is correct?

    1. All packets of a message must travel along one reserved route
    2. The message is sent whole, without being divided
    3. Packets may take different routes and are reassembled in order at the destination
    4. A circuit must be established before the first packet is sent
    Show answer

    Answer: C — Packets may take different routes and are reassembled in order at the destination

    Packet switching divides the message into numbered packets that travel independently, possibly by different routes, sharing the links with other traffic; the sequence numbers let the destination put them back in order. A reserved route and a circuit set up in advance both describe circuit switching, and the whole point of the technique is that the message is divided.
Show the other 21 questions
  1. Which property makes optical fibre especially suitable for running beside heavy electrical machinery?

    1. It is the cheapest cable to buy and install
    2. It carries light, so it is immune to electromagnetic interference
    3. Its braided copper shield blocks all interference
    4. It uses radio waves that pass through walls
    Show answer

    Answer: B — It carries light, so it is immune to electromagnetic interference

    Optical fibre carries data as light kept inside the core by total internal reflection, and light is not disturbed by the electromagnetic fields that machinery produces. It is the most expensive of the three cables, not the cheapest. A braided shield belongs to coaxial cable, which reduces interference rather than escaping it, and radio waves are a wireless medium.
  2. A TV remote works only when pointed at the television and does not operate a TV in the next room. Which medium does it use?

    1. Infrared
    2. Radio waves
    3. Coaxial cable
    4. Microwaves from a satellite
    Show answer

    Answer: A — Infrared

    Infrared needs a line of sight over a short distance and is stopped by walls, which is exactly why the remote must be pointed and cannot reach the next room. Radio waves are omnidirectional and pass through walls, so a radio remote would work from another room. A remote has no cable, and satellite microwaves cover long distances.
  3. Which protocol is used to send an e-mail from the sender's mail client to the mail server?

    1. FTP
    2. PPP
    3. HTTP
    4. SMTP
    Show answer

    Answer: D — SMTP

    SMTP, the Simple Mail Transfer Protocol, carries outgoing mail from the client to the server and between mail servers. FTP transfers files, HTTP transfers web pages, and PPP carries data over a direct link between two nodes. A webmail page is fetched with HTTP, but the mail itself is still handed on by SMTP.
  4. Match each protocol with its job. A. HTTP B. FTP C. PPP D. TCP — 1. Transfers files between client and server 2. Ensures packets arrive completely and in order 3. Transfers web pages 4. Carries data over a direct link between two nodes

    1. A-3, B-1, C-2, D-4
    2. A-1, B-3, C-4, D-2
    3. A-3, B-4, C-1, D-2
    4. A-3, B-1, C-4, D-2
    Show answer

    Answer: D — A-3, B-1, C-4, D-2

    HTTP fetches web pages, FTP moves files, PPP runs a direct point-to-point link such as a computer to its service provider, and TCP is the half of TCP/IP responsible for complete, ordered delivery. A-3, B-1, C-2, D-4 swaps PPP and TCP, both "connection" ideas; A-1, B-3, C-4, D-2 swaps HTTP and FTP, both "transfer" protocols.
  5. Assertion (A): The bandwidth of a communication channel is measured in hertz. Reason (R): The data transfer rate of a channel is measured in bits per second.

    1. Both A and R are true, and R is the correct explanation of A
    2. Both A and R are true, but R is not the correct explanation of A
    3. A is true, but R is false
    4. A is false, but R is true
    Show answer

    Answer: B — Both A and R are true, but R is not the correct explanation of A

    Bandwidth is a range of frequencies, so it is measured in hertz, and data transfer rate is a count of bits per second — both statements are true. But they describe two different quantities, and the unit of one says nothing about why the other uses hertz. Choosing "R explains A" treats bandwidth and data rate as the same thing, which is the confusion the pair is set to catch.
  6. In simplex communication, data flows:

    1. In one direction only
    2. In both directions, but not at the same time
    3. In both directions at the same time
    4. Randomly
    Show answer

    Answer: A — In one direction only

    Simplex is one-way, like a keyboard sending to a computer. Both ways alternately is half duplex.
  7. The bandwidth of a channel is measured in:

    1. Hertz (Hz)
    2. Bits (bit)
    3. Metres (m)
    4. Seconds (s)
    Show answer

    Answer: A — Hertz (Hz)

    Bandwidth is the range of frequencies in hertz. Data rate is measured in bits per second.
  8. Data transfer rate is commonly measured in:

    1. Bits per second (bps)
    2. Hertz
    3. Decibels only
    4. Metres per second
    Show answer

    Answer: A — Bits per second (bps)

    Data rate counts bits transmitted each second. Hertz measures bandwidth, which is the usual confusion.
  9. An optical fibre cable carries data as:

    1. Pulses of light
    2. Electric current only
    3. Radio waves only
    4. Sound waves
    Show answer

    Answer: A — Pulses of light

    Fibre transmits light pulses through glass strands. Twisted pair and coaxial cable carry electrical signals.
  10. A walkie-talkie, in which only one person can speak at a time, uses which mode?

    1. Half duplex
    2. Full duplex
    3. Simplex
    4. Parallel
    Show answer

    Answer: A — Half duplex

    Both can transmit but only in turn, which is half duplex. A telephone allows both at once, which is full duplex.
  11. A file of 8 megabytes (MB) is sent over a link of 2 megabits per second (Mbps). The time taken is:

    1. 32 seconds
    2. 4 seconds
    3. 16 seconds
    4. 64 seconds
    Show answer

    Answer: A — 32 seconds

    8 MB is 64 megabits and 64 ÷ 2 = 32 seconds. 4 seconds forgets to convert bytes to bits.
  12. Which medium is NOT affected by electromagnetic interference?

    1. Optical fibre
    2. Twisted pair
    3. Coaxial cable
    4. Radio waves
    Show answer

    Answer: A — Optical fibre

    Fibre carries light, which is immune to electrical noise. Copper cables and radio waves are affected.
  13. Assertion (A): In packet switching, a message is divided into packets that may follow different routes.
    Reason (R): This allows the network to share its links efficiently among many users.
    Choose the correct option:

    1. Both A and R are true and R is the correct explanation of A
    2. Both A and R are true but R is not the correct explanation of A
    3. A is true but R is false
    4. A is false but R is true
    Show answer

    Answer: A — Both A and R are true and R is the correct explanation of A

    Packets from many users share links as needed, which is the benefit R states. Option 2 is wrong.
  14. Consider the following statements:
    A. Simplex communication is one-way only.
    B. Full duplex allows both ends to transmit at the same time.
    C. Half duplex allows both ends to transmit at the same time.
    D. A telephone call is an example of full duplex.
    Choose the correct answer:

    1. A, B and D only
    2. A and C only
    3. B, C and D only
    4. A, B, C and D
    Show answer

    Answer: A — A, B and D only

    A, B and D are correct. C is false because half duplex allows transmission in turn, not at the same time, so option 4 is the trap.
  15. Match List I with List II:
    List I:
    A. Twisted pair;
    B. Coaxial cable;
    C. Optical fibre;
    D. Satellite link
    List II:
    1. Cable television;
    2. Very long distance wireless;
    3. Telephone and LAN cabling;
    4. Highest bandwidth by light pulses

    1. A-3, B-1, C-4, D-2
    2. A-1, B-3, C-4, D-2
    3. A-3, B-1, C-2, D-4
    4. A-3, B-4, C-1, D-2
    Show answer

    Answer: A — A-3, B-1, C-4, D-2

    Twisted pair serves telephones and LANs (3), coaxial serves cable TV (1), fibre gives the highest bandwidth (4) and satellites cover very long distances (2). Option 2 swaps twisted pair and coaxial.
  16. A 500 MB file is downloaded at a steady 20 Mbps. The time taken is:

    1. 200 seconds
    2. 25 seconds
    3. 100 seconds
    4. 400 seconds
    Show answer

    Answer: A — 200 seconds

    500 MB is 4000 megabits and 4000 ÷ 20 = 200 seconds. 25 seconds forgets the bytes-to-bits factor.
  17. In circuit switching:

    1. A dedicated path is set up between sender and receiver before communication
    2. Messages are divided into packets that take any path
    3. No path is ever set up
    4. Data is stored in a router for days
    Show answer

    Answer: A — A dedicated path is set up between sender and receiver before communication

    A traditional telephone call reserves a path for its duration. Packet switching, by contrast, splits data into packets.
  18. Assertion (A): Satellite communication has a noticeable delay.
    Reason (R): The signal must travel a very long distance up to the satellite and back to the earth.
    Choose the correct option:

    1. Both A and R are true and R is the correct explanation of A
    2. Both A and R are true but R is not the correct explanation of A
    3. A is true but R is false
    4. A is false but R is true
    Show answer

    Answer: A — Both A and R are true and R is the correct explanation of A

    Distance determines delay, as R states. Option 2 is wrong.
  19. Which medium is the best choice for carrying a very large amount of data over a long distance on land?

    1. Optical fibre
    2. Twisted pair
    3. Infrared
    4. Bluetooth
    Show answer

    Answer: A — Optical fibre

    Fibre offers very high bandwidth with little loss over distance. Infrared and Bluetooth have a short range.
  20. A link has a data rate of 1.5 megabytes per second (MBps). Its data rate in megabits per second (Mbps) is:

    1. 12 Mbps
    2. 1.5 Mbps
    3. 0.19 Mbps
    4. 15 Mbps
    Show answer

    Answer: A — 12 Mbps

    One byte is 8 bits, so 1.5 × 8 = 12 Mbps. 0.19 divides by 8 instead of multiplying.
  21. The bits 1011001 are sent with an even parity bit added. The parity bit is:

    1. 0
    2. 1
    3. Either, parity does not matter
    4. 2
    Show answer

    Answer: A — 0

    The data already has four 1s, which is an even count, so the parity bit is 0 to keep the total even. A bit of 1 would make the count five, which is odd.