ASCII with odd parity

silver picture silver · Oct 13, 2013 · Viewed 14.7k times · Source

Consider a data communications system that represents characters using ASCII with odd parity. Each 7-bit ASCII character is followed by a parity bit.

Specify the resulting 8-bit code word for each of the characters in the following message that is to be transmitted:

IAcademy!

(The characters in this message, including the exclamation mark.)


Using a Table of ASCII Characters, I converted the ASCII character "c" from 0x63 to binary: 0110 0011

There are an even number of 1's.

1) Where do I add the parity bit (prefix or suffix)?

2) Adding a parity bit to make the number of 1's odd will result to 9-bits. How do I keep it to 8-bits?

Answer

guga picture guga · Oct 13, 2013

First you need to know what is sent first: LSB or MSB. Second, you append the ODD parity bit at the end of the transmission such that the total number of 1s is odd. So, if you want to send the ASCII 'B' (0x42 -> 1000010) using a communication system that sends LSB first (most common), you would send 0xC2 (11000010), so you would see on the wire 0,1,0,0,0,0,1,1. If you're using a communication system that sends MSB first, the same 'B' would be sent as 0x85. In that case, you would see on the wire 1,0,0,0,0,1,0,1. I hope this helps!