Domanda

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?

È stato utile?

Soluzione

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!

Altri suggerimenti

Ignore the first 0 in the ASCII representation since you only need 7 bits. This becomes 110 0011. Now add the parity bit – 0 for even parity and 1 for odd parity. So, if you are using even parity, the final result would be 110 00110 (you put the parity bit the end usually)

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top