Prof. Dr. Thorsten Jungmann (last updated 2026-11-02)

Relates to DET-05 Codes, code converters and standard components

Task

Your smartphone sends data to wireless headphones via Bluetooth, and electromagnetic interference can flip single bits on the way. Bluetooth protects certain packets with a shortened Hamming code. Here, you work with the form with seven bits from the lesson. The data bits , , and carry a decimal digit in the binary-coded decimal (BCD) code, with the weight 8, and three parity bits are added:

Position1234567
Bit

With even parity, completes the positions 3, 5 and 7, the positions 3, 6 and 7, and the positions 5, 6 and 7 to an even number of ones.

a) First without the Hamming code: the digit 4 is sent in the BCD code, followed by one parity bit with even parity. Give the five bits.

b) The bit with the weight 1 of a) flips on the way. Does the receiver notice? In another transmission, the bits with the weights 4 and 2 flip instead. Does the receiver notice this, and which digit does it read?

c) Determine the Hamming distance between the digits 4 and 6, first in the BCD code, then in the BCD code with one parity bit.

d) Determine the code words with seven bits for the digits 4 and 6. What is the Hamming distance between them?

e) The receiver gets 1001000. Which bit has flipped, and which digit was sent? Which digit would the data bits have delivered without the correction?

f) The receiver gets 1000100. Which bit has flipped? Does this change the digit?

g) The digit 4 was sent, and the bits at the positions 3 and 5 have flipped: the receiver gets 1011000. Which bit does the receiver invert, and what does it deliver?

h) Let to be the received bits. Give the expressions of the three results , and of the receiver. Then design the correction of the bit at position 3 with an output of a 3-to-8 decoder and an XOR gate.