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

Saad Khalid (FA16-BCE-087) PCS LAB Report #9 To Explore Different Line Coding Schemes

The document discusses different line coding schemes used to represent digital data as digital signals. It explains that digital data is represented internally as binary 1s and 0s and digital signals are discrete signals that represent this digital data. There are three main types of line coding schemes: unipolar, polar, and bipolar. Unipolar uses a single voltage level to represent 1s and no voltage for 0s. Polar uses positive and negative voltage levels. Bipolar uses three levels - positive, negative, and zero. The document also describes implementing these schemes in MATLAB code to visualize and verify how each represents the binary values.

Uploaded by

Afaq Khaliq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views3 pages

Saad Khalid (FA16-BCE-087) PCS LAB Report #9 To Explore Different Line Coding Schemes

The document discusses different line coding schemes used to represent digital data as digital signals. It explains that digital data is represented internally as binary 1s and 0s and digital signals are discrete signals that represent this digital data. There are three main types of line coding schemes: unipolar, polar, and bipolar. Unipolar uses a single voltage level to represent 1s and no voltage for 0s. Polar uses positive and negative voltage levels. Bipolar uses three levels - positive, negative, and zero. The document also describes implementing these schemes in MATLAB code to visualize and verify how each represents the binary values.

Uploaded by

Afaq Khaliq
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Saad Khalid (FA16-BCE-087)

PCS LAB Report #9


To Explore Different Line Coding Schemes
OBJECTIVES:
 Understand how digital data is represented by digital signals
 Differentiate between different types of line coding schemes
 Familiarize with the Line Encoder and Decoder modules

METHODOLOGY:
The process for converting digital data into digital signal is said to be Line
Coding. Digital data is found in binary format. It is represented (stored) internally as
series of 1s and 0s. Digital signal is denoted by discreet signal, which represents
digital data. There are three types of line coding Schemes.
Unipolar encoding schemes use single voltage level to represent data.
In this case, to represent binary 1, high voltage is transmitted and to represent 0, no
voltage is transmitted. It is also called Unipolar-Non-return-to-zero, because there is
no rest condition i.e. it either represents 1or 0.
Polar encoding scheme uses multiple voltage levels to represent
binary values. It uses two different voltage levels to represent binary values.
Generally, positive voltage represents 1 and negative value represents 0. It is also
NRZ because there is no rest condition. NRZ scheme has two variants: NRZ-L and
NRZ-I. Problem with NRZ is that the receiver cannot conclude when a bit ended and
when the next bit is started, in case when sender and receiver’s clock are not
synchronized. This encoding scheme is a combination of RZ and NRZ-L. Bit time is
divided into two halves. It transits in the middle of the bit and changes phase when a
different bit is encountered.
Bipolar encoding uses three voltage levels, positive, negative and
zero. Zero voltage represents binary 0 and bit 1 is represented by altering positive and
negative voltages.

RESULT:
Post lab task
clc;
close all;
clear all;

x=[1 0 1 1 0 1];
nx=size(x,2);
sign=1;
i=1;
while i<nx+1
t = i:0.01:i+1-0.01;
if x(i)==1
unipolar_code=square(t*2*pi,100);
polar_code=square(t*2*pi,100);
bipolar_code=sign*square(t*2*pi,100);
sign=sign*-1;
manchester_code=-square(t*2*pi,50);
else
unipolar_code=0;
polar_code=-square(t*2*pi,100);
bipolar_code=0;
manchester_code=square(t*2*pi,50);
end
subplot(4,1,1);
plot(t,unipolar_code);
ylabel('unipolar code');
hold on;
grid on;
axis([1 10 -2 2]);

subplot(4,1,2);
plot(t,polar_code);
ylabel('polar code');
hold on;
grid on;
axis([1 10 -2 2]);

subplot(4,1,3);
plot(t,bipolar_code);
ylabel('bipolar code');
hold on;
grid on;
axis([1 10 -2 2]);

subplot(4,1,4);
plot(t,manchester_code);
ylabel('manchester code');
hold on;
grid on;
axis([1 10 -2 2]);

i=i+1;
end

Result:
Conclusion:
In this lab, we learned different coding schemes and how digital data is
represented in the form of a digital signal. We became familiar with Line Encoder and
Decoder modules of TIMS. We worked on Hardware to practically observe all the
aspects that are used in line coding techniques and then we verified them through
MATLAB code.

You might also like