Loading....

Computer Science 0478 | Paper 2 Mock 01 | Algorithms, Programming and Logic

Question 1 Report

A system transmits ASCII characters using 7 data bits plus 1 even parity bit (8 bits total). The parity bit is the most significant (leftmost) bit.

(a) The ASCII codes for the characters A, B, C are 1000001, 1000010, 1000011. Add the even parity bit to each and show the complete 8-bit code. [3]

CharacterASCII (7 bits)Number of 1sParity bitComplete byte
A1000001
B1000010
C1000011

Answer Details

(a) Adding even parity bits to ASCII codes (parity bit is the leftmost bit): [3]

CharacterASCII (7 bits)Number of 1sParity bitComplete byte
A10000012 (even)001000001
B10000102 (even)001000010
C10000113 (odd)111000011

[1] for A (parity 0, byte 01000001), [1] for B (parity 0, byte 01000010), [1] for C (parity 1, byte 11000011).

For even parity, the total number of 1s in the complete 8-bit byte (including the parity bit) must be even. Characters A and B each have two 1s in their ASCII codes (already even), so the parity bit is 0. Character C has three 1s (odd), so the parity bit must be 1 to bring the total to four (even).

1
2
3
4
5
6
7
8
9
10
11