summaryrefslogtreecommitdiff
path: root/74/CH12/EX12.2/example2_sce.sce
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /74/CH12/EX12.2/example2_sce.sce
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '74/CH12/EX12.2/example2_sce.sce')
-rwxr-xr-x74/CH12/EX12.2/example2_sce.sce12
1 files changed, 12 insertions, 0 deletions
diff --git a/74/CH12/EX12.2/example2_sce.sce b/74/CH12/EX12.2/example2_sce.sce
new file mode 100755
index 000000000..81fb3d991
--- /dev/null
+++ b/74/CH12/EX12.2/example2_sce.sce
@@ -0,0 +1,12 @@
+//chapter 12
+// example 12.2
+// page 413
+n=4;// 4-bit DAC
+Vofs=15;
+inp=0110;
+resolution=Vofs/(2^n-1);
+disp(resolution)
+D=0*2^3+1*2^2+1*2^1+0*2^0;//Decimal value of input
+disp(D)
+Vout=D*resolution
+disp(Vout) \ No newline at end of file