Show understanding of bit streaming

2.1 Networks – Bit Streaming

1. What is Bit Streaming? (AS 2.1)

Bit streaming is the continuous, ordered transmission of a sequence of bits over a communication medium.

Unlike packet‑switched transmission, where data are broken into independent packets that may travel different routes, a stream is sent as a steady flow and is processed by the receiver as soon as each bit arrives. This makes streaming ideal for real‑time services such as audio, video, online gaming and interactive video‑conferencing.

2. Where Streaming Fits in the Network Architecture

2.1 Mapping to the OSI / TCP‑IP model

  • Application layer – video player, VoIP client, online‑gaming client.
  • Presentation / Session layer – codecs (H.264, AAC), RTP signalling.
  • Transport layerTCP (reliable, higher latency) or UDP (unreliable, low latency) – the choice directly influences stream quality.
  • Network layer – IP routing; determines the path the packets travel across LANs and WANs.
  • Link layer – Ethernet, Wi‑Fi, Fibre Channel – provides the physical bit‑stream on the medium.
  • Physical layer – copper, fibre, radio – the actual conductors or waves that carry the bits.

2.2 Key Network Devices in a Streaming Scenario

DeviceRole in Streaming
Network Interface Card (NIC)Encodes/decodes the bit‑stream, adds MAC headers, handles CSMA/CD (wired) or CSMA/CA (Wi‑Fi).
SwitchForwards Ethernet frames within a LAN, maintains MAC tables to minimise collisions.
RouterRoutes IP packets between LANs and WANs, may perform NAT and QoS policing.
Access Point (AP)Provides wireless link‑layer service; uses CSMA/CA and may apply airtime fairness for streams.
Media ServerGenerates the bit‑stream, performs encoding/compression and adaptive‑bitrate (ABR) logic.

2.3 Common LAN / WAN Topologies and Their Impact on Streaming

TopologyTypical MediaStreaming Characteristics
Star (most Ethernet LANs)Twisted‑pair or fibre to a central switchPredictable latency; collisions confined to individual links (full‑duplex eliminates CSMA/CD).
Bus (legacy coaxial Ethernet)Coaxial cableShared medium → CSMA/CD collisions increase jitter; less common today.
Mesh (WAN backbones, data‑centre fabrics)Fibre, high‑speed serial linksRedundant paths improve reliability; latency depends on routing algorithm.
Ring (SONET/SDH, some Metro Ethernet)FibreDeterministic latency but a single fault can disrupt the ring unless protection switching is used.

3. Serial vs. Parallel Transmission

In networking the bits are almost always transmitted serially over a single pair of conductors (or a single optical fibre). Parallel transmission is confined to internal buses and helps students understand why serial links dominate long‑distance communication.

AspectSerial TransmissionParallel Transmission
Physical conductors1 + ground (or 2 for differential signalling)Multiple (e.g. 8, 16, 32)
Typical useNetwork links (Ethernet, USB, fibre), radio linksCPU data buses, memory interfaces, internal GPU links
Signal integrityLow crosstalk, easier to maintain over long distancesHigher crosstalk, limited to short distances
Practical maximum speedSeveral Gbps (10 GbE, 100 GbE, 400 GbE)Limited by bus width × clock frequency

4. Key Parameters of a Bit Stream (AS 2.1)

  1. Bit‑rate (R) – Number of bits transmitted each second (bits s⁻¹).

    \$R = \frac{N}{T}\$

    where N = number of bits, T = transmission time (s).

  2. Channel bandwidth (B) – Range of frequencies the medium can carry (Hz).

    Nyquist theorem (binary signalling, M=2):

    \$R{\max}=2B\log{2}M = 2B\ \text{bits s}^{-1}\$

  3. Latency (L) – Time for a bit to travel from source to destination (ms). Includes propagation, transmission and processing delays.
  4. Jitter – Variation in latency; excessive jitter causes buffer under‑runs in audio/video playback.
  5. Throughput vs. Bit‑rate – Throughput is the actual data delivered after protocol overhead, errors and retransmissions; it is usually lower than the nominal bit‑rate.

