summaryrefslogtreecommitdiff
path: root/3637/CH4/EX4.1/Ex4_1.sce
blob: c60ba0834f479c6dcc1b993b79459c9eb862f166 (plain)
1
2
3
4
5
6
7
8
9
10
11
//problem 1 pagenumber 4.38
//given
z='0101';format(6);
n=4;
vof=15;//volt
r=vof/(2^n-1);
v0=r*base2dec(z,2);

disp('Output voltage = '+string(v0)+' volt');