blob: b0d17bdf2af1248e322417f974d0ed5a5ca5988f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
//clear//
//Caption:Generation of bipolar output for duobinary coder
//Example6.3:Operation of Circuit in figure 6.13
//for generating bipolar format
//page 256 and page 257
//Refer Table 6.4
clc;
x = [0,1,1,0,1,0,0,0,1,1];//input binary sequence:precoder input
y(1) = 1;
for k =2:length(x)+1
y(k) = xor(x(k-1),y(k-1));
end
y_delay = y(1:$-1);
y = y';
y_delay = y_delay';
disp(y,'Modulo-2 adder output:')
disp(y_delay,'Delay element output:')
for k = 1:length(y_delay)
z(k) = y(k+1)-y_delay(k);
end
z = z';
disp(z,'differential encoder bipolar output in volts:')
//Result
//Modulo-2 adder output:
// 1. 1. 0. 1. 1. 0. 0. 0. 0. 1. 0.
// Delay element output:
// 1. 1. 0. 1. 1. 0. 0. 0. 0. 1.
// differential encoder bipolar output in volts:
// 0. - 1. 1. 0. - 1. 0. 0. 0. 1. - 1.
|