Cse350 (2) Finalprojectreport
Cse350 (2) Finalprojectreport
Submitted To
Md. Mahir Ashhab
Lecturer,
Department of Computer Science and Engineering
Faculty of Sciences and Technology
Submitted By
Jaser Maharus
ID: 2018-3-60-070
Submission Date
September 18, 2022
Introduction:
In telecommunication, 4B7B is a form of data communications line code. 4B7B maps groups of
4-bits of data onto groups of 7-bits for transmission. These 7-bits words are pre-determined in a
dictionary and they are chosen to ensure that there will be sufficient transitions in the line state to
produce a self-clocking signal. A collateral effect of the code is that 25% more bits are needed to
send the same information. An alternative to using 4B7B coding is to use a scrambler. Some
systems use scramblers in conjunction with 4B7B coding to assure DC balance and
improve electromagnetic compatibility. Depending on the standard or specification of interest,
there may be several 7-bits output codes left unused. The presence of any of the unused codes in
the data stream can be used as an indication that there is a fault somewhere in the link. Therefore,
the unused codes can be used to detect errors in the data stream.
Implementation Detail:
In theory, 4B/7B encoding is a type of 'Block coding'. This processes groups of bits rather than
outputting a signal for each individual bit (as in Manchester encoding). A group of 4-bits is
encoded so that extra 3-bits are added. Since the input data is taken 4-bits at a time, there are 2^4,
or 16 different bit patterns. The encoded bits use 7-bits, and hence have 2^7 or 128 different bit
patterns. As a result, the 7-bit patterns can always have more than two '1's in them even if the data
is all '0's a translation occurs to another of the bit patterns. This enables clock synchronization
required for reliable data transfer.
In coding, on the sender end a bit-string of the length of 1200 will be our input (4-bit) and a bit-
string of the length of 2100 will be the output (7-bit). In that 2100 length bit-string there will be a
7-bit chunk. That 2100 bit-string length will the whole string and that 7-bit chunks will be the sub-
string. Now in the sender part we will generate syndrome. [We are using 4B/7B for sending data
via file, so there is no wireless medium in between and there will be no errors. For creating error,
we are generating syndrome on our sender end] We will generate syndrome using the sub-string
of the length 300 (7-bits chunk). We will put condition(s) in that sub-string while executing it and
that will create syndrome. On the receiver end, the receiver will receive a 2100 bit-length long
output string containing syndrome and will calculate error by using XOR operation and by
matching it with the syndrome table. After doing this the receiver side will receive an error free
data.
Conclusion:
As we are using 4B/7B encoding via file data transfer and creating syndrome to see if our
encoding-decoding functions are working properly or not, and it worked so we can say that our
implementation was successful. There might be some limitations as we did not use wireless
medium for our implementation.