diff options
author | priyanka | 2015-06-24 15:03:17 +0530 |
---|---|---|
committer | priyanka | 2015-06-24 15:03:17 +0530 |
commit | b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch) | |
tree | ab291cffc65280e58ac82470ba63fbcca7805165 /1757/CH11/EX11.2 | |
download | Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2 Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip |
initial commit / add all books
Diffstat (limited to '1757/CH11/EX11.2')
-rwxr-xr-x | 1757/CH11/EX11.2/EX11_2.sce | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/1757/CH11/EX11.2/EX11_2.sce b/1757/CH11/EX11.2/EX11_2.sce new file mode 100755 index 000000000..e3d889d40 --- /dev/null +++ b/1757/CH11/EX11.2/EX11_2.sce @@ -0,0 +1,32 @@ +//Example11.2 // determine the output voltage of D/A converter for the binary inputs a) 10101010 b) 11001100 c) 11101110 d) 00010001
+clc;
+clear;
+close;
+del = 12*10^-3 ; // mA
+
+// the input voltage of D/A converter
+ //Vo = del*binary input (BI)
+
+// For BI 10101010 the output
+BI = '10101010' ;
+BI = bin2dec(BI);
+Vo = del*BI ;
+disp('For BI 10101010 the output of D/A converter is = ' +string(Vo)+ ' V ');
+
+// For BI 11001100 the output
+BI = '11001100' ;
+BI = bin2dec(BI);
+Vo = del*BI ;
+disp('For BI 11001100 the output of D/A converter is = ' +string(Vo)+ ' V ');
+
+// For BI 11101110 the output
+BI = '11101110' ;
+BI = bin2dec(BI);
+Vo = del*BI ;
+disp('For BI 11101110 the output of D/A converter is = ' +string(Vo)+ ' V ');
+
+// For BI 00010001 the output
+BI = '00010001' ;
+BI = bin2dec(BI);
+Vo = del*BI ;
+disp('For BI 00010001 the output of D/A converter is = ' +string(Vo)+ ' V ');
|