0% found this document useful (0 votes)
9 views3 pages

Block Coding Error Detection Assignment

The document outlines an assignment focused on implementing error detection and correction using block coding, specifically the 4B/5B scheme. It details the steps for encoding and decoding data, including the generation of redundant bits and validation of codewords. Students are instructed to submit their C/C++ code along with output snapshots, adhering to specific mapping rules for codewords.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

Block Coding Error Detection Assignment

The document outlines an assignment focused on implementing error detection and correction using block coding, specifically the 4B/5B scheme. It details the steps for encoding and decoding data, including the generation of redundant bits and validation of codewords. Students are instructed to submit their C/C++ code along with output snapshots, adhering to specific mapping rules for codewords.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Week 05-Assignment 05

Error Detection and Correction (Block Coding-Physical Layer)

Instructions to submit the file:


1. You may use C/C++ only to submit the assignment. Your file should be named as
IMT_Enrollment no_Lab5 or IMG_Enrollment no_Lab5 (All in Capital letters)
2. Attach the snapshots of the output along with the code snippet.

Block Coding:
All of you must have gone through the idea of block coding for error correction and
detection in theory classroom. Steps involved in block coding is given as follows:

1. Data word preparation at sender side.


2. At the sender side, an algorithm generates the redundant bit/bits that can be
appended to data word to form a codeword, known as the encoding algorithm.
3. Code words transmitted to the receiver.
4. At the receiver side, a checker algorithm is used to verify whether the received
codeword is valid or not, known as the decoding algorithm.
5. After validation, the checker removes the redundant bit and forward the actual data
word to the receiver.

Based on the above description, the scenario uses two algorithms


a) At sender side to generate redundant bits to form codeword
b) At the receiver side to validate and give the actual data word to the receiver.

Activity 1:
Implement 4B/5B Block coding scheme for user defined input. You may use the table
given below for implementation.

Inputs
● N: Number of bits in each input data block (e.g., 4 for 4B/5B)
● M: Number of bits in each encoded block (e.g., 5 for 4B/5B)
● DataWord4 = “0101” (This should be user defined)

Output
● Display the DataWord need to be encoded: 0101
● Display Redundant bits generated by the encoding algorithm
● Give the CodeWord5 which is generated at sender
● Received CodeWord (May be modified or not modified) at receiver.
● Validate the codeword and; if valid, decode the corresponding DW from the
CodeWord.

General Rules to be Imposed for Mapping


1. Uniqueness: Each dataword must map to a unique codeword; no two datawords
share a codeword.
2. Bit Transition/Run-Length Limitation: Select codewords so that there are not
more than three consecutive zeros in any codeword or in the final coded stream.
3. Minimum Number of Ones (Optional/Recommended): Prefer codewords with
at least two or three ones to ensure enough bit transitions for clock recovery.
4. Leading or Trailing Bits Constraint: Avoid codewords with too many leading or
trailing zeros (for example, no codeword should start or end with more than two
zeros).
5. Reserved and Control Codes: Clarify that unused codewords should be left
aside for possible control signals or error detection (not mapped to input data).

You might also like