summaryrefslogtreecommitdiff
path: root/1238/CH8/EX8.5
diff options
context:
space:
mode:
Diffstat (limited to '1238/CH8/EX8.5')
-rwxr-xr-x1238/CH8/EX8.5/8_5.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/1238/CH8/EX8.5/8_5.sce b/1238/CH8/EX8.5/8_5.sce
new file mode 100755
index 000000000..d102e3bcd
--- /dev/null
+++ b/1238/CH8/EX8.5/8_5.sce
@@ -0,0 +1,20 @@
+//calculating required data//
+//example 5//
+clc
+//clears the command window//;
+clear
+//clears//
+LSB1=10;//change in output voltage due to LSB//
+LSB2=2*LSB1;//change in output voltage due to second LSB//
+LSB3=4*LSB1;//change in output voltage due to third LSB//
+LSB4=8*LSB1;//change in output voltage due to fourth LSB//
+LSB5=16*LSB1;//change in output voltage due to fifth LSB//
+Vmax=LSB1+LSB2+LSB3+LSB4+LSB5;//maximum full scale output which occurs at input 11111//
+//all the voltage units are in mV//
+printf('maximum full scale output in mV at 1111=%d volt\n',Vmax);//displaying the result//
+R=10;//resolution in mV since smallest increment due to change in LSB is 10mV//
+printf('resolution=%d volt\n',R);//diaplaying the result//
+S=10;//step size=resolution//
+R1=S/Vmax*100;//percentage resolution//
+printf('percentage resolution=%f percent',R1);//displaying the result//
+