summaryrefslogtreecommitdiff
path: root/3637/CH4/EX4.18/Ex4_18.sce
blob: be96ebda129ef490ead5d0c2809d2d834efb5c11 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//problem 18 pagenumber 4.45
//given
n=4;z='1111';format(6);
r=10e3;//ohm
r1=20e3;//ohm
vref=10;//volt
//determine Resolution and output current
r=(1/2^n)*vref/r;
disp('Resolution of 1th = '+string(r*10^6)+' μA');
disp('Iout = '+string(r*1e6)+' x D');
iout=r*base2dec(z,2);
disp('Output current = '+string(iout*10^6)+' μA');//error in book