لو سمحتو ساعدوني ب c++


A 7-bit message from the source is applied to the encoder, which adds a one parity bit as the MSB to generate an 8-bit codeword having even number of 1s. The codeword is then transmitted over a noisy binary symmetric channel with a probability error of 0.4. The received word is passed to the decoder, which determines whether or not the word is in error by counting the number of 1s (error if odd). For the case of no error, the MSB is removed from the word and the 7-bit message is passed to the destination. If the word has a 1-bit error, a re-transmission signal is sent to the source to retransmit the message.