ii. complete the given table by writing the channel encoded message by using parity check of adding 1 bit in…

ii. complete the given table by writing the channel encoded message by using parity check of adding 1 bit in the message.\n\n| message | source encoding | channel |\n| ---- | ---- | ---- |\n| ally | 0000 | select |\n| enemy | 0111 | select |\n| attack | 1000 | select |\n| retreat | 1110 | select |\n| surrender | 1011 | select |

ii. complete the given table by writing the channel encoded message by using parity check of adding 1 bit in the message.\n\n| message | source encoding | channel |\n| ---- | ---- | ---- |\n| ally | 0000 | select |\n| enemy | 0111 | select |\n| attack | 1000 | select |\n| retreat | 1110 | select |\n| surrender | 1011 | select |

Answer

Explanation:

Step1: Recall parity - check concept

Parity - check adds 1 bit to make the total number of 1s either even (even - parity) or odd (odd - parity). Here, assume even - parity.

Step2: Calculate for "ALLY"

The source encoding is 0000. Since there are 0 1s, we add 0 to make the number of 1s even. So the channel - encoded message is 00000.

Step3: Calculate for "ENEMY"

The source encoding is 0111. There are 3 1s. We add 1 to make the number of 1s even. So the channel - encoded message is 01111.

Step4: Calculate for "ATTACK"

The source encoding is 1000. There is 1 1. We add 1 to make the number of 1s even. So the channel - encoded message is 10001.

Step5: Calculate for "RETREAT"

The source encoding is 1110. There are 3 1s. We add 1 to make the number of 1s even. So the channel - encoded message is 11101.

Step6: Calculate for "SURRENDER"

The source encoding is 1011. There are 3 1s. We add 1 to make the number of 1s even. So the channel - encoded message is 10111.

Answer:

ALLY: 00000 ENEMY: 01111 ATTACK: 10001 RETREAT: 11101 SURRENDER: 10111