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 /2582/CH6/EX6.4 | |
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 '2582/CH6/EX6.4')
-rwxr-xr-x | 2582/CH6/EX6.4/Ex6_4.sce | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/2582/CH6/EX6.4/Ex6_4.sce b/2582/CH6/EX6.4/Ex6_4.sce new file mode 100755 index 000000000..b7aa3c0f8 --- /dev/null +++ b/2582/CH6/EX6.4/Ex6_4.sce @@ -0,0 +1,22 @@ +//Ex 6.4
+clc;clear;close;
+format('v',5);
+Range=0:10;//range
+//(i)2-bit DAC
+n=2;//no. of bits
+step=max(Range)/2^n;//V
+reading='10';//input in binary
+Vo=step*bin2dec(reading);//V
+disp(Vo,"(i) Output Voltage(V)");
+//(ii)4-bit DAC
+n=4;//no. of bits
+step=max(Range)/2^n;//V
+reading='0110';//input in binary
+Vo=step*bin2dec(reading);//V
+disp(Vo,"(ii) Output Voltage(V)");
+//(i)8-bit DAC
+n=8;//no. of bits
+step=max(Range)/2^n;//V
+reading='10111100';//input in binary
+Vo=step*bin2dec(reading);//V
+disp(Vo,"(iii) Output Voltage(V)");
|