From b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b Mon Sep 17 00:00:00 2001 From: priyanka Date: Wed, 24 Jun 2015 15:03:17 +0530 Subject: initial commit / add all books --- 2582/CH6/EX6.4/Ex6_4.sce | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 2582/CH6/EX6.4/Ex6_4.sce (limited to '2582/CH6/EX6.4') 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)"); -- cgit