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.11/EX11_11.sce | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 1757/CH11/EX11.11/EX11_11.sce (limited to '1757/CH11/EX11.11') diff --git a/1757/CH11/EX11.11/EX11_11.sce b/1757/CH11/EX11.11/EX11_11.sce new file mode 100755 index 000000000..ed15265fb --- /dev/null +++ b/1757/CH11/EX11.11/EX11_11.sce @@ -0,0 +1,39 @@ +//Example11.11 // to find the resolution and analog output voltage of 8-bit D/A converter +clc; +clear; +close; +VFS = 10 ; +N = 8 ; +BI = 10101111 ; BI = 11100011 ; BI = 00101001 ; BI = 01000110 + +// the resolution of 8-bit D/A converter is defined as +Resolution = VFS/(2^N-1) ; + +// An analog output voltage of D/A converter is given by +// Vo = Resolution*(2^-0*b0+2^-1*b1+....+2^-N*bn-1) +// Vo = Resolution*(2^-0*b0+2^-1*b1+2^-2*b2+2^-3*b3+2^-4*b4+2^-5*b5+2^-6*b6+2^-7*b7); + +// For the BI 10101111 output analog voltage is +BI = '10101111'; +BI = bin2dec(BI); +Vo = Resolution*BI ; +disp('For the BI 10101111 output analog voltage is = '+string(Vo)+ ' V '); + +// For the BI 11100010 output analog voltage is +BI = '11100010'; +BI = bin2dec(BI); +Vo = Resolution*BI ; +disp('For the BI 11100010 output analog voltage is = '+string(Vo)+ ' V '); + +// For the BI 00101001 output analog voltage is +BI = '00101001'; +BI = bin2dec(BI); +Vo = Resolution*BI ; +disp('For the BI 00101001 output analog voltage is = '+string(Vo)+ ' V '); + +// For the BI 01000110 output analog voltage is +BI = '01000110'; +BI = bin2dec(BI); +Vo = Resolution*BI ; +disp('For the BI 01000110 output analog voltage is = '+string(Vo)+ ' V '); + -- cgit