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 /1241/CH11 | |
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 '1241/CH11')
-rwxr-xr-x | 1241/CH11/EX11.1/exa11_1.sce | 14 | ||||
-rwxr-xr-x | 1241/CH11/EX11.2/exa11_2.sce | 19 | ||||
-rwxr-xr-x | 1241/CH11/EX11.3/exa11_3.sce | 19 | ||||
-rwxr-xr-x | 1241/CH11/EX11.4/exa11_4.sce | 28 | ||||
-rwxr-xr-x | 1241/CH11/EX11.5/exa11_5.sce | 37 | ||||
-rwxr-xr-x | 1241/CH11/EX11.6/exa11_6.sce | 17 | ||||
-rwxr-xr-x | 1241/CH11/EX11.7/exa11_7.sce | 17 |
7 files changed, 151 insertions, 0 deletions
diff --git a/1241/CH11/EX11.1/exa11_1.sce b/1241/CH11/EX11.1/exa11_1.sce new file mode 100755 index 000000000..f4fa3c575 --- /dev/null +++ b/1241/CH11/EX11.1/exa11_1.sce @@ -0,0 +1,14 @@ +//Example 11-1//
+// % Resolution of a five bit D/A converter//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+n=5
+//here n is the number of bits//
+disp('Max number that can be represented using 5 bits is the binary number 11111 ie 31 in decimal form ')
+pres=(1/((2^n)-1))*100
+//pres denotes the percent resolution//
+disp(' Therefore the percent resolution of the 5 bit D/A converter is : ')
+disp(pres)
+//answer is displayed//
diff --git a/1241/CH11/EX11.2/exa11_2.sce b/1241/CH11/EX11.2/exa11_2.sce new file mode 100755 index 000000000..4eb9bcf53 --- /dev/null +++ b/1241/CH11/EX11.2/exa11_2.sce @@ -0,0 +1,19 @@ +//Example 11-2//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+n=6
+mpsv=20
+//n denotes the number of bits,mpsv denotes the max. precision supply voltage//
+disp('Each bit represents 1/(2^6)-1 of the total 20V ')
+E1=(1/63)*20
+//given a binary number 100110 whose voltage value is to be found//
+a=100110
+b=bin2dec('100110')
+E2=(b/((2^6)-1))*20
+disp('The voltage change that each LSB represents is: ')
+disp(E1)
+disp('The voltage that the binary number 100110 represents is: ')
+disp(E2)
+//answers are displayed//
diff --git a/1241/CH11/EX11.3/exa11_3.sce b/1241/CH11/EX11.3/exa11_3.sce new file mode 100755 index 000000000..0ef138c3c --- /dev/null +++ b/1241/CH11/EX11.3/exa11_3.sce @@ -0,0 +1,19 @@ +//Example 11-3//
+//compute gain of an op-amp//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+Rf=40
+Rs=5
+Ein=3.2
+//Given the resistance values in kilo ohms and the input voltage in volts//
+Av=Rf/Rs
+//Av denotes the gain of the op-amp//
+Eo=Av*Ein
+//Eo denotes the output voltage//
+disp('The voltage gain of the given op-amp is: ')
+disp(Av)
+disp('The output voltage of the opamp in volts is: ')
+disp(Eo)
+//results are displayed//
diff --git a/1241/CH11/EX11.4/exa11_4.sce b/1241/CH11/EX11.4/exa11_4.sce new file mode 100755 index 000000000..9ccb8188a --- /dev/null +++ b/1241/CH11/EX11.4/exa11_4.sce @@ -0,0 +1,28 @@ +//Example 11-4//
+//compute output voltage for circuit in fig 11-12//
+clc
+//clears the window//
+clear
+//clears all existing varibles//
+R1=10
+R2=10
+R3=10
+Rf=10
+E1=3
+E2=-2
+E3=-4
+//Given all the resistance values in kilo ohms and the voltages in volts at the inputs//
+disp('the current throught resistor R1 in milli amps is: ')
+I1=E1/R1
+disp(I1)
+disp('the current throught resistor R2 in milli amps is: ')
+I2=E2/R2
+disp(I2)
+disp('the current throught resistor R3 in milli amps is: ')
+I3=E3/R3
+disp(I3)
+Eo=-(I1+I2+I3)*Rf
+//Eo denotes the output voltage//
+disp('The output voltage in volts of the circuit is: ')
+disp(Eo)
+//answer is displayed//
diff --git a/1241/CH11/EX11.5/exa11_5.sce b/1241/CH11/EX11.5/exa11_5.sce new file mode 100755 index 000000000..ba35dd7d4 --- /dev/null +++ b/1241/CH11/EX11.5/exa11_5.sce @@ -0,0 +1,37 @@ +//Example 11-5//
+//compute output voltage for the circuit in fig. 11-13//
+clc
+//clears the console//
+clear
+//clears all existing variables//
+disp('switch configuration ABCD is 0110 ')
+E=8
+RA=1
+RB=2
+RC=4
+RD=8
+Rf=1
+//Given all the resistance values in kilo ohms and the common voltage E in volts//
+disp('the current throught resistor RA in milli amps is: ')
+IA=0
+//switch A is open//
+disp(IA)
+disp('the current throught resistor RB in milli amps is: ')
+IB=E/RB
+disp(IB)
+disp('the current throught resistor RC in milli amps is: ')
+IC=E/RC
+disp(IC)
+disp('the current throught resistor RD in milli amps is: ')
+ID=0
+//switch D is open//
+disp(ID)
+Itot=IA+IB+IC+ID
+//total current is denoted by Itot//
+If=Itot
+Eo=If*Rf
+Eo=Eo*(-1)
+//Eo denotes output voltage//
+disp('Output voltage of the circuit in volts is: ')
+disp(Eo)
+//result is displayed//
diff --git a/1241/CH11/EX11.6/exa11_6.sce b/1241/CH11/EX11.6/exa11_6.sce new file mode 100755 index 000000000..220d00086 --- /dev/null +++ b/1241/CH11/EX11.6/exa11_6.sce @@ -0,0 +1,17 @@ +//Example 11-6//
+//resolution and percent resolution of a 12 bit D/A converter,output varies from -50 to 50//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+E=50-(-50)
+n=12
+//given the voltage range E in volts and the number of bits n//
+disp('12 bit converter can have (2^12)-1 non zero states ')
+Res=E/((2^n)-1)
+Pres=1/((2^n)-1)*(100)
+disp('the resolution in volts is : ')
+disp(Res)
+disp('the percent resolution is : ')
+disp(Pres)
+//answers are displayed//
diff --git a/1241/CH11/EX11.7/exa11_7.sce b/1241/CH11/EX11.7/exa11_7.sce new file mode 100755 index 000000000..28b33eac1 --- /dev/null +++ b/1241/CH11/EX11.7/exa11_7.sce @@ -0,0 +1,17 @@ +//Example 11-7//
+//resolution and percent resolution of a 10 bit D/A converter,input voltage varies from -10 to 10//
+clc
+//clears the window//
+clear
+//clears all existing variables//
+E=10-(-10)
+n=10
+//given the voltage range E in volts and the number of bits n//
+disp('10 bit converter can have (2^10)-1 non zero states ')
+Res=E/((2^n)-1)
+Pres=1/((2^n)-1)*(100)
+disp('the resolution in millivolts is : ')
+disp(Res*1000)
+disp('the percent resolution is : ')
+disp(Pres)
+//answers are displayed//
|