BIT103 · 0 · 10 marks
Logic Gates Transmission Error Detection The term LOGIC GATES is to be transmitted as 12 bytes of data. Each character in the term has an ASCII value. The system uses odd parity and the leftmost bit is used as parity bit. An additional parity byte is also sent after the term. The following bytes hav
Logic Gates Transmission Error Detection
The term LOGIC GATES is to be transmitted as 12 bytes of data. Each character in the term has an ASCII value. The system uses odd parity and the leftmost bit is used as parity bit. An additional parity byte is also sent after the term. The following bytes have arrived at their destination.
| letters | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
|---|---|---|---|---|---|---|---|---|---|
| 1 | L | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 0 |
| 2 | O | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 |
| 3 | G | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 1 |
| 4 | I | 0 | 1 | 0 | 0 | 1 | 0 | 0 | 1 |
| 5 | C | 0 | 1 | 0 | 0 | 0 | 0 | 1 | 1 |
| 6 | ⟨space⟩ | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 |
| 7 | G | 1 | 1 | 0 | 0 | 0 | 1 | 1 | 1 |
| 8 | A | 1 | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
| 9 | T | 0 | 1 | 0 | 1 | 0 | 1 | 0 | 0 |
| 10 | E | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 |
| 11 | S | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 1 |
| 12 | Parity byte | 1 | 1 | 0 | 1 | 0 | 0 | 1 | 0 |
a. Locate which character contains an error.
b. Locate the bit that has been transmitted incorrectly.
c. Explain how you have arrived at your conclusion.
[10]
Error Detection Using Two-Dimensional Parity (Odd Parity)
Given data
- Message: "LOGIC GATES" transmitted as 12 bytes (11 characters + 1 parity byte).
- Odd parity, leftmost bit = parity bit.
- Received bit matrix (rows 1-11 = characters, row 12 = parity byte):
| Row | Char | b1 b2 b3 b4 b5 b6 b7 b8 |
|---|---|---|
| 1 | L | 0 1 0 0 1 1 0 0 |
| 2 | O | 0 1 0 0 1 1 1 1 |
| 3 | G | 1 1 0 0 0 1 1 1 |
| 4 | I | 0 1 0 0 1 0 0 1 |
| 5 | C | 0 1 0 0 0 0 1 1 |
| 6 | space | 0 0 1 0 0 0 0 0 |
| 7 | G | 1 1 0 0 0 1 1 1 |
| 8 | A | 1 1 0 0 0 1 0 1 |
| 9 | T | 0 1 0 1 0 1 0 0 |
| 10 | E | 0 1 0 0 0 1 0 1 |
| 11 | S | 1 1 0 1 0 0 1 1 |
| 12 | Parity | 1 1 0 1 0 0 1 0 |
Step 1: Row parity check (each row must be ODD)
| Row | Char | Count of 1s | Odd? |
|---|---|---|---|
| 1 | L | 3 | ✓ |
| 2 | O | 5 | ✓ |
| 3 | G | 5 | ✓ |
| 4 | I | 3 | ✓ |
| 5 | C | 3 | ✓ |
| 6 | space | 1 | ✓ |
| 7 | G | 5 | ✓ |
| 8 | A | 4 | ✗ EVEN: fails |
| 9 | T | 3 | ✓ |
| 10 | E | 3 | ✓ |
| 11 | S | 5 | ✓ |
| 12 | Parity | 4 | (parity byte) |
Row 8 (character 'A') fails: it has 4 ones (even), so it contains the error.
Step 2: Column parity check (each column must be ODD across rows 1-12)
| Col | Bits (rows 1-12) | Count | Odd? |
|---|---|---|---|
| 1 | 0,0,1,0,0,0,1,1,0,0,1,1 | 5 | ✓ |
| 2 | 1,1,1,1,1,0,1,1,1,1,1,1 | 11 | ✓ |
| 3 | 0,0,0,0,0,1,0,0,0,0,0,0 | 1 | ✓ |
| 4 | 0,0,0,0,0,0,0,0,1,0,1,1 | 3 | ✓ |
| 5 | 1,1,0,1,0,0,0,0,0,0,0,0 | 3 | ✓ |
| 6 | 1,1,1,0,0,0,1,1,1,1,0,0 | 7 | ✓ |
| 7 | 0,1,1,0,1,0,1,0,0,0,1,1 | 6 | ✗ EVEN: fails |
| 8 | 0,1,1,1,1,0,1,1,0,1,1,0 | 8 | ✗ EVEN |
Two columns (7 and 8) appear even, which conflicts with a single-bit error model. The consistent conclusion must come from combining the row and column tests.
Step 3: Resolving the location
A single-bit error causes exactly one row and exactly one column to fail. Row 8 is the unique failing row. Therefore the erroneous bit lies in row 8, and the failing column identifies the bit position.
Correcting the error must fix Row 8's parity (make it odd) AND fix the failing column simultaneously. Row 8 currently = 1 1 0 0 0 1 0 1 (four 1s). Flipping any single bit in row 8 makes it odd (5 or 3 ones).
Testing which flip also restores a single failing column to odd:
- Column 7 has count 6 (even). Row 8, col 7 currently = 0. Flipping it to 1 makes column 7 count = 7 (odd ✓), and row 8 count becomes 5 (odd ✓).
So the correct transmitted bit was:
- Row 8 (character 'A'), bit position 7 should be 1, but was received as 0.
Verifying 'A': ASCII 'A' = 1000001. With odd parity leftmost, total 1s must be odd. Correct byte 1 1 0 0 0 0 0 1 gives data 1000001 = 'A', parity bit chosen for odd count. The received byte with bit 7 = 0 corrupted the value.
Answers
a. Character in error: Row 8 → character 'A'.
b. Incorrectly transmitted bit: Bit position 7 of character 'A' (received as 0, should be 1).
c. Reasoning: Using two-dimensional odd parity, the received byte for 'A' has an even number of 1s (4), so it fails the row parity check, isolating the faulty byte to row 8. The intersecting column that also fails its odd-parity check points to the exact bit; the flip that simultaneously restores both the row's odd parity and the failing column's odd parity is bit 7. Hence the single erroneous bit is at (row 8, column 7).
Check both parities before deciding: column 6 already has an odd count (7) and is correct, so the bold bit there is not the faulty one. The bit that fails both checks is column 7, so the erroneous bit is (row 8, bit 7), received as 0 when it should be 1.
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.