summaryrefslogtreecommitdiff
path: root/3637/CH4/EX4.18/Ex4_18.sce
diff options
context:
space:
mode:
Diffstat (limited to '3637/CH4/EX4.18/Ex4_18.sce')
-rw-r--r--3637/CH4/EX4.18/Ex4_18.sce15
1 files changed, 15 insertions, 0 deletions
diff --git a/3637/CH4/EX4.18/Ex4_18.sce b/3637/CH4/EX4.18/Ex4_18.sce
new file mode 100644
index 000000000..be96ebda1
--- /dev/null
+++ b/3637/CH4/EX4.18/Ex4_18.sce
@@ -0,0 +1,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
+
+
+