5. Encoding (Line‑Coding) Schemes for Streaming

Encoding converts binary data into signal waveforms suitable for the physical medium. The choice balances simplicity, bandwidth efficiency, clock recovery and DC balance.

SchemeHow it worksAdvantagesDisadvantages / Trade‑offs
NRZ (Non‑Return‑to‑Zero)‘1’ = high level, ‘0’ = low level; no extra transitions.Simple hardware, 1 bit per symbol.Baseline wander, no guaranteed transition → difficult clock recovery; long runs of identical bits reduce timing accuracy.
ManchesterEach bit period contains a transition: ‘0’ = high→low, ‘1’ = low→high.Self‑clocking (transition in every bit), good for noisy media.Requires twice the bandwidth of NRZ (effective bit‑rate = ½ of line rate).
8b/10bMaps each 8‑bit data byte to a 10‑bit transmission character, guaranteeing DC balance and at least one transition per character.Provides clock recovery, limits run‑length, easy error detection.10 % overhead reduces net data‑rate; more complex encoder/decoder.
4B/5BEncodes each 4‑bit nibble as a 5‑bit code, ensuring at least one ‘1’ per 5‑bit block.Used in 100 MbE; modest overhead (25 %).Obsolete for modern >1 GbE links.
PAM‑5 (Pulse‑Amplitude Modulation, 5‑level)Five voltage levels represent two bits per symbol; employed in 1000BASE‑T and 10GBASE‑T.Higher spectral efficiency; compatible with existing copper.More complex equalisation and signal‑to‑noise requirements.

6. Error Detection and Correction in Streams

Because streaming cannot be paused for retransmission, errors must be handled on the fly.

  • Parity bit – Simple odd/even check; detects any odd number of bit errors, but cannot correct.
  • CRC (Cyclic Redundancy Check) – Polynomial‑based checksum appended to each frame; very good at detecting burst errors.
  • Forward Error Correction (FEC) – Redundant data is sent so the receiver can reconstruct lost or corrupted bits without a request for retransmission. Common codes:

    • Reed‑Solomon (used in DVD, satellite links)
    • Convolutional codes with Viterbi decoding (used in Wi‑Fi, LTE)
    • LDPC (Low‑Density Parity‑Check) in modern 10 GbE and 5G.

7. Packet‑vs‑Stream Distinction and Transport‑Layer Choices

  • Even when the underlying network is packet‑switched, the payload of a stream is still carried in packets (e.g., RTP over UDP). The receiver re‑assembles the packets into the original continuous bit‑stream before playback.
  • TCP – Guarantees in‑order delivery and retransmission of lost packets. Suitable for file transfer but adds variable latency; not ideal for live video where a missing packet is better concealed than delayed.
  • UDP – No retransmission, minimal protocol overhead, constant latency. Preferred for real‑time audio/video where occasional loss is tolerable.

8. Collision Handling on Ethernet (CSMA/CD)

In a wired LAN using Ethernet, multiple stations share the same physical medium. The protocol for accessing the medium is Carrier Sense Multiple Access with Collision Detection (CSMA/CD):

  1. Listen to the carrier; transmit only if the line is idle.
  2. If two stations transmit simultaneously, a collision occurs; both detect the voltage surge.
  3. Each station stops, waits a random back‑off interval, then retries.

CSMA/CD introduces variable latency and occasional jitter, which must be mitigated by buffering at the receiver. Modern full‑duplex Ethernet eliminates collisions, but the concept remains important for exam questions.

9. Practical Calculation – Required Bandwidth for a Video Stream

Assume an uncompressed video stream with the following parameters:

  • Resolution: 1920 × 1080 pixels (Full HD)
  • Colour depth: 24 bits pixel⁻¹ (8 bits per colour channel)
  • Frame rate: 30 frames s⁻¹

