summaryrefslogtreecommitdiff
path: root/3637/CH4/EX4.10/Ex4_10.sce
blob: 74e139e50d28089e4e0db7f90a5d8c225d999e13 (plain)
1
2
3
4
5
6
7
8
9
10
11
//problem 10 pagenumber  4.42
//given
z=['111111','100110'];
vref1=20;//volt
e=1/base2dec(z(1),2)*vref1;format(6);
disp('Minimum voltage each bit = '+string(e)+' volt');
e=base2dec(z(2),2)/base2dec(z(1),2)*vref1;

disp('Output voltage at '+string(z(2))+' = '+string(e)+' volt');