Data Transmission, Error Checking and Encryption: Question 6

Syllabus 2.2

Multiple choice 1 mark

A contactless smart-card reader at a train station barrier reads an 8-bit ticket-type code from a card and transmits it to the barrier's controller. The system uses even parity, so the total number of 1 bits sent (the 8 data bits plus one parity bit) must always be even.

The 8-bit code read from a particular card is 0 1 1 0 1 0 1 1 (bit 1 to bit 8, reading left to right).

Which 9-bit sequence (the 8 data bits followed by the parity bit) does the reader transmit?

Choose an answer to check it, then compare with the worked solution below.

Show worked solution Hide worked solution

Worked solution

Step 1: Count the 1 bits in the original byte

The 8-bit code is 0 1 1 0 1 0 1 1. Reading bit by bit: bit 2, bit 3, bit 5, bit 7 and bit 8 are all 1, and the rest are 0. That gives five 1 bits, which is an odd count.

Step 2: Work out the parity bit needed for even parity

Even parity requires the total number of 1 bits sent, the 8 data bits plus the parity bit, to be even. The data bits alone already give an odd count of five, so the parity bit must be set to 1, making the total six 1 bits, which is even.

Step 3: Build the full 9-bit sequence

The 8 original data bits are left unchanged, and the parity bit (1) is appended after them:

0 1 1 0 1 0 1 1 1

This matches option B. Option A appends a parity bit of 0, which would only be correct for odd parity with this byte (giving an odd total of five). Option C reorders the data bits incorrectly, and option D is missing the parity bit entirely.

Final answer

The reader transmits 0 1 1 0 1 0 1 1 1, option B.