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 --- 1757/CH11/EX11.2/EX11_2.sce | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 1757/CH11/EX11.2/EX11_2.sce (limited to '1757/CH11/EX11.2') 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 '); -- cgit