summaryrefslogtreecommitdiff
path: root/3515/CH2
diff options
context:
space:
mode:
authorpriyanka2015-06-24 15:03:17 +0530
committerpriyanka2015-06-24 15:03:17 +0530
commitb1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b (patch)
treeab291cffc65280e58ac82470ba63fbcca7805165 /3515/CH2
downloadScilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.gz
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.tar.bz2
Scilab-TBC-Uploads-b1f5c3f8d6671b4331cef1dcebdf63b7a43a3a2b.zip
initial commit / add all books
Diffstat (limited to '3515/CH2')
-rw-r--r--3515/CH2/EX2.1/Ex2_1.sce50
-rw-r--r--3515/CH2/EX2.10/Ex2_10.sce34
-rw-r--r--3515/CH2/EX2.11/Ex2_11.sce43
-rw-r--r--3515/CH2/EX2.12/Ex2_12.sce22
-rw-r--r--3515/CH2/EX2.14/Ex2_14.sce24
-rw-r--r--3515/CH2/EX2.15/Ex2_15.sce22
-rw-r--r--3515/CH2/EX2.16/Ex2_16.sce28
-rw-r--r--3515/CH2/EX2.17/Ex2_17.sce21
-rw-r--r--3515/CH2/EX2.18/Ex2_18.sce28
-rw-r--r--3515/CH2/EX2.19/Ex2_19.sce44
-rw-r--r--3515/CH2/EX2.2/Ex2_2.sce40
-rw-r--r--3515/CH2/EX2.20/Ex2_20.sce28
-rw-r--r--3515/CH2/EX2.22/Ex2_22.sce57
-rw-r--r--3515/CH2/EX2.23/Ex2_23.sce21
-rw-r--r--3515/CH2/EX2.24/Ex2_24.sce31
-rw-r--r--3515/CH2/EX2.3/Ex2_3.sce25
-rw-r--r--3515/CH2/EX2.4/Ex2_4.sce30
-rw-r--r--3515/CH2/EX2.5/Ex2_5.sce25
-rw-r--r--3515/CH2/EX2.6/Ex2_6.sce24
-rw-r--r--3515/CH2/EX2.7/Ex2_7.sce18
-rw-r--r--3515/CH2/EX2.8/Ex2_8.sce37
-rw-r--r--3515/CH2/EX2.9/Ex2_9.sce27
22 files changed, 679 insertions, 0 deletions
diff --git a/3515/CH2/EX2.1/Ex2_1.sce b/3515/CH2/EX2.1/Ex2_1.sce
new file mode 100644
index 000000000..55063165c
--- /dev/null
+++ b/3515/CH2/EX2.1/Ex2_1.sce
@@ -0,0 +1,50 @@
+// Exa 2.1
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_S= 0;// As source is connected to ground
+V_G= 1.5;// in V
+V_D= 0.5;// in V
+Vt= 0.7;// in V
+// Part(a) V_D= 0.5;// in V
+V_D= 0.5;// in V
+V_DS= V_D-V_S;// in V
+V_GS= V_G-V_S;// in V
+if V_GS < Vt then
+ disp("At V_D = 0.5 , the device is in cut off region")
+elseif V_DS<= (V_GS-Vt) then
+ disp("At V_D = 0.5 , the device is in triode region");
+else
+ disp("At V_D = 0.5 , the device is in saturation region");
+
+end
+
+// Part(b) V_D= 0.9;// in V
+V_D= 0.9;// in V
+V_DS= V_D-V_S;// in V
+V_GS= V_G-V_S;// in V
+if V_GS < Vt then
+ disp("At V_D = 0.9 , the device is in cut off region")
+elseif V_DS<= (V_GS-Vt) then
+ disp("At V_D = 0.9 , the device is in triode region");
+else
+ disp("At V_D = 0.9 , the device is in saturation region");
+
+end
+
+// Part(c) V_D= 3;// in V
+V_D= 3;// in V
+V_DS= V_D-V_S;// in V
+V_GS= V_G-V_S;// in V
+if V_GS < Vt then
+ disp("At V_D = 3 , the device is in cut off region")
+elseif V_DS<= (V_GS-Vt) then
+ disp("At V_D = 3 , the device is in triode region");
+else
+ disp("At V_D = 3 , the device is in saturation region");
+
+end
+
+
diff --git a/3515/CH2/EX2.10/Ex2_10.sce b/3515/CH2/EX2.10/Ex2_10.sce
new file mode 100644
index 000000000..978b8ff48
--- /dev/null
+++ b/3515/CH2/EX2.10/Ex2_10.sce
@@ -0,0 +1,34 @@
+// Exa 2.10
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_DD= 15;// in V
+Vt= 1;// in V
+V_D= 10;// in V
+V_S= 5;// in V
+KnWbyL= 1;// in mA/V^2
+KnWbyL=KnWbyL*10^-3;// in A/V^2
+R_G1= 8;// in MΩ
+R_G1= R_G1*10^6;// in Ω
+I_D= 0.5;// in mA
+I_D=I_D*10^-3;//in A
+R_D= (V_DD-V_D)/I_D;// in Ω
+R_S= V_S/I_D;// in Ω
+// Formul I_D= 1/2*KnWbyL*(V_OV)^2
+V_OV= sqrt(2*I_D/KnWbyL);// in V
+// Formula V_OV= V_GS-Vt
+V_GS= V_OV+Vt;// in V
+V_G= V_GS+V_S;// in V
+// Formul V_G= R_G2*V_DD/(R_G1+R_G2)
+R_G2= R_G1*V_G/(V_DD-V_G);//in Ω
+R_D= R_D*10^-3;// in kΩ
+R_S= R_S*10^-3;// in kΩ
+R_G2= R_G2*10^-6;// in MΩ
+disp(R_D,"The value of R_D in kΩ is : ")
+disp(R_S,"The value of R_S in kΩ is : ")
+disp(V_OV,"The value of V_OV in volts is : ")
+disp(V_GS,"The value of V_GS in volts is : ")
+disp(R_G2,"The value of R_G2 in MΩ is : ")
+
diff --git a/3515/CH2/EX2.11/Ex2_11.sce b/3515/CH2/EX2.11/Ex2_11.sce
new file mode 100644
index 000000000..ccb8f6e54
--- /dev/null
+++ b/3515/CH2/EX2.11/Ex2_11.sce
@@ -0,0 +1,43 @@
+// Exa 2.11
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+V_DD= 15;// in V
+KnWbyL= 0.25;// in mA/V^2
+KnWbyL=KnWbyL*10^-3;// in A/V^2
+Vt= 1.5;// in V
+V_A= 50;// in V
+R_D= 10;// in kΩ
+R_D= R_D*10^3;// in Ω
+R_L= 10;// in kΩ
+R_L= R_L*10^3;// in Ω
+R_G= 10;// in MΩ
+R_G= R_G*10^6;// in Ω
+// I_D= 1/2*KnWbyL*(V_D-Vt)^2 , (V_GS= V_D, as dc gate current is zero) (i)
+// V_D= V_DD- I_D*R_D (ii)
+I_D= 1.06;// in mA
+I_D = I_D*10^-3;// in A
+V_D= V_DD- I_D*R_D;// in V
+V_GS=V_D;// in V
+// The coordinates of operating point
+V_GSQ= V_D;// in V
+I_DQ= I_D*10^3;// in mA
+disp("The coordinates of operating points are V_GSQ = "+string(V_GSQ)+" V and I_DQ= "+string(I_DQ)+" mA")
+gm= KnWbyL*(V_GS-Vt);// in A/V
+r_o= V_A/I_D;//in Ω
+// The gain is : Av= vo/vi = -gm*(R_D||R_L||r_o)
+Av= -gm*[R_D*R_L*r_o/(R_D*R_L+R_D*r_o+R_L*r_o)];// in V/V
+// i_i= (vi-vo)/R_G
+// i_i= vi/R_G*(1-vo/vi) and Rin= vi/i_i = R_G/(1-Av)
+Rin= R_G/(1-Av);// in Ω
+Rin= Rin*10^-6;// in MΩ
+disp(Rin,"The input resistance in MΩ is : ")
+disp("The largest allowable input signal vi is determined by the need to keep the MOSFET in saturation at all times")
+disp(" V_DS >= V_GS- vt")
+disp("By enforcing this condition with equality at the point V_GS is maximum and V_DS is correspondingly minimum")
+disp(" V_DSmin= V_GSmax -Vt")
+disp(" V_DS-|Av| vi = V_GS + vi -Vt")
+disp(" 4.4 - 3.3 vi = 4.4 + vi -1.5")
+disp("which results in vi= 0.34V")
diff --git a/3515/CH2/EX2.12/Ex2_12.sce b/3515/CH2/EX2.12/Ex2_12.sce
new file mode 100644
index 000000000..fed6af751
--- /dev/null
+++ b/3515/CH2/EX2.12/Ex2_12.sce
@@ -0,0 +1,22 @@
+// Exa 2.12
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+I_D= 0.5;// in mA
+I_D= I_D*10^-3;// in mA
+V_D= 3;// in V
+Vt= -1;// in V
+KpWbyL= 1;// in mA/V^2
+KpWbyL=KpWbyL*10^-3;// in A/V^2
+// Formul I_D= 1/2*KpWbyL*(V_OV)^2
+V_OV= sqrt(2*I_D/KpWbyL);// in V
+// For PMOS
+V_OV= -V_OV;// in V
+V_GS= V_OV+Vt;// in V
+R_D= V_D/I_D;// in Ω
+V_Dmax= V_D+abs(Vt);// in V
+R_D= V_Dmax/I_D;// in Ω
+R_D= R_D*10^-3;// in kΩ
+disp(R_D,"The largest value that R_D can have while maintaining saturation-region operation in kΩ is : ")
diff --git a/3515/CH2/EX2.14/Ex2_14.sce b/3515/CH2/EX2.14/Ex2_14.sce
new file mode 100644
index 000000000..09845639e
--- /dev/null
+++ b/3515/CH2/EX2.14/Ex2_14.sce
@@ -0,0 +1,24 @@
+// Exa 2.14
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_GS1= 1.5;// in V
+Vt= 1;// in V
+r_DS1= 1;// in kΩ
+r_DS1= r_DS1*10^3;// in Ω
+r_DS2= 200;// in kΩ
+// r_DS1= 1/(KnWbyL*(V_GS1-Vt)) (i)
+// r_DS2= 1/(KnWbyL*(V_GS2-Vt)) (i)
+// dividing equation (i) by (ii)
+V_GS2= (r_DS1/r_DS2)*(V_GS1-Vt)+Vt;// in V
+disp(V_GS2,"To Optain rDS= 200, The value of V_GS should be (in volt)")
+// For V_GS= 1.5 ;// V
+// W2= 2*W1;
+// r_DS1/r_DS2= 2
+r_DS2= r_DS1/2;// in Ω
+disp(r_DS2,"For V_GS= 1.5 V , the value of r_DS2 in Ω is : ")
+// For V_GS= 3.5 V
+r_DS2= 200/2;// in Ω
+disp(r_DS2,"For V_GS= 3.5 V , the value of r_DS2 in Ω is : ")
diff --git a/3515/CH2/EX2.15/Ex2_15.sce b/3515/CH2/EX2.15/Ex2_15.sce
new file mode 100644
index 000000000..d8e6cfdcd
--- /dev/null
+++ b/3515/CH2/EX2.15/Ex2_15.sce
@@ -0,0 +1,22 @@
+// Exa 2.15
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+I_D= 0.2;// in mA
+I_D= I_D*10^-3;// in mA
+Vt= 1;// in V
+KpWbyL= 0.1;// in mA/V^2
+KpWbyL=KpWbyL*10^-3;// in A/V^2
+// Formul I_D= 1/2*KpWbyL*(V_GS-VT)^2
+V_GS= sqrt(2*I_D/KpWbyL)+Vt;// in V
+V_DSmin= V_GS-Vt;// in V
+disp(V_GS,"Required V_GS in volts is : ")
+disp(V_DSmin,"The minimum required V_DS in volts is : ")
+// For I_D= 0.8 mA
+I_D = 0.8*10^-3;// in A
+V_GS= sqrt(2*I_D/KpWbyL)+Vt;// in V
+V_DSmin= V_GS-Vt;// in V
+disp(V_GS,"Required V_GS in volts is : ")
+disp(V_DSmin,"The minimum required V_DS in volts is : ")
diff --git a/3515/CH2/EX2.16/Ex2_16.sce b/3515/CH2/EX2.16/Ex2_16.sce
new file mode 100644
index 000000000..62168d2c9
--- /dev/null
+++ b/3515/CH2/EX2.16/Ex2_16.sce
@@ -0,0 +1,28 @@
+// Exa 2.16
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_SS= -5;// in V
+unCox= 60;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+Vt= 1;// in V
+W= 100;// in µm
+L= 3;// in µm
+V_G=0;// in V
+V_DD= 5;// in V
+V_D=0;//in V
+I_D= 1*10^-3;// in A
+// I_D= (V_DD-V_D)/R_D
+R_D= (V_DD-V_D)/I_D;// in Ω
+R_D= R_D*10^-3;// in kΩ
+disp(R_D,"The value of R_D in kΩ is : ")
+// Formul I_D= 1/2*unCox*W/L*(V_GS-Vt)^2
+V_GS= sqrt(2*I_D*L/(unCox*W))+Vt;// in V
+V_S= V_G-V_GS;// in V
+R_S= (V_S-V_SS)/I_D;// in Ω
+R_S= R_S*10^-3;// in kΩ
+disp(R_S,"The resistance in kΩ is ");
+
+
diff --git a/3515/CH2/EX2.17/Ex2_17.sce b/3515/CH2/EX2.17/Ex2_17.sce
new file mode 100644
index 000000000..2e11262be
--- /dev/null
+++ b/3515/CH2/EX2.17/Ex2_17.sce
@@ -0,0 +1,21 @@
+// Exa 2.17
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+V_D= 3.5;// in V
+I_D= 115*10^-6;//in A
+upCox= 60;// in µA/V^2
+upCox= upCox*10^-6;// in A/V^2
+L= 0.8;//in µm
+V_GS= -1.5;// in V
+Vt= 0.7;// in V
+R= V_D/I_D;// in Ω
+R= R*10^-3;// in kΩ
+disp(R,"The value required for R in kΩ is : ")
+// Formul I_D= 1/2*upCox*W/L*(V_GS-Vt)^2
+W= 2*I_D*L/(upCox*(V_GS-Vt)^2)
+disp(W,"The value required for W in µm is : ")
+
+// Note: Calculation of evaluating the value of W in the book is wrong , so the Answer of the book is wrong
diff --git a/3515/CH2/EX2.18/Ex2_18.sce b/3515/CH2/EX2.18/Ex2_18.sce
new file mode 100644
index 000000000..055b49fed
--- /dev/null
+++ b/3515/CH2/EX2.18/Ex2_18.sce
@@ -0,0 +1,28 @@
+// Exa 2.18
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+Vt= 1;// in V
+unCox= 120;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+L1=1;// in µm
+L2=L1;// in µm
+I_D= 120;//in µA
+I_D= I_D*10^-6;//in A
+V_GS1= 1.5;//in V
+V_G2= 3.5;// in V
+V_S2= 1.5;// in V
+V_DD= 5;// in V
+V_D2= 3.5;// in V
+// Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)^2
+W1= 2*I_D*L1/(unCox*(V_GS1-Vt)^2);// in µm
+disp(W1,"The value of W1 in µm is : ")
+V_GS2= V_G2-V_S2;//in V
+// Formul I_D= 1/2*unCox*W/L*(V_GS1-Vt)^2
+W2= 2*I_D*L2/(unCox*(V_GS2-Vt)^2);// in µm
+disp(W2,"The value of W2 in µm is : ")
+R= (V_DD-V_D2)/I_D;// in Ω
+R= R*10^-3;// in kΩ
+disp(R,"Resistance in kΩ");
diff --git a/3515/CH2/EX2.19/Ex2_19.sce b/3515/CH2/EX2.19/Ex2_19.sce
new file mode 100644
index 000000000..4de42ea80
--- /dev/null
+++ b/3515/CH2/EX2.19/Ex2_19.sce
@@ -0,0 +1,44 @@
+// Exa 2.19
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+Vt= 2;// in V
+K1WbyL= 1;// in mA/V^2
+K1WbyL= K1WbyL*10^-3;//in mA/V^2
+I_D= 10;//in µA
+I_D= I_D*10^-6;//in A
+V_DD= 10;// in V
+R_D= 4;// in kΩ
+R_D= R_D*10^3;// in Ω
+
+// Formul I_D= 1/2*K1WbyL*(V_GS-Vt)^2
+V_GS= sqrt(2*I_D/K1WbyL)+Vt;// in V
+V1= -V_GS;// in V
+// Part (b)
+I_D= 2;// in mA
+I_D= I_D*10^-3;// in A
+V2= V_DD-I_D*R_D;//in V
+// Formul I_D= 1/2*K1WbyL*(V_GS-Vt)^2
+V_GS= sqrt(2*I_D/K1WbyL)+Vt;// in V
+V3= -V_GS;// in V
+// Part (c)
+I_D= 1;// in mA
+I_D= I_D*10^-3;// in A
+// Formul I_D= 1/2*K1WbyL*(V_GS-Vt)^2
+V_GS= sqrt(2*I_D/K1WbyL)+Vt;// in V
+V4= V_GS;// in V
+// Part (d)
+I_D= 2;// in mA
+R_D= 2.5;// in kΩ
+R_D= R_D*10^3;// in Ω
+V_SS= 10;// in V
+I_D= I_D*10^-3;// in A
+V_GS= sqrt(2*I_D/K1WbyL)+Vt;// in V
+V5= -V_SS+I_D*R_D;// in V
+disp(V1,"The value of V1 in volts is : ")
+disp(V2,"The value of V2 in volts is : ")
+disp(V3,"The value of V3 in volts is : ")
+disp(V4,"The value of V4 in volts is : ")
+disp(V5,"The value of V5 in volts is : ")
diff --git a/3515/CH2/EX2.2/Ex2_2.sce b/3515/CH2/EX2.2/Ex2_2.sce
new file mode 100644
index 000000000..340898a06
--- /dev/null
+++ b/3515/CH2/EX2.2/Ex2_2.sce
@@ -0,0 +1,40 @@
+// Exa 2.2
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+unCox= 100;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+L= 1;//in µm
+L= L*10^-6;// in m
+W=10;// in µm
+W=W*10^-6;// in m
+V_GS= 1.5;// in V
+Vt= 0.7;// in V
+// For V_DS= 0.5 V
+V_DS= 0.5;// in V
+if V_DS<= (V_GS-Vt) then
+ I_D= unCox*W/L*[(V_GS-Vt)*V_DS-V_DS^2/2];
+ I_D= I_D*10^6;// in µA
+ disp(I_D,"The device is in triode region. SO the drain current in the triode region in µA is : ")
+else
+ I_D= unCox*W/(2*L)*(V_GS-VT)^2;
+ I_D= I_D*10^6;// in µA
+ disp(I_D,"The device is in saturation region. SO the drain current in the saturation region in µA is : ")
+end
+// For V_DS= 0.9 V
+V_DS= 0.9;// in V
+if V_DS<= (V_GS-Vt) then
+ I_D= unCox*W/L*[(V_GS-Vt)*V_DS-V_DS^2/2];
+ I_D= I_D*10^6;// in µA
+ disp(I_D,"The device is in triode region. So the drain current in the triode region in µA is : ")
+else
+ I_D= unCox*W/(2*L)*(V_GS-Vt)^2
+ I_D= I_D*10^6;// in µA
+ disp(I_D,"The device is in saturation region. So drain current in the saturation region in µA is : ")
+end
+
+
+
+
diff --git a/3515/CH2/EX2.20/Ex2_20.sce b/3515/CH2/EX2.20/Ex2_20.sce
new file mode 100644
index 000000000..4aff13a79
--- /dev/null
+++ b/3515/CH2/EX2.20/Ex2_20.sce
@@ -0,0 +1,28 @@
+// Exa 2.20
+format('v',4);
+clc;
+clear;
+close;
+// Given data
+unCox= 20*10^-6;//in A/V^2
+upCox= unCox/2.5;// in A/V^2
+V_DD= 3;//in V
+Vt= 1;// in V
+W= 30;// in µm
+L= 10;// in µm
+// V_GS1= V_GS2
+// Formula V_DD= V_GS1+V_GS2
+V_GS1= V_DD/2;//in V
+V_GS2= V_GS1;// in V
+V2= V_GS1;// inV
+I1= 1/2*unCox*W/L*(V_GS1-Vt)^2;// in A
+// Both transistor have V_D = V_G and therefore they are operating in saturation
+//1/2*unCox*W/L*(V4-Vt)^2 = 1/2*upCox*W/L*(V_DD-V4-Vt)
+V4= (V_DD-Vt+sqrt(unCox/upCox))/(1+sqrt(unCox/upCox));
+I3= 1/2*unCox*W/L*(1.39-Vt)^2
+disp(V2,"The value of V2 in volt is : ")
+I1= I1*10^6;// in µA
+disp(I1,"The value of I1 in µAis : ")
+disp(V4,"The value of V4 in volt is : ")
+I3= I3*10^6;// in µA
+disp(I3,"The value of I3 in µAis : ")
diff --git a/3515/CH2/EX2.22/Ex2_22.sce b/3515/CH2/EX2.22/Ex2_22.sce
new file mode 100644
index 000000000..6c0a51a49
--- /dev/null
+++ b/3515/CH2/EX2.22/Ex2_22.sce
@@ -0,0 +1,57 @@
+// Exa 2.22
+format('v',4);
+clc;
+clear;
+close;
+// Given data
+Vt= 0.9;// in V
+V_A= 50;// in V
+V_D= 2;// in V
+R_L= 10;// in MΩ
+R_L= R_L*10^3;// in Ω
+R_G= 10;// in MΩ
+R_G= R_G*10^6;// in Ω
+I_D= 500;// in µA
+I_D= I_D*10^-6;// in A
+V_GS= V_D;// in V
+ro= V_A/I_D;// in Ω
+gm= 2*I_D/(V_GS-Vt);// in A/V
+// vo= -gm*vi*(ro || R_L)
+vo_by_vi = -gm*(ro*R_L/(ro+R_L));// in V/V
+disp(vo_by_vi ,"The voltage gain in V/V is : ")
+// For I= 1 mA or twice the current
+I_D1= I_D;// in A
+I_D2= 2*I_D1;// in A
+gm1= gm;// in A/V
+// Effect on V_D
+// I_D1/I_D2 = (V_GS1-Vt)^2/(V_GS2-Vt)^2
+V_GS1= V_GS;
+V_GS2= Vt+sqrt(2)*(V_GS1-Vt);// in V
+disp(V_GS2,"The new value of V_GS in volts is : ")
+// Effect on gm
+// gm1/gm2= sqrt(I_D1/I_D2)
+gm2= sqrt(I_D2/I_D1)*gm1;// in A/V
+gm2= gm2*10^3;// in mA/V
+disp(gm2,"The new value of gm2 in mA/V is : ")
+// Effect on ro
+// ro1/ro2= I_D2/I_D1
+ro1= ro;// in Ω
+ro2= I_D1*ro1/I_D2;// in Ω
+ro2= ro2*10^-3;// in kΩ
+disp(ro2,"The new value of ro in kΩ/V is : ")
+ro2= ro2*10^3;// in Ω
+// Effect on gain
+// Av= -gm*(ro2 || R_L)
+Av= -gm*(ro2*R_L/(ro2+R_L));// in V/V
+disp(Av,"The new value of voltage gain in V/V is : ")
+
+// Note: There is some difference between the new value of voltage gain in book and coding. The reason behind this is that ,
+// the accurate value of new value of gm is 1.2856487 and in the book 1.3 has taken at place of 1.2856487.
+// If we take this value of new value of gm 1.3 at place of 1.2856487 then our new voltage gain value will be same as in the book
+
+
+
+
+
+
+
diff --git a/3515/CH2/EX2.23/Ex2_23.sce b/3515/CH2/EX2.23/Ex2_23.sce
new file mode 100644
index 000000000..de2f2b396
--- /dev/null
+++ b/3515/CH2/EX2.23/Ex2_23.sce
@@ -0,0 +1,21 @@
+// Exa 2.23
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+I_D= 1;// in mA
+I_D= I_D*10^-3;// in A
+gm= 1;//in mA/V
+gm= gm*10^-3;//in A/V
+f_L= 10;// in Hz
+R_S= 6;// in kΩ
+R_S= R_S*10^3;// in Ω
+R_D= 10;// in kΩ
+R_D= R_D*10^3;// in Ω
+vo_by_vi= -gm*R_D/(1+gm*R_S);// in V/V
+disp(vo_by_vi,"Mid band gain in V/V is : ");
+// Formula f_L= 1/(2*%pi*(1/gm || R_S)) * CS
+CS= 1/(2*%pi*(1/gm*R_S/(1/gm+R_S))*f_L) ;//in F
+CS= CS*10^6;// in µF
+disp(CS,"The value of Cs in µF is : ")
diff --git a/3515/CH2/EX2.24/Ex2_24.sce b/3515/CH2/EX2.24/Ex2_24.sce
new file mode 100644
index 000000000..b462e93a3
--- /dev/null
+++ b/3515/CH2/EX2.24/Ex2_24.sce
@@ -0,0 +1,31 @@
+// Exa 2.24
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+Rsig= 100;// in kΩ
+Rsig= Rsig*10^3;// in Ω
+R_G= 4.7;// in MΩ
+R_G= R_G*10^6;// in Ω
+R_D= 15;// in kΩ
+R_D= R_D*10^3;// in Ω
+R_L= R_D;// in Ω
+gm= 1;//in mA/V
+gm= gm*10^-3;//in A/V
+ro=150;// in kΩ
+ro=ro*10^3;// in Ω
+Cgs= 1;// in pF
+Cgs=Cgs*10^-12;//in F
+Cgd= 0.4;// in pF
+Cgd=Cgd*10^-12;//in F
+vgsBYvsig= R_G/(Rsig+R_G);
+Rdesh_L= R_D*R_L/(R_D+R_L);// in Ω
+voBYvgs= -gm*Rdesh_L;
+Av= voBYvgs/vgsBYvsig;// in V/V
+disp(Av,"The Mid-band gain in V/V is :")
+CM= Cgd*(1+gm*Rdesh_L);// in F
+// f_H= 1/(2*%pi*(Rsig || R_G)*(Cgs*CM))
+f_H= 1/(2*%pi*(Rsig * R_G/(Rsig + R_G))*(Cgs+CM));// in Hz
+f_H= f_H*10^-3;// in kHz
+disp(f_H,"Frequency in kHz is : ")
diff --git a/3515/CH2/EX2.3/Ex2_3.sce b/3515/CH2/EX2.3/Ex2_3.sce
new file mode 100644
index 000000000..c19db7204
--- /dev/null
+++ b/3515/CH2/EX2.3/Ex2_3.sce
@@ -0,0 +1,25 @@
+// Exa 2.3
+format('v',6);
+clc;
+clear;
+close;
+// Given data
+Vt= 0.7;// in V
+I_D= 100;// in µA
+I_D=I_D*10^-6;// in A
+// When
+V_GS= 1.2;// in V
+V_DS= V_GS;// in V
+// At this condition, device is in saturation region, so I_D= unCox*W/(2*L)*(V_GS-VT)^2
+unCoxWby2L= I_D/(V_GS-Vt)^2;
+// For
+V_DS= 3;// in V
+V_GS= 1.5;// in V
+// In this condition, device is in saturation region, so
+I_D= unCoxWby2L*(V_GS-Vt)^2;// in A
+I_D= I_D*10^6;// in µA
+disp(I_D,"For V_DS= 3V and V_GS= 1.5 V, The value of I_D in µA is : ")
+// For
+V_GS= 3.2;// in V
+r_DS= 1/(2*unCoxWby2L*(V_GS-Vt));// in Ω
+disp(r_DS,"For V_GS = 3.2 V, Drain to source resistance in Ω is : ")
diff --git a/3515/CH2/EX2.4/Ex2_4.sce b/3515/CH2/EX2.4/Ex2_4.sce
new file mode 100644
index 000000000..f53ef6ee6
--- /dev/null
+++ b/3515/CH2/EX2.4/Ex2_4.sce
@@ -0,0 +1,30 @@
+// Exa 2.4
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+I_D= 0.4;// in mA
+I_D=I_D*10^-3;// in A
+Vt= 0.7;// in V
+V_SS= -2.5;// in V
+V_DD= 2.5;// in V
+unCox= 100;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+W= 32;// in m
+L= 1;// in m
+// V_GS-Vt= V_OV
+// I_D= unCox*W/(2*L)*(V_OV)^2
+V_OV= sqrt(I_D/(unCox*W/(2*L)));// in V
+V_GS= V_OV+Vt;// in V
+disp(V_GS,"The value of V_GS in volt is : ")
+V_G= 0;
+// Formula V_GS= V_G-V_S
+V_S= V_G-V_GS;// in V
+R_S= (V_S-V_SS)/I_D// in Ω
+R_S= R_S*10^-3;// in kΩ
+disp(R_S,"The value of R_S in kΩ is : ")
+V_D= 0.5;// in V
+R_D= (V_DD-V_D)/I_D;//in Ω
+R_D= R_D*10^-3;// in kΩ
+disp(R_D,"The value of R_D in kΩ is : ")
diff --git a/3515/CH2/EX2.5/Ex2_5.sce b/3515/CH2/EX2.5/Ex2_5.sce
new file mode 100644
index 000000000..19e512b5e
--- /dev/null
+++ b/3515/CH2/EX2.5/Ex2_5.sce
@@ -0,0 +1,25 @@
+// Exa 2.5
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_DD= 3;// in V
+I_D= 80;// in µA
+I_D=I_D*10^-6;// in A
+Vt= 0.6;// in V
+unCox= 200;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+L= 0.8;//in µm
+L= L*10^-6;// in m
+W=4;// in µm
+W=W*10^-6;// in m
+// V_GS-Vt= V_OV
+// I_D= unCox*W/(2*L)*(V_OV)^2
+V_OV= sqrt(I_D/(unCox*W/(2*L)));// in V
+V_GS= V_OV+Vt;// in V
+V_D= 1;// in V
+V_G= V_D;// in V
+R= (V_DD-V_D)/I_D;// in Ω
+R= R*10^-3;// in kΩ
+disp(R,"The value of R in kΩ is : ")
diff --git a/3515/CH2/EX2.6/Ex2_6.sce b/3515/CH2/EX2.6/Ex2_6.sce
new file mode 100644
index 000000000..49c817e05
--- /dev/null
+++ b/3515/CH2/EX2.6/Ex2_6.sce
@@ -0,0 +1,24 @@
+// Exa 2.6
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+V_DD= 10;// in V
+I_D= 0.4;// in mA
+I_D=I_D*10^-3;// in A
+Vt= 2;// in V
+unCox= 20;// in µA/V^2
+unCox= unCox*10^-6;// in A/V^2
+L= 10;//in µm
+L= L*10^-6;// in m
+W=100;// in µm
+W=W*10^-6;// in m
+V_S= 0;// in V as source is connected to ground
+// I_D= unCox*W/(2*L)*(V_OV)^2
+V_OV= sqrt(I_D/(unCox*W/(2*L)));// in V
+V_GS= V_OV+Vt;// in V
+V_D= V_GS;// in V
+R= (V_DD-V_D)/I_D;// in Ω
+R= R*10^-3;// in kΩ
+disp(R,"The value of R in kΩ is : ")
diff --git a/3515/CH2/EX2.7/Ex2_7.sce b/3515/CH2/EX2.7/Ex2_7.sce
new file mode 100644
index 000000000..28681c05e
--- /dev/null
+++ b/3515/CH2/EX2.7/Ex2_7.sce
@@ -0,0 +1,18 @@
+// Exa 2.7
+format('v',5);
+clc;
+clear;
+close;
+// Given data
+KnWbyL= 1;// in mA
+KnWbyL=KnWbyL*10^-3;// in A
+Vt= 1;// in V
+V_DS= 0.1;// in V
+V_D= V_DS;// in V
+V_GS= 5;// in V
+V_DD= V_GS;// in V
+// Formula I_D= K'nW/L*[(V_GS-Vt)*V_DS-V_DS^2/2]
+I_D= KnWbyL*[(V_GS-Vt)*V_DS-V_DS^2/2];// in A
+R_D= (V_DD-V_D)/I_D;//in Ω
+R_D= R_D*10^-3;// in kΩ
+disp(R_D,"The required value of R_D in kΩ is : ")
diff --git a/3515/CH2/EX2.8/Ex2_8.sce b/3515/CH2/EX2.8/Ex2_8.sce
new file mode 100644
index 000000000..c33d9420c
--- /dev/null
+++ b/3515/CH2/EX2.8/Ex2_8.sce
@@ -0,0 +1,37 @@
+// Exa 2.8
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+KnWbyL= 1;// in mA/V^2
+KnWbyL=KnWbyL*10^-3;// in A/V^2
+Vt= 1;// in V
+V_DD= 10;// in V
+R_D= 6;// in kΩ
+R_D= R_D*10^3;// in Ω
+R_S= 6;// in kΩ
+R_S= R_S*10^3;// in Ω
+R_G1= 10;// in MΩ
+R_G1= R_G1*10^6;// in Ω
+R_G2= 10;// in MΩ
+R_G2= R_G2*10^6;// in Ω
+V_G= V_DD*R_G2/(R_G1+R_G2);// in V
+// V_S= R_S*I_D
+// V_GS= V_G-V_S= V_G-R_S*I_D
+// Formula I_D= K'nW/2*L*(V_GS-Vt)^2, Putting the value of V_GS, We get
+// 18*I_D^2 -25*I_D +8= 0
+// I_D= 0.89 mA or I_D= 0.5
+I_D= 0.5;// in mA
+I_D=I_D*10^-3;// in A
+V_S= R_S*I_D;// in V
+V_GS= V_G-V_S;// in V
+V_D= V_DD-I_D*R_D;// in V
+I_D= I_D*10^3;// in mA
+disp(I_D,"The value of I_D in mA is : ")
+disp(V_S,"The value of V_S in volt is : ")
+disp(V_GS,"The value of V_GS in volt is : ")
+disp(V_D,"The value of V_D in volt is : ")
+disp("Since V_D > V_G - Vt , the transistor is operating in saturation , as initially assumed")
+
+
diff --git a/3515/CH2/EX2.9/Ex2_9.sce b/3515/CH2/EX2.9/Ex2_9.sce
new file mode 100644
index 000000000..17c757cd4
--- /dev/null
+++ b/3515/CH2/EX2.9/Ex2_9.sce
@@ -0,0 +1,27 @@
+// Exa 2.9
+format('v',7);
+clc;
+clear;
+close;
+// Given data
+R_D= 20;// in kΩ
+R_D= R_D*10^3;// in Ω
+R1= 30;// in kΩ
+R1= R1*10^3;// in Ω
+R2= 20;// in kΩ
+R2= R2*10^3;// in Ω
+V_DD= 5;// in V
+Vtn= 1;// in V
+Kn= 0.1;// in mA/V^2
+Kn=Kn*10^-3;// in A/V^2
+V_GS= R2*V_DD/(R1+R2);// in V
+// I_D= 1/2*µnCox*W/L*(V_GS-Vtm)^2
+I_D = Kn*(V_GS-Vtn)^2 ;// in mA (As Kn= 1/2*µnCox*W/L)
+V_DS= V_DD-I_D*R_D;// in V
+I_D= I_D*10^3;// in mA
+disp(V_GS,"The value of V_GS in volt is : ")
+disp(I_D,"The value of I_D in mA is : ")
+disp(V_DS,"The value of V_DS in volt is : ")
+disp("Since V_DS = 3V > V_DS(sat) = V_GS-Vtn = 2 - 1V, the transistor is indeed biased in the saturation region")
+
+