summaryrefslogtreecommitdiff
path: root/3637/CH4/EX4.2/Ex4_2.sce
blob: 64d9e4a3d0860f5c9840fd0bb8abe2ac4f24d12f (plain)
1
2
3
4
5
6
7
8
9
10
11
//problem 2 pagenumber 4.38
//given
r=20e-3;format(6);
z='11000000';
n=8;
vof=r*(2^n-1);
v0=r*base2dec(z,2);
disp('Output offset = '+string(vof)+' volt');
disp('Output voltage = '+string(v0)+' volt');