Raw data‑rate:

\$R_{\text{raw}} = (1920 \times 1080) \times 24 \times 30 \approx 1.49 \times 10^{9}\ \text{bits s}^{-1}\;(1.49\ \text{Gbps})\$

Typical H.264/AVC compression for 1080p @ 30 fps is about 5 Mbps (ITU‑T Recommendation H.264, 2014). After adding protocol and coding overhead we obtain:

  • Video payload: 5 Mbps
  • Transport overhead (UDP + RTP ≈ 10 %): ≈ 0.5 Mbps
  • Line‑coding overhead (e.g., 8b/10b ≈ 25 %): ≈ 1.25 Mbps

Minimum usable bandwidth ≈ 6.8 Mbps. A safety margin of 20 % is normally added, giving a recommended provision of ≈ 8 Mbps for smooth playback.

10. Quality‑of‑Service (QoS) Mechanisms for Reliable Streaming

  • DiffServ (Differentiated Services) – Packets are marked with a DSCP field; routers prioritize “Expedited Forwarding” (EF) traffic for latency‑sensitive streams.
  • RSVP (Resource Reservation Protocol) – End‑to‑end signalling protocol that reserves a specific amount of bandwidth along a path; used in MPLS‑enabled networks.
  • Traffic shaping & policing – Devices smooth bursty traffic (shaping) or drop excess packets (policing) to keep the stream within its allocated bandwidth.
  • Priority queuing – Separate queues for high‑priority (voice/video) and best‑effort traffic; high‑priority queues are serviced first.

11. Real‑World Considerations for Reliable Streaming

  1. Choose an appropriate line code – Manchester for short, noisy links; 8b/10b or PAM‑5 for high‑speed serial links (PCIe, 10 GbE).
  2. Buffering – A receive buffer of a few hundred milliseconds absorbs jitter and occasional packet loss.
  3. Adaptive Bitrate Streaming (ABR) – The server provides several quality levels; the client switches between them according to current throughput.
  4. QoS provisioning – Use DiffServ, RSVP or MPLS to guarantee bandwidth for latency‑sensitive streams.
  5. Compression trade‑offs – Higher compression reduces required bit‑rate but can increase encoding latency and degrade visual quality; students should discuss the balance.

Timeline of a continuous bit stream showing start‑of‑frame, data bits, CRC and end‑of‑frame markers

Figure: A typical bit‑stream frame – start‑of‑frame (SOF), payload bits, CRC for error detection, and end‑of‑frame (EOF). Framing is added to a continuous stream to enable reliable transport.

12. Summary

Bit streaming underpins all real‑time network services. Mastery of the following concepts is essential for the Cambridge A‑Level Computer Science (9618) examination:

  • Clear definition of streaming and its contrast with packet‑switched transmission.
  • Mapping of the OSI/TCP‑IP layers to a streaming example and identification of key network devices.
  • Understanding of serial transmission and why it dominates long‑distance links.
  • Ability to calculate bit‑rate, relate it to channel bandwidth via Nyquist, and recognise the effect of compression.
  • Knowledge of line‑coding schemes (NRZ, Manchester, 8b/10b, 4B/5B, PAM‑5) and their trade‑offs.
  • Familiarity with error‑detection (parity, CRC) and forward error‑correction techniques.
  • Insight into packet‑vs‑stream payloads and the impact of TCP vs. UDP on latency and reliability.
  • Understanding of Ethernet collision handling (CSMA/CD) and modern full‑duplex operation.
  • Practical skills in bandwidth budgeting for video, including compression overhead and safety margins.
  • Ability to explain QoS mechanisms (DiffServ, RSVP, traffic shaping) and buffering strategies that ensure smooth playback.

With these foundations, students can design, analyse and evaluate networks that reliably deliver audio, video and interactive data in both LAN and WAN environments.