NivaarExam PrepOfficial exam papers ↗

25-Comp-B5 Computer Communications · May 2015

Question 4 of 7: Manchester and Differential Manchester Encoding

Nivaar worked solution (AI-drafted; not reviewed by a licensed engineer)

Notes on this paper

98-Comp-B5, Computer Communications — National Exams, May 2015. Closed-book, 3 hours; seven questions of equal value (20% each); ANY FIVE constitute a complete exam (all seven answered below as a complete study resource).

Reference texts: Stallings, Data and Computer Communications, 10th ed. — sampling and aliasing (Ch.5, Q1), channel capacity/Shannon-Hartley (Ch.3, Q2), PCM and uniform quantization (Ch.5, Q3), Manchester/Differential Manchester line coding (Ch.5, Q4), LAN/network topologies (Ch.16, Q5), spread spectrum (Ch.9, Q6), and physical/link/network-layer terminology (Ch.3, 6, 9, 16, 17, Q7); Kurose & Ross, Computer Networking: A Top-Down Approach, 8th ed. — application-layer protocols and transport-layer terminology (Ch.1–3, Q7).

Question 4: Manchester and Differential Manchester Encoding (20 marks)

Question text not reproduced: the examination questions are © Engineers and Geoscientists BC. Open the official past paper (linked at the top of this page) to read the question, then follow the worked solution below.

Q4 shows the clean bit-by-bit sequence 1 0 1 0 0 1 1 1 0 0 1 against the given clock, which is what is encoded below.

Given. Data sequence $1\,0\,1\,0\,0\,1\,1\,1\,0\,0\,1$ (11 bits), synchronized to the clock shown in Fig. Q4 (one clock cycle per bit).

Find. The Manchester-encoded and Differential-Manchester-encoded waveforms for this sequence.

Approach. Apply the standard line-coding rule for each scheme bit-by-bit: Manchester encodes the bit value directly as the direction of the mandatory mid-bit transition; Differential Manchester keeps the mid-bit transition purely for clock recovery and instead encodes the bit value as presence/absence of a transition at the start of the interval (relative to the previous bit's ending level).

  1. Manchester encoding rule (adopted convention, per Stallings). Every bit interval has exactly one transition at its midpoint: a 1 is transmitted as a high-to-low transition (high in the first half, low in the second half); a 0 is transmitted as a low-to-high transition. Applying this bit-by-bit to $1,0,1,0,0,1,1,1,0,0,1$ gives the half-bit level pairs (H=high, L=low): $(H,L),(L,H),(H,L),(L,H),(L,H),(H,L),(H,L),(H,L),(L,H),(L,H),(H,L)$ — plotted as the "Manchester" trace below.
  2. Differential Manchester encoding rule. Assume the line starts LOW just before bit 1 (stated as an assumption; the source gives no initial level). At the start of each bit interval: if the bit is 0, invert the current level (a transition occurs); if the bit is 1, keep the current level (no transition). Then, regardless of the bit value, the level is always inverted again at the mid-bit point (this is what supplies clock recovery). Applying this rule in sequence to $1,0,1,0,0,1,1,1,0,0,1$, starting from LOW, produces the half-bit level pairs $(L,H),(L,H),(H,L),(H,L),(L,H),(L,H),(H,L),(L,H),(H,L),(L,H),(H,L)$ — plotted as the "Diff. Manchester" trace below. A round-trip decode of both traces (reversing each rule) recovers the original sequence exactly, confirming the encodings.
ClockData10100111001ManchesterDiff. Manchester
Fig. Q4 — given clock and data (top two rows) with the derived Manchester and Differential Manchester waveforms; the encodings decode back to $1,0,1,0,0,1,1,1,0,0,1$ exactly (verified by simulation).
EncodingResult
ManchesterMid-bit transition per bit: 1→high-to-low, 0→low-to-high (see waveform)
Differential ManchesterAlways a mid-bit transition; start-of-bit transition present iff bit=0 (see waveform)