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 /2492/CH8 | |
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 '2492/CH8')
-rwxr-xr-x | 2492/CH8/EX8.1/ex8_1.sce | 12 | ||||
-rwxr-xr-x | 2492/CH8/EX8.2/ex8_2.sce | 11 | ||||
-rwxr-xr-x | 2492/CH8/EX8.3/ex8_3.sce | 11 | ||||
-rwxr-xr-x | 2492/CH8/EX8.4/ex8_4.sce | 10 | ||||
-rwxr-xr-x | 2492/CH8/EX8.9/ex8_9.sce | 28 |
5 files changed, 72 insertions, 0 deletions
diff --git a/2492/CH8/EX8.1/ex8_1.sce b/2492/CH8/EX8.1/ex8_1.sce new file mode 100755 index 000000000..8d48771cb --- /dev/null +++ b/2492/CH8/EX8.1/ex8_1.sce @@ -0,0 +1,12 @@ +// Exa 8.1
+format('v',9)
+clc;
+clear;
+close;
+// Given data
+str= '3BF';// given number in hexadecimal to convert into binary
+str_in_dec= hex2dec(str);// decimal equivalent
+str_in_bin= dec2bin(str_in_dec);// binary equivalent
+disp(str_in_bin,"The binary equivalent of 3BF is : ")
+
+// Note : The answer in the book is wrong because binary equivalent of B = 1011 and in the book they used 1101 which is wrong.
diff --git a/2492/CH8/EX8.2/ex8_2.sce b/2492/CH8/EX8.2/ex8_2.sce new file mode 100755 index 000000000..8eb87018b --- /dev/null +++ b/2492/CH8/EX8.2/ex8_2.sce @@ -0,0 +1,11 @@ +// Exa 8.2
+format('v',9)
+clc;
+clear;
+close;
+// Given data
+str= '527';// given number in octal to convert into binary
+str_in_dec= oct2dec(str);// decimal equivalent
+str_in_bin= dec2bin(str_in_dec);// binary equivalent
+disp(str_in_bin,"The binary equivalent of 527 is : ")
+
diff --git a/2492/CH8/EX8.3/ex8_3.sce b/2492/CH8/EX8.3/ex8_3.sce new file mode 100755 index 000000000..d7d390e9a --- /dev/null +++ b/2492/CH8/EX8.3/ex8_3.sce @@ -0,0 +1,11 @@ +// Exa 8.3
+format('v',9)
+clc;
+clear;
+close;
+// Given data
+str= '256';// given number in octal to convert into hexadecimal
+str_in_dec= oct2dec(str);// decimal equivalent
+str_in_hex= dec2hex(str_in_dec);// hexadecimal equivalent
+disp(str_in_hex,"The hexadecimal equivalent of 256 is : ")
+
diff --git a/2492/CH8/EX8.4/ex8_4.sce b/2492/CH8/EX8.4/ex8_4.sce new file mode 100755 index 000000000..a5381259b --- /dev/null +++ b/2492/CH8/EX8.4/ex8_4.sce @@ -0,0 +1,10 @@ +// Exa 8.4
+format('v',9)
+clc;
+clear;
+close;
+// Given data
+str= 450;// given number in decimal to convert into octal
+str_in_oct= dec2oct(str);// octal equivalent
+disp(str_in_oct,"The octal equivalent of 450 is : ")
+
diff --git a/2492/CH8/EX8.9/ex8_9.sce b/2492/CH8/EX8.9/ex8_9.sce new file mode 100755 index 000000000..f8faee15a --- /dev/null +++ b/2492/CH8/EX8.9/ex8_9.sce @@ -0,0 +1,28 @@ +// Exa 8.9
+format('v',6)
+clc;
+clear;
+close;
+// Given data
+R_C= 1;// in k ohm
+V_CC= 5;// in V
+V_CEsat= 0;// in V
+V_BE= 0.7;// in V
+bita_min= 50;
+bita_max= 100;
+// For the transistor to go to saturation,
+I_C= (V_CC-V_CEsat)/R_C;// in mA
+bita= bita_min;// for driving the transistor into saturation
+I_Bmin= I_C/bita;//minimum base current in mA
+// So, (V_CC-V_BE)/R_B >= I_B or
+R_B= (V_CC-V_BE)/I_Bmin;// in k ohm
+disp(R_B,"The maximum permissible value of R_B in k ohm is : ")
+// For actual calculation one may take V_CEsat= 0.3 V
+V_CEsat= 0.3;// in V
+I_C= (V_CC-V_CEsat)/R_C;// in mA
+bita= bita_min;// for driving the transistor into saturation
+I_Bmin= I_C/bita;//minimum base current in mA
+// So, (V_CC-V_BE)/R_B >= I_B or
+R_B= (V_CC-V_BE)/I_Bmin;// in k ohm
+disp("For actual calculation at V_CE(sat) = 0.3 V, the maximum value ")
+disp(R_B,"of R_B in k ohm is : ")
|