summaryrefslogtreecommitdiff
path: root/68
diff options
context:
space:
mode:
Diffstat (limited to '68')
-rwxr-xr-x68/CH1/EX1.1/ex1.sce25
-rwxr-xr-x68/CH1/EX1.2/ex2.sce13
-rwxr-xr-x68/CH1/EX1.3/ex3.sce17
-rwxr-xr-x68/CH1/EX1.4/ex4.sce20
-rwxr-xr-x68/CH1/EX1.5/ex5.sce17
-rwxr-xr-x68/CH1/EX1.6/ex6.sce12
-rwxr-xr-x68/CH10/EX10.1/ex1.sce29
-rwxr-xr-x68/CH10/EX10.2/ex2.sce15
-rwxr-xr-x68/CH10/EX10.3/ex3.sce44
-rwxr-xr-x68/CH10/EX10.4/ex4.sce47
-rwxr-xr-x68/CH11/EX11.1/ex1.sce29
-rwxr-xr-x68/CH11/EX11.2/ex2.sce25
-rwxr-xr-x68/CH11/EX11.3/ex3.sce19
-rwxr-xr-x68/CH12/EX12.4/ex4.sce15
-rwxr-xr-x68/CH14/EX14.1/ex1.sce17
-rwxr-xr-x68/CH14/EX14.2/ex2.sce26
-rwxr-xr-x68/CH14/EX14.3/ex3.sce17
-rwxr-xr-x68/CH14/EX14.4/ex4.sce20
-rwxr-xr-x68/CH14/EX14.5/ex5.sce22
-rwxr-xr-x68/CH2/EX2.1/ex1.sce40
-rwxr-xr-x68/CH2/EX2.3/ex3.sce5
-rwxr-xr-x68/CH3/EX3.1/ex1.sce6
-rwxr-xr-x68/CH3/EX3.2/ex2.sce16
-rwxr-xr-x68/CH3/EX3.3/ex3.sce12
-rwxr-xr-x68/CH3/EX3.4/ex4.sce13
-rwxr-xr-x68/CH3/EX3.5/ex5.sce9
-rwxr-xr-x68/CH3/EX3.6/ex6.sce11
-rwxr-xr-x68/CH3/EX3.7/ex7.sce14
-rwxr-xr-x68/CH3/EX3.8/ex8.sce44
-rwxr-xr-x68/CH3/EX3.9/ex9.sce14
-rwxr-xr-x68/CH4/EX4.1/ex1.sce28
-rwxr-xr-x68/CH4/EX4.10/ex10.sce20
-rwxr-xr-x68/CH4/EX4.11/ex4_11.sce33
-rwxr-xr-x68/CH4/EX4.12/ex4_12.sce16
-rwxr-xr-x68/CH4/EX4.13/ex4_13.sce16
-rwxr-xr-x68/CH4/EX4.2/ex2.sce19
-rwxr-xr-x68/CH4/EX4.3/ex3.sce15
-rwxr-xr-x68/CH4/EX4.4/ex4.sce14
-rwxr-xr-x68/CH4/EX4.5/ex5.sce21
-rwxr-xr-x68/CH4/EX4.6/ex6.sce13
-rwxr-xr-x68/CH4/EX4.7/ex4_7.sce24
-rwxr-xr-x68/CH4/EX4.9/ex4_9.sce21
-rwxr-xr-x68/CH5/EX5.1/ex1.sce22
-rwxr-xr-x68/CH5/EX5.10/ex10.sce25
-rwxr-xr-x68/CH5/EX5.11/ex11.sce35
-rwxr-xr-x68/CH5/EX5.13/ex13.sce21
-rwxr-xr-x68/CH5/EX5.14/ex14.sce28
-rwxr-xr-x68/CH5/EX5.17/ex17.sce35
-rwxr-xr-x68/CH5/EX5.18/ex18.sce29
-rwxr-xr-x68/CH5/EX5.19/ex19.sce21
-rwxr-xr-x68/CH5/EX5.2/ex2.sce35
-rwxr-xr-x68/CH5/EX5.3/ex3.sce13
-rwxr-xr-x68/CH5/EX5.4/ex4.sce18
-rwxr-xr-x68/CH5/EX5.5/ex5.sce27
-rwxr-xr-x68/CH5/EX5.7/ex7.sce17
-rwxr-xr-x68/CH5/EX5.8/ex8.sce16
-rwxr-xr-x68/CH5/EX5.9/ex9.sce24
-rwxr-xr-x68/CH6/EX6.1/ex1.sce18
-rwxr-xr-x68/CH6/EX6.10/ex10.sce29
-rwxr-xr-x68/CH6/EX6.11/ex11.sce29
-rwxr-xr-x68/CH6/EX6.12/ex12.sce84
-rwxr-xr-x68/CH6/EX6.13/ex13.sce57
-rwxr-xr-x68/CH6/EX6.14/ex14.sce15
-rwxr-xr-x68/CH6/EX6.2/ex2.sce27
-rwxr-xr-x68/CH6/EX6.3/ex3.sce128
-rwxr-xr-x68/CH6/EX6.4/ex4.sce21
-rwxr-xr-x68/CH6/EX6.5/ex5.sce5
-rwxr-xr-x68/CH6/EX6.6/ex6.sce17
-rwxr-xr-x68/CH6/EX6.7/ex7.sce18
-rwxr-xr-x68/CH6/EX6.8/ex8.sce35
-rwxr-xr-x68/CH6/EX6.9/ex9.sce54
-rwxr-xr-x68/CH7/EX7.1/ex1.sce38
-rwxr-xr-x68/CH7/EX7.2/ex2.sce57
-rwxr-xr-x68/CH7/EX7.3/ex3.sce134
-rwxr-xr-x68/CH7/EX7.5/ex5.sce41
-rwxr-xr-x68/CH8/EX8.1/ex1.sce23
-rwxr-xr-x68/CH8/EX8.2/ex2.sce42
-rwxr-xr-x68/CH8/EX8.3/ex3.sce21
-rwxr-xr-x68/CH8/EX8.4/ex4.sce29
-rwxr-xr-x68/CH9/EX9.1/ex1.sce54
-rwxr-xr-x68/CH9/EX9.2/ex2.sce145
-rwxr-xr-x68/CH9/EX9.3/ex3.sce9
82 files changed, 2349 insertions, 0 deletions
diff --git a/68/CH1/EX1.1/ex1.sce b/68/CH1/EX1.1/ex1.sce
new file mode 100755
index 000000000..8d243ee34
--- /dev/null
+++ b/68/CH1/EX1.1/ex1.sce
@@ -0,0 +1,25 @@
+// Example1.1: Amplifier gain, power and eficiency
+// Amplifier operates at +10-V/-10-V power supply.
+A_v=9/1; // sinusoidal voltage input of 1V peak and sinusoidal output voltage of 9V peak
+I_o=9/1000; // 1 kilo ohms load
+disp(A_v,"Voltage gain (V/V) =")
+disp(20*log10(A_v),"Voltage gain (dB) =")
+I_i=0.0001 // sinusoidal current input of 0.1mA peak
+A_i=I_o/I_i;
+disp(A_i,"Current gain (A/A) =")
+disp(20*log10(A_i),"Current gain (dB) =")
+V_orms = 9/sqrt(2);
+I_orms = 9/sqrt(2);
+P_L=V_orms*I_orms; // output power in mW
+V_irms=1/sqrt(2);
+I_irms=0.1/sqrt(2);
+P_I=V_irms*I_irms; // input power in mW
+A_p=P_L/P_I;
+disp(A_p,"Power gain (W/W) =")
+disp(10*log10(A_p),"Power gain (dB) =")
+P_dc=10*9.5+10*9.5; // amplifier draws a current of 9.5mA from each of its two power supplies
+disp(P_dc,"Power drawn from the dc supplies (mW) =")
+P_dissipated=P_dc+P_I-P_L;
+disp(P_dissipated,"Power dissipated in the amplifier (mW)")
+n=P_L/P_dc*100;
+disp(n,"Amplifier efficiency in percentage") \ No newline at end of file
diff --git a/68/CH1/EX1.2/ex2.sce b/68/CH1/EX1.2/ex2.sce
new file mode 100755
index 000000000..87f07b3c6
--- /dev/null
+++ b/68/CH1/EX1.2/ex2.sce
@@ -0,0 +1,13 @@
+// Example 1.2: Gain of transistor amplifier
+// Amplifier has transfer characteristics v_O=10-(10^-11)*(exp^40*v_1) applies for v_1 is greater than or equal 0V and v_o is greater than or equal to 0.3V
+L_l = 0.3; // limit L_-
+disp(L_l,"The limit L_- (V) =")
+v_I=1/40*log((10-0.3)/10^-11); // from the transfer characteristics and v_o=0.3V
+disp(v_I,"v_I in volts =")
+L_u=10-10^-11; // obtained by v_I=0 in transfer characteristics
+disp(L_u,"the limit L_+ (V) =")
+V_I=1/40*log((10-5)/10^-11); // V_O=5V
+disp(V_I,"The value of the dc bias voltage that results in V_O=5V (V)=")
+A_v=-10^-11*exp(40*V_I)*40; // A_v=dv_O/dv_I
+disp(A_v,"Gain at the operating point (V/V) =")
+disp("NOTE the gain is negative that implies the amplifier is an inverting amplifier")
diff --git a/68/CH1/EX1.3/ex3.sce b/68/CH1/EX1.3/ex3.sce
new file mode 100755
index 000000000..d4cd1d46a
--- /dev/null
+++ b/68/CH1/EX1.3/ex3.sce
@@ -0,0 +1,17 @@
+// Example 1.3 : Overall voltage gain of cthree-stage amplifier
+gainloss_in=10^6/(1*10^6+100*10^3); // fraction of input signal is obtained using voltage divider rule , gainloss_in= v_i1/v_s
+A_v1=10*100000/(100000+1000); // A_v1 = v_i2/v_i1 is the voltage gain at first stage
+A_v2=100*10000/(10000+1000); // A_v2 = v_i3/v_i2 is the voltage gain at second stage
+A_v3=100/(100+10); // A_v3 = v_L/v_i3 is the voltage gain at the output stage
+A_v=A_v1*A_v2*A_v3; // A_v is the total voltage gain
+disp(A_v,"The overall voltage gain (V/V) =")
+disp(20*log10(A_v),"The overall voltage gain (dB) =")
+gain_src_ld=A_v*gainloss_in;
+disp(gain_src_ld,"The voltage gain from source to gain (V/V) =")
+disp(20*log10(gain_src_ld),"The voltage gain from source to load (dB) =")
+A_i=10^4*A_v; // A_i=i_o/i_i=(v_L/100)/(v_i1/10^6)
+disp(A_i,"The current gain (A/A)=")
+disp(20*log10(A_i),"The current gain (dB) =")
+A_p=818*818*10^4; // A_p=P_L/P_I=v_L*i_o/v_i1*i_i
+disp(A_p,"The power gain (W/W) =")
+disp(10*log10(A_p),"The power gain (dB) =") \ No newline at end of file
diff --git a/68/CH1/EX1.4/ex4.sce b/68/CH1/EX1.4/ex4.sce
new file mode 100755
index 000000000..af74e925d
--- /dev/null
+++ b/68/CH1/EX1.4/ex4.sce
@@ -0,0 +1,20 @@
+// Example1.4 : Bipolar junction transistor
+
+// 1,4a
+// using voltage divider rule the fraction of input signal v_be=v_s*r_pi/(r_pi+R_s)
+// output voltage v_o=-g_mv_be(R_L||r_o)
+r_pi=2.5*10^3; // (ohm)
+R_s=5*10^3; // (ohm)
+R_L=5*10^3 // (ohm)
+g_m=40*10^-3; // (mho)
+r_o=100*10^3; // (ohm)
+gain=-(r_pi*g_m*(R_L*r_o/(R_L+r_o)))/(r_pi+R_s); // gain=v_o/v_s
+disp(gain,"The voltage gain (V/V) =")
+gain_negl_r_o=-r_pi*g_m*R_L/(r_pi+R_s);
+disp(gain_negl_r_o,"Gain neglecting the effect of r_o (V/V) =")
+
+// 1.4b
+// Bi_b=g_m*v_be
+// B is short circuit gain
+B=g_m*r_pi;
+disp(B,"The short circuit gain (A/A) =") \ No newline at end of file
diff --git a/68/CH1/EX1.5/ex5.sce b/68/CH1/EX1.5/ex5.sce
new file mode 100755
index 000000000..81db740be
--- /dev/null
+++ b/68/CH1/EX1.5/ex5.sce
@@ -0,0 +1,17 @@
+// Example 1.5 : DC gain, 3dB frequency and frequency at which gain=0 of voltage amplifier
+
+// 1.5b
+R_s =20*10^3; // (ohm)
+R_i =100*10^3; // (ohm)
+C_i =60*10^-12; // (ohm)
+u = 144; // (V/V)
+R_o = 200; // (ohm)
+R_L = 1000; // (ohm)
+K=u/((1+R_s/R_i)*(1+R_o/R_L));
+disp(K,"The dc gain (V/V)= ")
+disp(20*log10(K)," The dc gain (dB) =")
+w_o=1/(C_i*R_s*R_i/(R_s+R_i));
+disp(w_o,"The 3-dB frequency (rad/s) =")
+f_o= w_o/2/%pi;
+disp(f_o,"Frequency (Hz) =")
+disp(100*w_o,"unity gain frequency (rad/s)=",100*f_o,"Unity gain frequency (Hz)") \ No newline at end of file
diff --git a/68/CH1/EX1.6/ex6.sce b/68/CH1/EX1.6/ex6.sce
new file mode 100755
index 000000000..5531487b0
--- /dev/null
+++ b/68/CH1/EX1.6/ex6.sce
@@ -0,0 +1,12 @@
+// Example 1.6: Time for the output to reach (V_OH+V_OL)/2
+V_DD=5; // (V)
+R=1000; // (ohm)
+R_on=100; // (ohm)
+V_offset=0.1; // (V)
+C=10*10^-12; // (F)
+V_OH=5; // (V)
+V_OL=V_offset+(V_DD-V_offset)*R_on/(R+R_on);
+T=R*C;
+v_o_t_PLH=(V_OH+V_OL)/2; //to find t_PLH
+t_PLH=0.69*T;// t_PLH is low to high propogtion delay
+disp(t_PLH,"time required for he output to reach (V_OH+V_OL)/2 (seconds) =") \ No newline at end of file
diff --git a/68/CH10/EX10.1/ex1.sce b/68/CH10/EX10.1/ex1.sce
new file mode 100755
index 000000000..4dbb60c5c
--- /dev/null
+++ b/68/CH10/EX10.1/ex1.sce
@@ -0,0 +1,29 @@
+// Example 10.1 : To determine t_PHL, t_PLH and t_P
+// Consider CMOS inverter
+C_ox=6*10^-15; // (F/um^2)
+uC_n=115*10^-6; //uC_n=u_n*C_ox (A/V^2)
+uC_p=30*10^-6; //uC_p=u_p*C_ox (A/V^2)
+V_tn=0.4; // (V)
+V_tp=-0.4; // (V)
+V_DD=2.5; // (V)
+W_n=0.375*10^-6; // W for Q_N
+L_n=0.25*10^-6; // L for Q_N
+W_p=1.125*10^-6; // W for Q_P
+L_p=0.25*10^-6; // L for Q_P
+C_gd1=0.3*W_n*10^-9; // (F)
+C_gd2=0.3*W_p*10^-9; // (F)
+C_db1=10^-15; // (F)
+C_db2=10^-15; // (F)
+C_g3= 0.375*0.25*6*10^-15+2*0.3*0.375*10^-15; // (F)
+C_g4=1.125*0.25*6*10^-15+2*0.3*1.125*10^-15; // (F)
+C_w=0.2*10^-15; // (F)
+C=2*C_gd1+2*C_gd2+C_db1+C_db2+C_g3+C_g4+C_w; // (F)
+i_DN0=uC_n*W_n*(V_DD-V_tn)^2/(2*L_n); // i_DN0 = i_DN(0) (A)
+i_DNtPHL=uC_n*W_n*((V_DD-V_tn)*V_DD/2-((V_DD/2)^2)/2)/L_n; // i_DNtPHL = i_DN(t_PHL) (A)
+i_DNav=(i_DN0+i_DNtPHL)/2; // i_DN|av (A)
+t_PHL=C*(V_DD/2)/i_DNav;
+disp(t_PHL,"t_PHL (s)")
+t_PLH=1.3*t_PHL; // Since W_p/W_n=3 and u_n/u_p=3.83 thus t_PLH is greater than t_PHL by 3.83/3
+disp(t_PLH,"t_PLH (s)")
+t_P=(t_PHL+t_PLH)/2;
+disp(t_P,"t_P (s)") \ No newline at end of file
diff --git a/68/CH10/EX10.2/ex2.sce b/68/CH10/EX10.2/ex2.sce
new file mode 100755
index 000000000..21340b2fc
--- /dev/null
+++ b/68/CH10/EX10.2/ex2.sce
@@ -0,0 +1,15 @@
+// Example 10.2 : W/L ratios for the logic circuit
+//For basic inverter
+n=1.5;
+p=5;
+L=0.25*10^-6; // (m)
+WbyL=2*n; // W/L for Q_NB , Q_NC , Q_ND
+disp(WbyL,"W/L ratio for Q_NB")
+disp(WbyL,"W/L ratio for Q_NC")
+disp(WbyL,"W/L ratio for Q_ND")
+WbyL=n; // W/L ratio for Q_NA
+disp(WbyL,"W/L ratio for Q_NA")
+WbyL=3*p; // W/L for Q_PA, Q_PC , Q_PD
+disp(WbyL,"W/L ratio for Q_PA")
+disp(WbyL,"W/L ratio for Q_PC")
+disp(WbyL,"W/L ratio for Q_PD") \ No newline at end of file
diff --git a/68/CH10/EX10.3/ex3.sce b/68/CH10/EX10.3/ex3.sce
new file mode 100755
index 000000000..fb94ebc10
--- /dev/null
+++ b/68/CH10/EX10.3/ex3.sce
@@ -0,0 +1,44 @@
+// Example 10.3 : To determine the parameters of pseudo NMOS inverter
+// Consider a pseudo NMOS inverter
+uC_n=115*10^-6; //uC_n=u_n*C_ox (A/V^2)
+uC_p=30*10^-6; //uC_p=u_p*C_ox (A/V^2)
+V_tn=0.4; // (V)
+V_tp=-0.4; // (V)
+V_DD=2.5; // (V)
+W_n=0.375*10^-6; // W for Q_N (m)
+L_n=0.25*10^-6; // L for Q_N (m)
+r=9;
+
+// 10.3a
+V_OH=V_DD;
+disp(V_OH,"V_OH (V)")
+V_OL=(V_DD-V_tn)*(1-sqrt(1-1/r));
+disp(V_OL,"V_OL (V)")
+V_IL=V_tn+(V_DD-V_tn)/sqrt(r*(r+1));
+disp(V_IL,"V_IL (V)")
+V_IH=V_tn+2*(V_DD-V_tn)/(sqrt(3*r));
+disp(V_IH,"V_IH (V)")
+V_M=V_tn+(V_DD-V_tn)/sqrt(r+1);
+disp(V_M,"V_M (V)")
+NM_H=V_OH-V_IH;
+NM_L=V_IL-V_OL;
+disp(NM_L,NM_H,"The highest and the lowest values of allowable noise margin (V)")
+
+// 10.3b
+WbyL_p=uC_n*(W_n/L_n)/(uC_p*r); // WbyL_p=(W/L)_p
+disp(WbyL_p,"(W/L)_p")
+
+//10.3c
+I_stat=(uC_p*WbyL_p*(V_DD-V_tn)^2)/2;
+disp(I_stat,"I_stat (A)")
+P_D=I_stat*V_DD;
+disp(P_D,"Static power dissipation P_D (W)")
+
+//10.3d
+C=7*10^-15;
+t_PLH=1.7*C/(uC_p*WbyL_p*V_DD);
+disp(t_PLH,"t_PLH (s)")
+t_PHL=1.7*C/(uC_n*(W_n/L_n)*sqrt(1-0.46/r)*V_DD);
+disp(t_PHL,("t_PHL (s)"))
+t_p=(t_PHL+t_PLH)/2;
+disp(t_p,"t_p (s)") \ No newline at end of file
diff --git a/68/CH10/EX10.4/ex4.sce b/68/CH10/EX10.4/ex4.sce
new file mode 100755
index 000000000..c44e54cf0
--- /dev/null
+++ b/68/CH10/EX10.4/ex4.sce
@@ -0,0 +1,47 @@
+// Example 10.4 : To determine parameters for NMOS transistor
+// Consider NMOS transistor switch
+uC_n=50*10^-6; //uC_n=u_n*C_ox (A/V^2)
+uC_p=20*10^-6; //uC_px `=u_p*C_ox (A/V^2)
+V_tO=1; // (V)
+y=0.5; // (V^1/2)
+fie_f=0.6/2; // (V)
+V_DD=5; // (V)
+W_n=4*10^-6; // (m)
+L_n=2*10^-6; // (m)
+C=50*10^-15; // (F)
+
+// 10.4a
+V_t=1.6; // (V)
+V_OH=V_DD-V_t; // V_OH is the value of v_O at which Q stops conducting (V)
+disp(V_OH,"V_OH (V)")
+
+// 10.4b
+W_p=10*10^-6; // (m)
+L_p=2*10^-6; // (m)
+i_DP=uC_p*W_p*((V_DD-V_OH-V_tO)^2)/(2*L_p);
+disp(i_DP,"Static current of the inverter (A)")
+P_D=V_DD*i_DP;
+disp(P_D,"Power dissipated (W)")
+V_O=0.08; // Output voltage (V) found by equating the current of Q_N=18uA
+disp(V_O," The output voltage of the inverter (V) ")
+
+// 10.4c
+i_D0=uC_n*W_n*((V_DD-V_tO)^2)/(2*2*10^-6); // i_D0=i_D(0) (A) current i_D at t=0
+v_O=2.5; // (V)
+V_t=V_tO+0.5*(sqrt(v_O+2*fie_f)-sqrt(2*fie_f)); // at v_O=2.5V
+i_DtPLH=(uC_n*W_n*(V_DD-v_O-V_t)^2)/(2*L_n); // i_DtPLH=i_D(t_PLH) (A) current i_D at t=t_PLH
+i_Dav=(i_D0+i_DtPLH)/2; // i_Dav=i_D|av (A) average discharge current
+t_PLH=C*(V_DD/2)/i_Dav;
+disp(t_PLH,"t_PHL (s)")
+
+// 10.4d
+// Case with v_t going low
+i_D0=uC_n*W_n*((V_DD-V_tO)^2)/(2*2*10^-6); // i_D0=i_D(0) (A) current i_D at t=0
+i_DtPHL=uC_n*W_n*((V_DD-V_tO)*v_O-(v_O^2)/2)/(L_n); // i_DtPHL=i_D(t_PHL) (A) current i_D at t=T_PHL
+i_Dav=(i_D0+i_DtPHL)/2; // i_Dav=i_D|av (A) average discarge current
+t_PHL=C*(V_DD/2)/i_Dav;
+disp(t_PHL,"t_PHL (s)")
+
+// 10.4e
+t_P=(t_PHL+t_PLH)/2;
+disp(t_P,"t_P (s)") \ No newline at end of file
diff --git a/68/CH11/EX11.1/ex1.sce b/68/CH11/EX11.1/ex1.sce
new file mode 100755
index 000000000..4dbb60c5c
--- /dev/null
+++ b/68/CH11/EX11.1/ex1.sce
@@ -0,0 +1,29 @@
+// Example 10.1 : To determine t_PHL, t_PLH and t_P
+// Consider CMOS inverter
+C_ox=6*10^-15; // (F/um^2)
+uC_n=115*10^-6; //uC_n=u_n*C_ox (A/V^2)
+uC_p=30*10^-6; //uC_p=u_p*C_ox (A/V^2)
+V_tn=0.4; // (V)
+V_tp=-0.4; // (V)
+V_DD=2.5; // (V)
+W_n=0.375*10^-6; // W for Q_N
+L_n=0.25*10^-6; // L for Q_N
+W_p=1.125*10^-6; // W for Q_P
+L_p=0.25*10^-6; // L for Q_P
+C_gd1=0.3*W_n*10^-9; // (F)
+C_gd2=0.3*W_p*10^-9; // (F)
+C_db1=10^-15; // (F)
+C_db2=10^-15; // (F)
+C_g3= 0.375*0.25*6*10^-15+2*0.3*0.375*10^-15; // (F)
+C_g4=1.125*0.25*6*10^-15+2*0.3*1.125*10^-15; // (F)
+C_w=0.2*10^-15; // (F)
+C=2*C_gd1+2*C_gd2+C_db1+C_db2+C_g3+C_g4+C_w; // (F)
+i_DN0=uC_n*W_n*(V_DD-V_tn)^2/(2*L_n); // i_DN0 = i_DN(0) (A)
+i_DNtPHL=uC_n*W_n*((V_DD-V_tn)*V_DD/2-((V_DD/2)^2)/2)/L_n; // i_DNtPHL = i_DN(t_PHL) (A)
+i_DNav=(i_DN0+i_DNtPHL)/2; // i_DN|av (A)
+t_PHL=C*(V_DD/2)/i_DNav;
+disp(t_PHL,"t_PHL (s)")
+t_PLH=1.3*t_PHL; // Since W_p/W_n=3 and u_n/u_p=3.83 thus t_PLH is greater than t_PHL by 3.83/3
+disp(t_PLH,"t_PLH (s)")
+t_P=(t_PHL+t_PLH)/2;
+disp(t_P,"t_P (s)") \ No newline at end of file
diff --git a/68/CH11/EX11.2/ex2.sce b/68/CH11/EX11.2/ex2.sce
new file mode 100755
index 000000000..189d8aaba
--- /dev/null
+++ b/68/CH11/EX11.2/ex2.sce
@@ -0,0 +1,25 @@
+// Example 11.2 Design of two-stage CMOS op-amp
+
+uC_n=50*10^-6; // u_n*C_ox (A/V^2)
+uC_p=20*10^-6; // u_p*C_ox (A/V^2)
+V_tn0=1; // (V)
+V_tp0=-1; // (V)
+fie_f=0.6/2; // (V)
+y=0.5; // (V^1/2)
+V_DD=5; // (V)
+W_n=4*10^-6; // (m)
+L_n=2*10^-6; // (m)
+W_p=10*10^-6; // (m)
+L_p=2*10^-6; // (m)
+W=10*10^-6; // (m)
+L=10*10^-6; // (m)
+C_B=1*10^-12; // bit line capacitance (F)
+deltaV=0.2; // 0.2 V decrement
+WbyL_eq=1/(L_p/W_p+L_n/W_n); // WbyL_eq=(W/L)_eq
+// Equivalent transistor will operate in saturation
+I=(uC_n*WbyL_eq*(V_DD-V_tn0)^2)/2
+r_DS=1/(uC_n*(W_n/L_n)*(V_DD-V_tn0));
+v_Q=r_DS*I; // v_Q=r_DS*I
+I_5=0.5*10^-3; // (A)
+deltat=C_B*deltaV/I_5;
+disp(deltat, "The time (s) required to develop an output voltage of 0.2V") \ No newline at end of file
diff --git a/68/CH11/EX11.3/ex3.sce b/68/CH11/EX11.3/ex3.sce
new file mode 100755
index 000000000..51e436366
--- /dev/null
+++ b/68/CH11/EX11.3/ex3.sce
@@ -0,0 +1,19 @@
+// Example 11.3 : Time required for v_B to reach 4.5V
+// Consider sense-amplifier circuit
+uC_n=50*10^-6; //uC_n=u_n*C_ox (A/V^2)
+uC_p=20*10^-6; //uC_p=u_p*C_ox (A/V^2)
+W_n=12*10^-6; // (m)
+L_n=4*10^-6; // (m)
+W_p=30*10^-6; // (m)
+L_p=4*10^-6; // (m)
+v_B=4.5; // (V)
+C_B=1*10^-12; // (F)
+V_GS=2.5; // (V)
+V_t=1; // (V)
+deltaV=0.1; // (V)
+g_mn=uC_n*(W_n/L_n)*(V_GS-V_t); // (A/V)
+g_mp=uC_p*(W_p/L_p)*(V_GS-V_t); // (A/V)
+G_m=g_mn+g_mp; // (A/V)
+T=C_B/G_m; // (s)
+deltat=T*(log(v_B/V_GS)-log(deltaV));
+disp(deltat,"The time for v_B to reach 4.5V (s)") \ No newline at end of file
diff --git a/68/CH12/EX12.4/ex4.sce b/68/CH12/EX12.4/ex4.sce
new file mode 100755
index 000000000..efe078100
--- /dev/null
+++ b/68/CH12/EX12.4/ex4.sce
@@ -0,0 +1,15 @@
+// Example 12.4 To design tuned amplifier
+
+cfg=-10; // Center frequency gain (V/V)
+g_m=0.005; // (A/V)
+r_o=10000; // (ohm)
+f_o=1*10^6; // (Hz)
+B=2*%pi*10^4; // Bandwidth
+R=-cfg/g_m;
+R_L=R*r_o/(r_o-R);
+disp(R_L,"R_L (ohm)")
+C=1/(R*B)
+disp(C,"C (F)")
+w_o=2*%pi*f_o;
+L=1/(w_o^2*C);
+disp(L,"L (H)") \ No newline at end of file
diff --git a/68/CH14/EX14.1/ex1.sce b/68/CH14/EX14.1/ex1.sce
new file mode 100755
index 000000000..afd9308b8
--- /dev/null
+++ b/68/CH14/EX14.1/ex1.sce
@@ -0,0 +1,17 @@
+// Example 14.1 To design a Class B Output Amplifier
+
+P_L=20; // Average power (W)
+R_L=8; // Load resistance (ohm)
+V_o=sqrt(2*P_L*R_L);
+disp(V_o,"Supply voltage required (V)")
+V_CC=23; // We select this voltage (V)
+I_o=V_o/R_L;
+disp(I_o,"Peak current drawn from each supply (A)")
+P_Sav=V_CC*I_o/%pi; // P_S+ = P_S- = P_Sav
+P_S=P_Sav+P_Sav; // Total supply power
+disp(P_S,"The total power supply (W)")
+n=P_L/P_S; // n is power conversion efficiency
+disp(n*100,"Power conversion efficiency %")
+P_DPmax=V_CC^2/(%pi^2*R_L);
+P_DNmax=P_DPmax;
+disp(P_DPmax,"Maximun power dissipated in each transistor (W)") \ No newline at end of file
diff --git a/68/CH14/EX14.2/ex2.sce b/68/CH14/EX14.2/ex2.sce
new file mode 100755
index 000000000..a7beb29bc
--- /dev/null
+++ b/68/CH14/EX14.2/ex2.sce
@@ -0,0 +1,26 @@
+// Example 14.2 To determine quiescent current and power
+// Consider Class AB Amplifier
+V_CC=15; // (V)
+R_L=100; // (ohm)
+v_O=-10:10:10; // Amplitude of sinusoidal output voltage (V)
+I_S=10^-13; // (A)
+V_T=25*10^-3; // (V)
+B=50; // Beta value
+i_Lmax=10/(0.1*10^3); // Maximum current through Q_N (A)
+// Implies max base curent in Q_N is approximately 2mA
+I_BIAS=3*10^-3; // We select I_BIAS=3mA in order to maintain a minimum of 1mA through the diodes
+I_Q=9*10^-3; // The area ratio of 3 yeilds quiescent current of 9mA
+P_DQ=2*V_CC*I_Q;
+disp(P_DQ,"Quiescent power dissipation (W)")
+//For v_O=0V base current of Q_N is 9/51=0.18 mA
+// Leaves a current of 3-0.18=2.83mA to flow through the diodes
+I_S= (10^-13)/3; // Diodes have I_S = (1*10^-13)/3
+V_BB=2*V_T*log((2.83*10^-3)/I_S);
+disp(V_BB,"V_BB (V) for v_O = 0V")
+// For v_O=+10V, current through the diodes will decrease to 1mA
+V_BB=2*V_T*log((1*10^-3)/I_S);
+disp(V_BB,"V_BB (V) for v_O = +10V")
+// For v_O=-10V , Q_N will conduct very small current thus base current is negligible
+// All of the I_BIAS(3mA) flows through the diodes
+V_BB=2*V_T*log((3*10^-3)/I_S);
+disp(V_BB,"V_BB (V) for v_O = -10V") \ No newline at end of file
diff --git a/68/CH14/EX14.3/ex3.sce b/68/CH14/EX14.3/ex3.sce
new file mode 100755
index 000000000..502cc6791
--- /dev/null
+++ b/68/CH14/EX14.3/ex3.sce
@@ -0,0 +1,17 @@
+// Example 14.3 Redesign the output stage of Example 14.2
+V_T=25*10^-3; // (V)
+I_S=10^-14; // (A)
+I_Q=2*10^-3; // Required quiescent current (A)
+// We select I_BIAS=3mA which is divided between I_R and I_C1
+// Thus we select I_R=0.5mA and I_C1=2.5mA
+V_BB=2*V_T*log(I_Q/10^-13);
+disp(V_BB,"V_BB (V)")
+I_R=0.5*10^-3;
+R1plusR2=V_BB/I_R; // R1plusR2 = R_1+R_2
+I_C1=2.5*10^-3;
+V_BE1=V_T*log(I_C1/I_S);
+disp(V_BE1,"V_BE1 (V)")
+R_1=V_BE1/I_R;
+disp(R_1,"R_1 (ohm)")
+R_2=R1plusR2-R_1;
+disp(R_2,"R_2 (ohm)") \ No newline at end of file
diff --git a/68/CH14/EX14.4/ex4.sce b/68/CH14/EX14.4/ex4.sce
new file mode 100755
index 000000000..ddea01079
--- /dev/null
+++ b/68/CH14/EX14.4/ex4.sce
@@ -0,0 +1,20 @@
+// Example 14.4 To determine thermal resistance, junction temperature
+// Consider BJT with following specifications
+P_D0=2; // Maximum power dissipation (W)
+T_A0=25; // Ambient temperature (degree celcius)
+T_Jmax=150; // maximum junction temperature (degree celcius)
+
+// 14.4a
+theta_JA=(T_Jmax-T_A0)/P_D0; // Thermal resistance
+disp(theta_JA,"The thermal resistance (degree celsius/W)")
+
+// 14.4b
+T_A=50; // (degree celcius)
+P_Dmax=(T_Jmax-T_A)/theta_JA;
+disp(P_Dmax,"Maximum power that can be dissipated at an ambient temperature of 50 degree celsius (W)")
+
+// 14.4c
+T_A=25; // (degree celcius)
+P_D=1; // (W)
+T_J=T_A+theta_JA*P_D;
+disp(T_J,"Junction temperature (degree celcius) if the device is operating at T_A=25 degree celsius and is dissipating 1W") \ No newline at end of file
diff --git a/68/CH14/EX14.5/ex5.sce b/68/CH14/EX14.5/ex5.sce
new file mode 100755
index 000000000..8a21b74bf
--- /dev/null
+++ b/68/CH14/EX14.5/ex5.sce
@@ -0,0 +1,22 @@
+// Example 14.5 To determine the maximum power dissipated
+// Consider a BJT with following specifications
+T_Jmax=150; // (degree celcius)
+T_A=50; // (degree celcius)
+
+// 14.5a
+theta_JA=62.5; // (degree celcius/W)
+P_Dmax=(T_Jmax-T_A)/theta_JA;
+disp(P_Dmax,"The maximum power (W) that can be dissipated safely by the transistor when operated in free air")
+
+//14.5b
+theta_CS=0.5; // (degree celcius/W)
+theta_SA=4; // (degree celcius/W)
+theta_JC=3.12; // (degree celcius/W)
+theta_JA=theta_JC+theta_CS+theta_SA;
+P_Dmax=(T_Jmax-T_A)/theta_JA
+disp(P_Dmax,"The maximum power (W) that can be dissipated safely by the transistor when operated at an ambient temperature of 50 degree celcius but with a heat sink for which theta_CS= 0.5 (degree celcius/W) and theta_SA = 4 (degree celcius/W) (W)")
+
+// 14.5c
+theta_CA=0 // since infinite heat sink
+P_Dmax=(T_Jmax-T_A)/theta_JC;
+disp(P_Dmax,"The maximum power (W) that can be dissipated safely if an infinite heat sink is used and T_A=50 (degree celcius)") \ No newline at end of file
diff --git a/68/CH2/EX2.1/ex1.sce b/68/CH2/EX2.1/ex1.sce
new file mode 100755
index 000000000..7398cc421
--- /dev/null
+++ b/68/CH2/EX2.1/ex1.sce
@@ -0,0 +1,40 @@
+// Example 2.1 : Closed loop and open loop gain
+// Consider inverting configuration
+
+// 2.1a
+R_1=1000; // (ohm)
+R_2=100*10^3; // (ohm)
+A=10^3; // (V/V)
+disp(A,"A (V/V)")
+G=-R_2/R_1/(1+(1+R_2/R_1)/A);
+disp(-G,"G")
+e=(-G-(R_2/R_1))/(R_2/R_1)*100;
+disp(e,"e (%)")
+v_1=0.1; // (V)
+v_1=G*v_1/A;
+disp(v_1,"v_1 (V)")
+A=10^4; // (V/V)
+disp(A,"A (V/V)")
+G=-R_2/R_1/(1+(1+R_2/R_1)/A);
+disp(-G,"G")
+e=(-G-(R_2/R_1))/(R_2/R_1)*100;
+disp(e,"e (%)")
+v_1=0.1; // (V)
+v_1=G*v_1/A;
+disp(v_1,"v_1 (V)")
+A=10^5; // (V/V)
+disp(A,"A (V/V)")
+G=-R_2/R_1/(1+(1+R_2/R_1)/A);
+disp(-G,"G")
+e=(-G-(R_2/R_1))/(R_2/R_1)*100;
+disp(e,"e (%)")
+v_1=0.1; // (V)
+v_1=G*v_1/A;
+disp(v_1,"v_1 (V)")
+
+// 2.1b
+A=50000; // (V/V)
+disp(A,"A (V/V)")
+G=-R_2/R_1/(1+(1+R_2/R_1)/A);
+disp(-G,"G")
+disp("Thus a -50% change in the open loop gain results in only -0.1% in the closed loop gain") \ No newline at end of file
diff --git a/68/CH2/EX2.3/ex3.sce b/68/CH2/EX2.3/ex3.sce
new file mode 100755
index 000000000..1d2297689
--- /dev/null
+++ b/68/CH2/EX2.3/ex3.sce
@@ -0,0 +1,5 @@
+// Example 2.3 : Design instrumentation amplifier
+R_2=1-50000-1/1000+50;
+disp(R_2,"R_2 (ohm)")
+R_1=2*R_2/999;
+disp(R_1,"R_1 (ohm)") \ No newline at end of file
diff --git a/68/CH3/EX3.1/ex1.sce b/68/CH3/EX3.1/ex1.sce
new file mode 100755
index 000000000..148152d9e
--- /dev/null
+++ b/68/CH3/EX3.1/ex1.sce
@@ -0,0 +1,6 @@
+//Example 3.1: Peak value of diode current and maximum reverse voltage
+//v_s is sinusoidal input voltage with peak 24V
+//battery charges to 12V
+I_d=(24-12)/100
+max_v_rev=24+12;
+disp(I_d,"peak value of diode current (A)", max_v_rev,"maximum reverse voltage acrossthe diode (V)") \ No newline at end of file
diff --git a/68/CH3/EX3.2/ex2.sce b/68/CH3/EX3.2/ex2.sce
new file mode 100755
index 000000000..b22e8f6de
--- /dev/null
+++ b/68/CH3/EX3.2/ex2.sce
@@ -0,0 +1,16 @@
+//Example 3.2 : Values of Iand V for the circuit given
+disp("Consider fig 3.6(a). Assume both diodes are conducting")
+I_D2=(10-0)/10;
+I=(0-(-10))/5-I_D2; // node eqution at B for fig 3.6(a)
+V_B=0;
+V=0;
+disp(I,"I (mA)=", V,"V (V)" ,"D_1 is conducting as assumed originally")
+disp("Consider fig 3.6(a). Assume both diodes are conducting")
+I_D2=(10-0)/5;
+I=(0-(-10))/10-2; // node eqution at B for fig 3.6(b)
+disp(I,"I (mA)=", V,("V (V)"))
+disp("Implies assumption is wrong. lets assume D_1 is off and D_2 is on")
+I_D2=(10-(-10))/15;
+V_B=-10+10*I_D2;
+I=0;
+disp(I,"I (mA)", V_B,"V (V)" ,"D_1 is reverse biased") \ No newline at end of file
diff --git a/68/CH3/EX3.3/ex3.sce b/68/CH3/EX3.3/ex3.sce
new file mode 100755
index 000000000..553842dae
--- /dev/null
+++ b/68/CH3/EX3.3/ex3.sce
@@ -0,0 +1,12 @@
+//Example 3.3 : Evaluating junction scaling constant
+//i-I_S*exp(v/(n*V_T)) implies I_S=i*exp(-v/(n*V_T))
+n=1;
+i=10^-3; // (A)
+v=700; // (V)
+V_T=25; // (V)
+I_S=i*exp(-v/(n*V_T))
+disp(I_S,"I_S (A) for n=1")
+n=2;
+I_S=i*exp(-v/(n*V_T))
+disp(I_S,"I_S (A) for n=2")
+disp("These values implies I_S is 1000 times greater ") \ No newline at end of file
diff --git a/68/CH3/EX3.4/ex4.sce b/68/CH3/EX3.4/ex4.sce
new file mode 100755
index 000000000..2ec16dfc0
--- /dev/null
+++ b/68/CH3/EX3.4/ex4.sce
@@ -0,0 +1,13 @@
+//Example 3.4: To determine I_D and V_D
+V_DD=5; // (V)
+R=1000; // (ohm)
+I_1=1*10^-3; // (A)
+V_D=0.7; // (V)
+V_1=V_D;
+I_D=(V_DD-V_D)/R;
+I_2=I_D;
+V_2=V_1+0.1*log10(I_2/I_1);
+I_D=(V_DD-V_2)/R;
+disp(I_D,"The diode current (A)")
+V_D=V_2+0.1*log10(I_D/I_2)
+disp(V_D,"The diode volage (V)") \ No newline at end of file
diff --git a/68/CH3/EX3.5/ex5.sce b/68/CH3/EX3.5/ex5.sce
new file mode 100755
index 000000000..5b755adaa
--- /dev/null
+++ b/68/CH3/EX3.5/ex5.sce
@@ -0,0 +1,9 @@
+// Example 3.5 : Repeating example 3.4 using piecewise linear model
+V_D0=0.65; // (V)
+r_D=20; // (ohm)
+R=1000; // (ohm)
+V_DD=5; // (V)
+I_D=(V_DD-V_D0)/(R+r_D);
+disp(I_D,"I_D (A)")
+V_D=V_D0+I_D*r_D;
+disp(V_D,"The diod voltage (V)") \ No newline at end of file
diff --git a/68/CH3/EX3.6/ex6.sce b/68/CH3/EX3.6/ex6.sce
new file mode 100755
index 000000000..b27cf0114
--- /dev/null
+++ b/68/CH3/EX3.6/ex6.sce
@@ -0,0 +1,11 @@
+// Example 3.6 : Power supply ripple
+V_S=10; // V_S=V_+
+V_D=0.7; // (V)
+R=10*10^3; // (ohm)
+n=2;
+V_T=25*10^-3; // (V)
+V_s=1; // (V)
+I_D=(V_S - V_D)/R;
+r_D=n*V_T/I_D;
+v_d=V_s*r_D/(R+r_D);
+disp(v_d,"v_d(peak (V))") \ No newline at end of file
diff --git a/68/CH3/EX3.7/ex7.sce b/68/CH3/EX3.7/ex7.sce
new file mode 100755
index 000000000..abd160a10
--- /dev/null
+++ b/68/CH3/EX3.7/ex7.sce
@@ -0,0 +1,14 @@
+// Example 3.7 : Percentage change in regulated voltage
+V_DD=10; // (V)
+V_D=0.7*3; // string of 3 diodes provide this constant voltage
+R=1*10^3;
+I_D=(V_DD-V_D)/R;
+n=2;
+V_T= 25*10^-3; // (V)
+r_d=n*V_T/I_D; // incremental resistance
+r=3*r_d; // total incremental resistance
+deltav_O=2*r/(r+R); // deltav is peak to peak change in output voltage
+disp(deltav_O,"Percentage change (V) in regulated voltage caused by 10% change in power supply")
+I=2.1*10^-3; // The current drawn from the diode string
+deltav_O=-I*r; // Decrease in voltage across diode string
+disp(deltav_O,"Decrease in voltage across diode string (V)") \ No newline at end of file
diff --git a/68/CH3/EX3.8/ex8.sce b/68/CH3/EX3.8/ex8.sce
new file mode 100755
index 000000000..85fc6a798
--- /dev/null
+++ b/68/CH3/EX3.8/ex8.sce
@@ -0,0 +1,44 @@
+// Example 3.8 : line regulation load regulation
+
+V_Z=6.8; // (V)
+I_Z=0.005; // (A)
+r_Z=20; // (ohm)
+V=10; // V=V_+
+R=0.5*10^3; // (ohm)
+
+// 3.8a
+V_ZO=V_Z-r_Z*I_Z;
+I_Z=(V-V_ZO)/(R+r_Z)
+V_O=V_ZO+I_Z*r_Z;
+disp(V_O,"V_O (V)")
+
+// 3.8b
+deltaV=1; // change in V is +1 and -1
+deltaV_O=deltaV*r_Z/(R+r_Z); // corresponding change in output voltage
+disp(deltaV_O,"Line regulation (V/V)")
+
+// 3.8c
+I_L=1*10^-3; // load current
+deltaI_L=1*10^-3;
+deltaI_Z=-1*10^-3; // change in zener current
+deltaV_O=r_Z*deltaI_Z;
+disp(deltaV_O,"Load regulation (V/A)")
+
+// 3.8d
+I_L=6.8/2000; // load current with load resistance of 2000
+deltaI_Z=-I_L;
+deltaV_O=r_Z*deltaI_Z;
+disp(deltaV_O,"Corresponding change in zener voltage (V) for zener current change of -3.4mA")
+
+// 3.8e
+R_L=0.5*10^3; // (ohm)
+V_O=V*R_L/(R+R_L);
+disp(V_O,"V_O (V) for R_L=0.5K ohm")
+
+// 3.8f
+I_Z=0.2*10^-3; // Zener t be at the edge of breakdown I_Z=I_ZK
+V_Z=6.7; // V_Z=V_ZK
+I_Lmin=(9-6.7)/0.5; // Lowest current supplied to R
+I_L=I_Lmin-I_Z; // load current
+R_L=V_Z/I_L;
+disp(R_L,"R_L (ohm)") \ No newline at end of file
diff --git a/68/CH3/EX3.9/ex9.sce b/68/CH3/EX3.9/ex9.sce
new file mode 100755
index 000000000..bfa8cf16c
--- /dev/null
+++ b/68/CH3/EX3.9/ex9.sce
@@ -0,0 +1,14 @@
+// Example 3.9 : Value of capacitance C that will result in peak-peak ripple of 2V
+V_P=100; // (V)
+V_r=2; // (V)
+f=60; // (Hz)
+R=10*10^3; // (ohm)
+I_L=V_P/R;
+C=V_P/(V_r*f*R);
+disp(C,"C (V)")
+wdeltat=sqrt(2*V_r/V_P);
+disp(wdeltat,"Conduction angle (rad)")
+i_Dav=I_L*(1+%pi*sqrt(2*V_P/V_r));
+disp(i_Dav,"i_Dav (A)")
+i_Dmax=I_L*(1+2*%pi*sqrt(2*V_P/V_r));
+disp(i_Dmax,"i_Dmax (A)") \ No newline at end of file
diff --git a/68/CH4/EX4.1/ex1.sce b/68/CH4/EX4.1/ex1.sce
new file mode 100755
index 000000000..ee3ef1460
--- /dev/null
+++ b/68/CH4/EX4.1/ex1.sce
@@ -0,0 +1,28 @@
+// Example 4.1 : To determine operating point parameters
+L_min=0.4*10^-6; // (m)
+t_ox=8*10^-9; // (s)
+u_n=450*10^-4; // (A/V^2)
+V_t=0.7; // (V)
+e_ox=3.45*10^-11;
+
+// 4.1a
+C_ox=e_ox/t_ox;
+disp(C_ox,"C_ox (F/m^2)")
+k_n=u_n*C_ox;
+disp(k_n,"k_n (A/V^2)")
+
+// 4.1b
+// Operation in saturation region
+W=8*10^-6; // (m)
+L=0.8*10^-6; // (m)
+i_D=100*10^-6; // (A)
+V_GS=sqrt(2*L*i_D/(k_n*W)) +V_t;
+disp(V_GS,"V_GS (V)")
+V_DSmin=V_GS-V_t;
+disp(V_DSmin,"V_DSmin (V)")
+
+// 4.1c
+// MOSFET in triode region
+r_DS=1000; // (ohm)
+V_GS=1/(k_n*(W/L)*r_DS)+V_t;
+disp(V_GS,"V_GS (V)") \ No newline at end of file
diff --git a/68/CH4/EX4.10/ex10.sce b/68/CH4/EX4.10/ex10.sce
new file mode 100755
index 000000000..ae042e7d2
--- /dev/null
+++ b/68/CH4/EX4.10/ex10.sce
@@ -0,0 +1,20 @@
+// Example 4.10 : Small signal analysis
+V_t=1.5; // (V)
+K=0.00025;//K= k_nW/L (A/V^2)
+V_A=50; // (V)
+I_D=1.06*10^-3; // (A)
+V_D=4.4; // (V)
+R_D=10000; // (ohm)
+R_L=10000; // (ohm)
+V_GS=V_D;
+g_m=K*(V_GS-V_t);
+r_o=V_A/I_D;
+A_v=-g_m*(R_L*R_D*r_o)/(R_D*R_L+R_D*r_o+R_L*r_o);
+disp(A_v,"Voltage gain (V/V)")
+R_G=10*10^6; //(ohm)
+// i_i=v_i*(1-A_v)/R_G
+R_in=R_G/(1-(A_v));
+disp(R_in,"Input resistance (ohm)")
+// v_DSmin=v_GSmin-V_t
+v_i=V_t/(1+(-A_v)); // - sign to make A_v positive
+disp(v_i," Largest allowable input signal (V)") \ No newline at end of file
diff --git a/68/CH4/EX4.11/ex4_11.sce b/68/CH4/EX4.11/ex4_11.sce
new file mode 100755
index 000000000..fe6bc75a2
--- /dev/null
+++ b/68/CH4/EX4.11/ex4_11.sce
@@ -0,0 +1,33 @@
+// Example 4.11: To determine all parameters of transistor amplifier
+v_o=90; // (V)
+v_i=9; // (V)
+R_sig=100*10^3; // (ohm)
+R_L=10*10^3; // (ohm)
+v_sig=10; // (V)
+A_vo=v_o/v_i;
+disp(A_vo,"A_vo (V/V)")
+G_vo=v_o/A_vo;
+disp(G_vo,"G_vo (V/V)")
+R_i=G_vo*R_sig/(A_vo-G_vo)
+disp(R_i,"R_i")
+disp("assume R_L = 10 kilo ohm is connected")
+v_o=70; // (V)
+v_i=8; // (V)
+A_v=v_o/v_i;
+disp(A_v,"A_v (V/V)")
+G_v=v_o/A_vo;
+disp(G_v,"G_v (V/V)")
+R_o=R_L*(A_vo-A_v)/A_v;
+disp(R_o,"R_o (ohm)")
+R_out=R_L*(G_vo-G_v)/G_v;
+disp(R_out,"R_out (ohm)")
+R_in=(v_i*100)/(v_sig-v_i);
+disp(R_in,"R_in (ohm)")
+G_m=A_vo/R_o;
+disp(G_m,"G_m (mho)")
+A_i=A_v*R_in/R_L;
+disp(A_i,"A_i (V/V)")
+R_inL0=R_sig/((1+R_sig/R_i)*(R_out/R_o)-1); // R_in|R_L=0 (ohm)
+disp(R_inL0,"R_in at R_L=0")
+A_is=A_vo*R_inL0/R_o;
+disp(A_is,"A_is (A/A)") \ No newline at end of file
diff --git a/68/CH4/EX4.12/ex4_12.sce b/68/CH4/EX4.12/ex4_12.sce
new file mode 100755
index 000000000..34a1833d9
--- /dev/null
+++ b/68/CH4/EX4.12/ex4_12.sce
@@ -0,0 +1,16 @@
+// Example 4.12 : Midband gain and upper 3dB frequency
+R_sig= 100*10^3; // (ohm)
+R_G=4.7*10^6; // (ohm)
+R_D=15*10^3; // (ohm)
+R_l=15*10^3; // (ohm)
+g_m=1*10^-3; // (mho)
+r_o=150*10^3; // (ohm)
+C_gs=1*10^-12; // (F)
+C_gd=0.4*10^-12; // (F)
+R_L= 1/(1/r_o + 1/R_D + 1/R_l)
+A_M=R_G/(R_G + R_sig)*g_m*R_L;
+disp(A_M,"midband gain A_M (V/V)")
+C_eq=(1+g_m*R_L)*C_gd;
+C_in=C_gs+C_eq;
+f_H=(R_G+R_sig)/(2*%pi*C_in*R_sig*R_G);
+disp(f_H,"f_H (Hz)") \ No newline at end of file
diff --git a/68/CH4/EX4.13/ex4_13.sce b/68/CH4/EX4.13/ex4_13.sce
new file mode 100755
index 000000000..e64ae5690
--- /dev/null
+++ b/68/CH4/EX4.13/ex4_13.sce
@@ -0,0 +1,16 @@
+// Example 4.13 : Coupling capacitor values
+R_G=4.7*10^6; // (ohm)
+R_D=15*10^3; // (ohm)
+R_L=15*10^3; // (ohm)
+R_sig=100*10^3; // (ohm)
+g_m=1*10^-3; // (mho)
+f_L=100; // (Hz)
+C_S=g_m/(2*%pi*f_L)
+disp(C_S,"C_S (F)")
+f_P2=1/(2*%pi*C_S/g_m);
+f_P1=10; // (Hz)
+f_P2=10; // (Hz)
+C_C1=1/(2*%pi*(R_G+R_sig)*10)
+disp(C_C1,"C_C1 (F)")
+C_C2=1/(2*%pi*(R_D+R_L)*10)
+disp(C_C2,"C_C2 (F)") \ No newline at end of file
diff --git a/68/CH4/EX4.2/ex2.sce b/68/CH4/EX4.2/ex2.sce
new file mode 100755
index 000000000..ef7ee335f
--- /dev/null
+++ b/68/CH4/EX4.2/ex2.sce
@@ -0,0 +1,19 @@
+// Example 4.2: Design of given circuit to obtain I_D=0.4mA and V_D=0.5V
+// NMOS transistor is operating in saturation region
+I_D=0.4*10^-3; // (A)
+V_D=0.5; // (V)
+V_t=0.7; // (V)
+uC_n=100*10^-6; // (A/V^2)
+L=1*10^-6; // (m)
+W=32*10^-6; // (m)
+V_SS=-2.5; // (V)
+V_DD=2.5; // (V)
+V_OV=sqrt(I_D*2*L/(uC_n*W));
+V_GS=V_t+V_OV;
+disp(V_GS,"V_t (V)")
+V_S=-1.2; // (V)
+R_S=(V_S-V_SS)/I_D;
+disp(R_S,"R_S (ohm)")
+V_D=0.5; // (V)
+R_D=(V_DD-V_D)/I_D;
+disp(R_D,"R_D (ohm)") \ No newline at end of file
diff --git a/68/CH4/EX4.3/ex3.sce b/68/CH4/EX4.3/ex3.sce
new file mode 100755
index 000000000..2eb0f9547
--- /dev/null
+++ b/68/CH4/EX4.3/ex3.sce
@@ -0,0 +1,15 @@
+// Example 4.3: Design of given circuit to obtain I_D=80uA
+// FET is operating in saturation region
+I_D=80*10^-6; // (A)
+V_t=0.6; // (V)
+uC_n=200*10^-6; // (A/V^2)
+L=0.8*10^-6; // (m)
+W=4*10^-6; // (m)
+V_DD=3; // (V)
+V_OV=sqrt(2*I_D/(uC_n*(W/L)));
+V_GS=V_t+V_OV;
+V_DS=V_GS;
+V_D=V_DS;
+disp(V_D,"V_D (V)")
+R=(V_DD-V_D)/I_D;
+disp(R,"R (ohm)") \ No newline at end of file
diff --git a/68/CH4/EX4.4/ex4.sce b/68/CH4/EX4.4/ex4.sce
new file mode 100755
index 000000000..f67abfc3a
--- /dev/null
+++ b/68/CH4/EX4.4/ex4.sce
@@ -0,0 +1,14 @@
+// Example 4.4 : Design of given circuit to obtain V_D=0.1V
+// MOSFET is operating in triode region
+V_D=0.1; // (V)
+V_DD=5; // (V)
+V_t=1; // (V)
+K=1*10^-3; // K=k'_n(W/L)
+V_GS=5; // (V)
+V_DS=0.1; // (V)
+I_D=K*((V_GS-V_t)*V_DS-(V_DS^2)/2);
+disp(I_D,"I_D (A)")
+R_D=(V_DD-V_D)/I_D;
+disp(R_D,"R_D (ohm)")
+r_DS=V_DS/I_D;
+disp(r_DS,"r_DS (ohm)") \ No newline at end of file
diff --git a/68/CH4/EX4.5/ex5.sce b/68/CH4/EX4.5/ex5.sce
new file mode 100755
index 000000000..1f133da78
--- /dev/null
+++ b/68/CH4/EX4.5/ex5.sce
@@ -0,0 +1,21 @@
+// Example 4.5: To determine all node voltages and currents through all branches
+V_t=1; // (V)
+K=1*10^-3; // K=k'_n(W/L)
+V_DD=10; // (V)
+R_G1=10*10^6; // (ohm)
+R_G2=10*10^6; // (ohm)
+R_D=6*10^3; // (ohm)
+R_S=6*10^3; // (ohm)
+p=poly([8 -25 18],'I_D', 'coeff');
+I_D=roots(p);
+// I_D=0.89mA will result in transistor cut off hence we take the other root of the equation
+V_G=V_DD*R_G2/(R_G2+R_G1);
+I_D=I_D(1)*10^-3;
+disp(I_D,"I_D (A)")
+V_S=I_D*R_S;
+disp(V_S,"V_S (V)")
+V_GS=V_G-V_S;
+disp(V_GS,"V_GS (V)")
+V_D=V_DD-R_D*I_D;
+disp(V_D,"V_D (V)")
+// V_D>V_G-V_t the transistor is operating in saturation as initially assumed \ No newline at end of file
diff --git a/68/CH4/EX4.6/ex6.sce b/68/CH4/EX4.6/ex6.sce
new file mode 100755
index 000000000..cd91485de
--- /dev/null
+++ b/68/CH4/EX4.6/ex6.sce
@@ -0,0 +1,13 @@
+// Example 4.6; Design of given circuit to obtain I_D=0.5mA and V_D=3V
+// MOSFET is in saturation
+V_DD=5; // (V)
+V_D=3; // (V)
+I_D=0.5*10^-3; // (A)
+V_t=-1; // (V)
+K=1*10^-3; // K=k'_n(W/L)
+V_OV=sqrt(2*I_D/K);
+V_GS=V_t+(-V_OV)
+R_D=V_D/I_D;
+V_Dmax=V_D-V_t; // - sign as magnitude of V_t is considered
+R_D=V_Dmax/I_D;
+disp(R_D,"R_D (ohm)") \ No newline at end of file
diff --git a/68/CH4/EX4.7/ex4_7.sce b/68/CH4/EX4.7/ex4_7.sce
new file mode 100755
index 000000000..f2bacf1b7
--- /dev/null
+++ b/68/CH4/EX4.7/ex4_7.sce
@@ -0,0 +1,24 @@
+// Example 4.7: To determine drain currents and output voltage
+K_n =1*10^-3; // K_n=k_n*W_n/L_n (A/V^2)
+K_p = 1*10^-3; // K_p=k_p*W_p/L_p (A/V^2)
+V_tn= 1; // (V)
+V_tp= -1; // (V)
+V_I=-2.5:2.5:2.5; // (V)
+V_DD=2.5; // (V)
+R=10;// (kilo ohm)
+// For V_I=0
+I_DP=(K_p*(V_DD-V_tn)^2)/2;
+I_DN=I_DP;
+disp(I_DP,I_DN,"I_DP (A) and I_DN (A) for V_I=0V")
+disp(0,"V_O for V_I =0V")
+// For V_I=2.5V
+// I_DN=K_N(V_GS-V_tn)V_DS
+// I_DN=v_O/R
+// Solving the two equations we get
+I_DN=0.244*10^-3; // (V)
+V_O=-2.44; // (V)
+disp(I_DN,V_O,"V_O and I_DN for V_I=2.5V")
+// For V_I=-2.5V Q_N is cut off
+I_DP=2.44*10^-3; // (A)
+V_O=2.44; // (V)
+disp(0,I_DP,V_O,"V_O(V), I_DP (A) and I_DN (A) for V_I=-2.5V") \ No newline at end of file
diff --git a/68/CH4/EX4.9/ex4_9.sce b/68/CH4/EX4.9/ex4_9.sce
new file mode 100755
index 000000000..17032c142
--- /dev/null
+++ b/68/CH4/EX4.9/ex4_9.sce
@@ -0,0 +1,21 @@
+// Example 4.9 : Design of given circuit to obtain I_D=0.5mA
+I_d=0.5*10^-3; // (A)
+I_S=0.5*10^-3; // (A)
+V_t=1:0.5:1.5; // (V)
+K_n=1*10^-3; // K_n=k_n*W/L (A/V^2)
+V_DD=15; // (V)
+V_D=10; // (V)
+V_S=5; // (V)
+R_D=(V_DD-V_D)/I_d;
+R_S=V_S/I_S;
+V_OV=sqrt(I_d*2/K_n);
+V_GS=V_t+V_OV;
+V_G=V_S+V_GS;
+// V_t=1.5V
+// I_D=K(V_GS-V_t)^2/2
+// 7=V_GS+10I_D
+// solving above equations
+I_D=0.455*10^-3;
+deltaI_D=I_D-I_d; // Change in I_D (A)
+change=deltaI_D*100/I_d; // Change in %
+disp(change,"Change in I_D (%)") \ No newline at end of file
diff --git a/68/CH5/EX5.1/ex1.sce b/68/CH5/EX5.1/ex1.sce
new file mode 100755
index 000000000..4c33d5646
--- /dev/null
+++ b/68/CH5/EX5.1/ex1.sce
@@ -0,0 +1,22 @@
+// Example 5.1 : Design of given circuit with current 2mA
+// BJT will be operating in active mode
+B=100; // B is beta value
+a=B/(B+1); // a is alpha value
+v_BE=0.7; // v_BE (V) at i_C=1mA
+i_C=1*10^-3:1*10^-3:2*10^-3; // (A)
+I_C=2*10^-3; // (A)
+V_T=25*10^-3; // (V)
+V_C=5; // (V)
+V_CC=15; // (V)
+V_B=0; // (V)
+V_RC=V_CC-V_C;// V_RC is the voltage drop across resistor R_C
+R_C=V_RC/I_C;
+disp(R_C,"Collector Resistance R_C (ohm)")
+V_BE=v_BE+V_T*log(i_C(2)/i_C(1));
+disp(V_BE,"Base emitter voltage V_BE (V) at i_C=2mA")
+V_E=V_B-V_BE;
+disp(V_E,"Emitter voltage V_E (V)")
+I_E=I_C/a;
+disp(I_E,"Emitter current I_E (A)")
+R_E=(V_E-(-V_CC))/I_E;
+disp(R_E,"Emitter resistance R_C (ohm)") \ No newline at end of file
diff --git a/68/CH5/EX5.10/ex10.sce b/68/CH5/EX5.10/ex10.sce
new file mode 100755
index 000000000..0adcdcaed
--- /dev/null
+++ b/68/CH5/EX5.10/ex10.sce
@@ -0,0 +1,25 @@
+// Exampe 5.10 : Analyse the circuit to find node voltages and branch currents
+V_CC=15; // (V)
+R_C=5000; // (ohm)
+R_B1=100*10^3; // (ohm)
+R_B2=50*10^3; // (ohm)
+R_E=3000; // (ohm)
+V_BE=0.7; // (V)
+B=100; // beta value
+V_BB=V_CC*R_B2/(R_B1+R_B2);
+disp(V_BB,"V_BB (V)")
+R_BB=R_B1*R_B2/(R_B1+R_B2);
+disp(R_BB,"R_BB (ohm)")
+I_B=I_E/(B+1);
+disp(I_B,"Base current (A)")
+I_E=(V_BB-V_BE)/(R_E +(R_BB/(B+1)))
+disp(I_E,"Emiter current (A)")
+I_B=I_E/(B+1)
+disp(I_B,"Base current (A)")
+V_B=V_BE+I_E*R_E;
+disp(V_B,"Base voltage (V)")
+a=B/(B+1); // alpha value
+I_C=a*I_E
+disp(I_C,"Collector current (A)")
+V_C=V_CC-I_C*R_C;
+disp(V_C,"Collector voltage (V))") \ No newline at end of file
diff --git a/68/CH5/EX5.11/ex11.sce b/68/CH5/EX5.11/ex11.sce
new file mode 100755
index 000000000..4bf98abe1
--- /dev/null
+++ b/68/CH5/EX5.11/ex11.sce
@@ -0,0 +1,35 @@
+// Example 5.11 :Analyse the circuit to find node voltages and branch currents
+V_CC=15; // (V)
+R_C1=5000; // (ohm)
+R_B1=100*10^3; // (ohm)
+R_B2=50*10^3; // (ohm)
+R_E=3000; // (ohm)
+V_BE=0.7; // (V)
+R_E2=2000; // (ohm)
+R_C2=2700; // (ohm)
+V_EB=0.7; // (V)
+B=100; // beta value
+V_BB=V_CC*R_B2/(R_B1+R_B2);
+R_BB=R_B1*R_B2/(R_B1+R_B2);
+I_E1=(V_BB-V_BE)/(R_E +(R_BB/(B+1)))
+disp(I_E1,"I_E1 (A)")
+I_B1=I_E1/(B+1)
+disp(I_B1,"I_B1 (A)")
+V_B1=V_BE+I_E*R_E;
+disp(V_B1,"V_B1 (V)")
+a=B/(B+1); // alpha value
+// beta and alpha values are same for the two transistors
+I_C1=a*I_E
+disp(I_C1,"IC1 (A)")
+V_C1=V_CC-I_C1*R_C1;
+disp(V_C1,"V_C1 (V))")
+V_E2=V_C1+V_EB;
+disp(V_E2,"V_E2(V)")
+I_E2=(V_CC-V_E2)/R_E2;
+disp(I_E2,"I_E2 (A)")
+I_C2=a*I_E2;
+disp(I_C2,"I_C2 (A)")
+V_C2=I_C2*R_C2;
+disp(V_C2,"V_C2 (V)")
+I_B2=I_E2/(B+1);
+disp(I_B2,"I_B2 (A)") \ No newline at end of file
diff --git a/68/CH5/EX5.13/ex13.sce b/68/CH5/EX5.13/ex13.sce
new file mode 100755
index 000000000..95ad001b6
--- /dev/null
+++ b/68/CH5/EX5.13/ex13.sce
@@ -0,0 +1,21 @@
+// Example 5.13 : Design of bias network of the amplifier
+I_E=1*10^-3; // (A)
+V_CC=12; // (V)
+B=100; // beta value
+V_B=4; // (V)
+V_BE=0.7; // (V)
+R1=80; // (ohm)
+R2=40; // (ohm)
+V_C=8; // (V)
+V_E=V_B-V_BE;
+disp(V_E,"Emitter voltage (V)")
+R_E=V_E/I_E;
+disp(R_E,"Emitter resistance (ohm)")
+I_E=(V_B-V_BE)/(R_E+(R1*R2/(R1+R2))/(B+1));
+disp(I_E,"more accurate value for I_E (A) for R1=80 ohm and R2=40 ohm")
+R1=8; // (ohm)
+R2=4; // (ohm)
+I_E=(V_B-V_BE)/(R_E+(R1*R2/(R1+R2))/(B+1));
+disp(I_E,"more accurate value for I_E (A) for R1=8 ohm and R2=4 ohm")
+R_C=(V_CC-V_C)/I_E; // I_E=I_C
+disp(R_C,"Collector resistor (ohm)") \ No newline at end of file
diff --git a/68/CH5/EX5.14/ex14.sce b/68/CH5/EX5.14/ex14.sce
new file mode 100755
index 000000000..d5c455ad7
--- /dev/null
+++ b/68/CH5/EX5.14/ex14.sce
@@ -0,0 +1,28 @@
+// Example 5.14 : Analysis of transistor amplifier
+V_CC=10; // (V)
+R_C=3000; // (ohm)
+R_BB=100*10^3; // (ohm)
+V_BB=3; // (V)
+V_BE=0.7; // (V)
+V_T=25*10^-3; // (V)
+I_B=(V_BB-V_BE)/R_BB;
+disp(I_B,"Base current (A)")
+I_C=B*I_B;
+disp(I_C,"Collector current (A)")
+V_C=V_CC-I_C*R_C;
+disp(V_C,"Collecor voltage (V)")
+I_E=B*I_C/(B+1);
+r_e=V_T/I_E;
+disp(r_e,"r_e (ohm)")
+g_m=I_C/V_T;
+disp(g_m,"g_m (mho)")
+r_pi=B/g_m;
+disp(r_pi,"r_pi (ohm)")
+// v_i is input voltage let us assume it to be 1 V
+v_i=1;
+v_be=v_i*r_pi/(r_pi+R_BB)
+disp(v_be,"v_be")
+v_o=-g_m*R_C*v_be;
+disp(v_o,"Output voltage (V)")
+A_v=v_o/v_i;
+disp(A_v,"Voltage gain") \ No newline at end of file
diff --git a/68/CH5/EX5.17/ex17.sce b/68/CH5/EX5.17/ex17.sce
new file mode 100755
index 000000000..603668a01
--- /dev/null
+++ b/68/CH5/EX5.17/ex17.sce
@@ -0,0 +1,35 @@
+// Example 5.17 : Amplifier parameters
+// Transistor amplifier is having a open circuit voltage of v_sig of 10mV
+v_sig=10*10^-3; // (V)
+R_L=10*10^3; // (ohm)
+R_sig=100*10^3; // (ohm)
+disp("Calculation with R_L infinite")
+v_i=9; // (V)
+v_o=90; // (V)
+A_vo=v_o/v_i;
+disp(A_vo,"A_vo (V/V)")
+G_vo=v_o/A_vo;
+disp(G_vo,"G_vo (V/V)")
+R_i=G_vo*R_sig/(A_vo-G_vo)
+disp(R_i,"R_i (ohm)")
+disp("Calculations with R_L = 10k ohm")
+v_o=70*10^-3; // (V)
+v_i=8*10^-3; // (V)
+A_v=v_o/v_i;
+disp(A_v,"Voltage gain A_v (V/V)")
+G_v=v_o*10^3/10;
+disp(G_v,"G_v (V/V)")
+R_o=(A_vo-A_v)*R_L/A_v;
+disp(R_o,"R_o (ohm)")
+R_out=(G_vo-G_v)*R_L/G_v;
+disp(R_out,"R_out (ohm)")
+R_in=v_i*R_sig/(v_sig-v_i);
+disp(R_in,"R_in (ohm)")
+G_m=A_vo/R_o;
+disp(G_m,"G_m (A/V)")
+A_i=A_v*R_in/R_L;
+disp(A_i,"A_i (A/A)")
+R_ino=R_sig/((1+R_sig/R_i)*(R_out/R_o)-1); // R_ino is R_in at R_L=0
+disp(R_ino,"R_in at R_L =0")
+A_is=A_vo*R_ino/R_o;
+disp(A_is,"A_is (A/A)") \ No newline at end of file
diff --git a/68/CH5/EX5.18/ex18.sce b/68/CH5/EX5.18/ex18.sce
new file mode 100755
index 000000000..d556d5680
--- /dev/null
+++ b/68/CH5/EX5.18/ex18.sce
@@ -0,0 +1,29 @@
+//Example 5.18 : Midband gain and 3dB frequency
+// Transistor is biased at I_C=1mA
+V_CC=10; // (V)
+V_EE=10; // (V)
+I=0.001; // (A)
+R_B=100000; // (ohm)
+R_C=8000; // (ohm)
+R_sig=5000; //(ohm)
+R_L=5000; // (ohm)
+B=100; // beta value
+V_A=100; // (V)
+C_u=1*10^-12; // (F)
+f_T=800*10^6; // (Hz)
+I_C=0.001; // (A)
+r_x=50; // (ohm)
+// Values of hybrid pi model parameters
+g_m=I_C/V_T;
+r_pi=B/g_m;
+r_o=V_A/I_C;
+w_T=2*%pi*f_T;
+CpiplusCu=g_m/w_T; // C_u+C_pi
+C_pi=CpiplusCu-C_u;
+R_l=r_o*R_C*R_L/(r_o*R_C+R_C*R_L+R_L*r_o) // R_l=R_L'
+A_M=R_B*r_pi*g_m*R_l/((R_B+R_sig)*(r_pi+r_x+(R_B*R_sig/(R_B+R_sig))));
+disp(A_M,"Midband gain (V/V)")
+R_seff=(r_pi*(r_x+R_B*R_sig/(R_B+R_sig)))/(r_pi+r_x+R_B*R_sig/(R_B+R_sig)); // Effective source resistance R_seff=R'_sig
+C_in=C_pi+C_u*(1+R_l*g_m);
+f_H=1/(2*%pi*C_in*R_seff);
+disp(f_H,"3dB frequency (Hz)") \ No newline at end of file
diff --git a/68/CH5/EX5.19/ex19.sce b/68/CH5/EX5.19/ex19.sce
new file mode 100755
index 000000000..14feeed58
--- /dev/null
+++ b/68/CH5/EX5.19/ex19.sce
@@ -0,0 +1,21 @@
+// Example 5.19 : To select values of capacitance required
+R_B=100000; // (ohm)
+r_pi=2500; // (ohm)
+R_C=8000; // (ohm)
+R_L=5000; // (ohm)
+R_sig=5000; // (ohm)
+B=100; // beta value
+g_m=0.04; // (A/V)
+r_pi=2500; //(ohm)
+f_L=100; // (Hz)
+r_e=25; // (ohm)
+R_C1=R_B*r_pi/(R_B+r_pi)+R_sig; // Resistance seen by C_C1
+R_E=r_e+R_B*R_sig/((R_B+R_sig)*(B+1)); // Resistance seen by C_E
+R_C2=R_C+R_L;// Resistance seen by C_C2
+w_L=2*%pi*f_L;
+C_E=1/(R_E*0.8*w_L); //C_E is to contribute only 80% of the value of w_L
+disp(C_E,"C_E (F)")
+C_C1=1/(R_C1*0.1*w_L); //C_C1 is to contribute only 10% of the value of f_L
+disp(C_C1,"C_C1 (F)")
+C_C2=1/(R_C2*0.1*w_L); //C_C2 should contribute only 10% of the value of f_L
+disp(C_C2,"C_C2 (F)") \ No newline at end of file
diff --git a/68/CH5/EX5.2/ex2.sce b/68/CH5/EX5.2/ex2.sce
new file mode 100755
index 000000000..430c974a7
--- /dev/null
+++ b/68/CH5/EX5.2/ex2.sce
@@ -0,0 +1,35 @@
+// Example 5.2 : Consider a common Emitter circuit
+I_S=10^-15; // (A)
+R_C=6.8*10^3; // (ohm)
+V_CC=10; // (V)
+V_CE=3.2; // (V)
+V_T=25*10^-3; // (V)
+
+// 5.2a
+I_C=(V_CC-V_CE)/R_C;
+disp(I_C,"Collector current (A)")
+V_BE=V_T*log(I_C/I_S);
+disp(V_BE,"V_BE (V)")
+
+// 5.2b
+V_in=5*10^-3; // sinuosoidal input 0f peak amplitide 5mv
+A_v=-(V_CC-V_CE)/V_T;
+disp(A_v,"Voltage gain")
+V_o=-A_v*V_in; // negative sign to make positive value of voltage gain
+disp(V_o,"Amplitude of output voltage (V)")
+
+// 5.2c
+v_CE=0.3// (V)
+i_C=(V_CC-v_CE)/R_C;
+disp(i_C,"i_C (A)")
+v_be=V_T*log(i_C/I_C); // v_BE is positive increment in v_BE
+disp(v_be,"required increment (V)")
+
+// 5.2d
+v_O=0.99*V_CC;
+R_C=6.8*10^3; // (ohm)
+i_C=(V_CC-v_O)/R_C;
+I_C=1*10^-3; // (A)
+disp(i_C,"i_C (A)")
+v_be=V_T*log(i_C/I_C);
+disp(v_be,"negative increment in v_BE (V)") \ No newline at end of file
diff --git a/68/CH5/EX5.3/ex3.sce b/68/CH5/EX5.3/ex3.sce
new file mode 100755
index 000000000..4ddb957ef
--- /dev/null
+++ b/68/CH5/EX5.3/ex3.sce
@@ -0,0 +1,13 @@
+// Example 5.3 :Determine R_B
+// transistor is specified to have B value in the range of 50 to 150
+V_C=0.2; // V_C=V_CEsat
+V_CC=10; // (V)
+R_C=10^3; // (ohm)
+V_BB=5; // (V)
+V_BE=0.7; // (V)
+bmin=50; // range of bete is 50 to 150
+I_Csat=(V_CC-V_C)/R_C;
+I_BEOS=I_Csat/bmin; // I_B(EOS)=I_BEOS
+I_B=10*I_BEOS; // base current for an overdrive factor 10
+R_B=(V_BB-V_BE)/I_B;
+disp(R_B,"Value of R_B (ohm)") \ No newline at end of file
diff --git a/68/CH5/EX5.4/ex4.sce b/68/CH5/EX5.4/ex4.sce
new file mode 100755
index 000000000..38e33016e
--- /dev/null
+++ b/68/CH5/EX5.4/ex4.sce
@@ -0,0 +1,18 @@
+// Example 5.4 : Analyse the circuit to find node voltages and branch currents
+V_BB= 4; // (V)
+V_CC=10; // (V)
+V_BE=0.7; // (V)
+b=100; // beta = 100
+R_E=3.3*10^3; // (ohm)
+R_C=4.7*10^3; // (ohm)
+V_E=V_BB-V_BE;
+disp(V_E,"Emitter voltage (V)")
+I_E=(V_E-0)/R_E;
+disp(I_E,"Emitter current (A)")
+a=b/(b+1) // alpha value
+I_C=I_E*a;
+disp(I_C,"Collector current (A)")
+V_C=V_CC-I_C*R_C; // Applying ohm's law
+disp(V_C,"Collector voltage (V)")
+I_B=I_E/(b+1);
+disp(I_B,"Base current (A)") \ No newline at end of file
diff --git a/68/CH5/EX5.5/ex5.sce b/68/CH5/EX5.5/ex5.sce
new file mode 100755
index 000000000..ea5d6d6ef
--- /dev/null
+++ b/68/CH5/EX5.5/ex5.sce
@@ -0,0 +1,27 @@
+// Example 5.5 : Analyse the circuit to find node voltages and branch currents
+disp("Assuming active mode operation")
+V_CC=10; // (V)
+R_C=4.7*10^3; // (V)
+R_E=3.3*10^3; // (ohm)
+V_BE=0.7; // (V)
+V_BB=6; // (V)
+V_CEsat=0.2; // (V)
+V_E=V_BB-V_BE;
+disp(V_E,"Emitter voltage (V)")
+I_E=V_E/R_E;
+disp(I_E,"Emitter current (A)")
+V_C=V_CC-I_E*R_C; // I_E=I_C
+disp(V_C,"Collector voltage (V)")
+disp("Since V_C < V_B our assumption is wrong\n Hence its saturation mode operation")
+V_E=V_BB-V_BE;
+disp(V_E,"Emitter voltage (V)")
+I_E=V_E/R_E;
+disp(I_E,"Emitter current (A)")
+V_C=V_E+V_CEsat;
+disp(V_C,"Collector voltage (V)")
+I_C=(V_CC-V_C)/R_C;
+disp(I_C,"Collector current (A)")
+I_B=I_E-I_C;
+disp(I_B,"Base current (A)")
+Bforced=I_C/I_B; // transistor is made to operate at a forced beta value
+disp(Bforced,"forced beta") \ No newline at end of file
diff --git a/68/CH5/EX5.7/ex7.sce b/68/CH5/EX5.7/ex7.sce
new file mode 100755
index 000000000..78c483e01
--- /dev/null
+++ b/68/CH5/EX5.7/ex7.sce
@@ -0,0 +1,17 @@
+// Example 5.7: Analyse the circuit to find node voltages and branch currents
+V_CC=-10; // (V)
+R_E=2000; // (ohm)
+R_C=1000; // (ohm)
+V_EE=10; // (V)
+V_E=0.7; // (V) emitter base junction will be forward biased with V_E=V_EB=0.7V
+disp(V_E,"Emitter base junction is forward biased with V_E (V)")
+I_E=(V_EE-V_E)/R_E;
+disp(I_E,"Emitter current (A)")
+B=100; // Assuming beta 100
+a=B/(B+1);
+I_C=a*I_E; // Assuming the transistor to operate in active mode
+disp(I_C,"Collector current (A)")
+V_C=V_CC+I_C*R_C;
+disp(V_C,"Collector voltage (V)")
+I_B=I_E/(B+1);
+disp(I_B,"Base current (A)") \ No newline at end of file
diff --git a/68/CH5/EX5.8/ex8.sce b/68/CH5/EX5.8/ex8.sce
new file mode 100755
index 000000000..b19f04f0b
--- /dev/null
+++ b/68/CH5/EX5.8/ex8.sce
@@ -0,0 +1,16 @@
+// Example 5.8 : Analyse the circuit to find node voltages and branch currents
+V_CC= 10; // (V)
+R_C=2000; // (ohm)
+V_BB=5; // (V)
+R_B=100*10^3; // (ohm)
+B=100; // beta value
+I_B=(V_BB-V_BE)/R_B;
+disp(I_B,"Base current (A)")
+I_C=B*I_B;
+disp(I_C,"Collector current (A)")
+V_C=V_CC-I_C*R_C;
+disp(V_C,"Collector voltage (V)")
+V_B=0.7 ; // V_B=V_BE
+disp(V_B,"Base voltage (V)")
+I_E=(B+1)*I_B;
+disp(I_E,"Emitter current (A)") \ No newline at end of file
diff --git a/68/CH5/EX5.9/ex9.sce b/68/CH5/EX5.9/ex9.sce
new file mode 100755
index 000000000..7454b78cd
--- /dev/null
+++ b/68/CH5/EX5.9/ex9.sce
@@ -0,0 +1,24 @@
+// Example 5.9 :Analyse the circuit to find node voltages and branch currents
+// assuming that the transistor is saturated
+V_CC=-5; // (V)
+V_EE=5; // (V)
+R_B=10000; // (ohm)
+R_C=10000; // (ohm)
+R_E=1000; // (ohm)
+V_EB=0.7; // (V)
+V_ECsat=0.2; // (V)
+// using the relation I_E=I_C+I_B
+V_B=3.75/1.2; //(V)
+disp(V_B,"Base voltage (V)")
+V_E=V_B+V_EB;
+disp(V_E,"Emitter voltage (V)")
+V_C=V_E-V_ECsat;
+disp(V_C,"Collector voltage (V)")
+I_E=(V_EE-V_E)/R_E;
+disp(I_E,"Emitter current (A)")
+I_B=V_B/R_B;
+disp(I_B,"Base current (A)")
+I_C=(V_C-V_CC)/R_C;
+disp(I_C,"Collector current (A)")
+Bforced=I_C/I_B; // Value of forced beta
+disp(Bforced, "Forced Beta value") \ No newline at end of file
diff --git a/68/CH6/EX6.1/ex1.sce b/68/CH6/EX6.1/ex1.sce
new file mode 100755
index 000000000..51ac95154
--- /dev/null
+++ b/68/CH6/EX6.1/ex1.sce
@@ -0,0 +1,18 @@
+// Example 6.1: To find the operating point of NMOS transistor
+// Consider NMOS transistor
+
+// 6.1a
+I_D=100*10^-6; // (A)
+K_n=387*10^-6*10; // K_n=u_n*C_ox(W/L) (A/V^2)
+V_th=0.48; // (V)
+V_OV=sqrt(2*I_D/K_n);
+disp(V_OV,"V_OV (V)")
+V_GS=V_th+V_OV;
+disp(V_GS,"V_GS (V)")
+
+// 6.1b
+I_C=100*10^-6; // (A)
+I_S=6*10^-18 // (A)
+V_T=0.025; // (V)
+V_BE=V_T*log(I_C/I_S);
+disp(V_BE,"V_BE (V)") \ No newline at end of file
diff --git a/68/CH6/EX6.10/ex10.sce b/68/CH6/EX6.10/ex10.sce
new file mode 100755
index 000000000..7a0d4cc0c
--- /dev/null
+++ b/68/CH6/EX6.10/ex10.sce
@@ -0,0 +1,29 @@
+// Example 6.10 : To determine A_M, f_t, f_Z, f_3dB
+// Consider the CS amplifier
+A_M=-12.3;// (V/V) found from Example 6.9
+C_L=25*10^-15; // (F)
+C_gd=5*10^-15; // (F)
+R_L=9.82*10^3; // (F)
+g_m=1.25*10^-3; // (mho)
+f_H=1/(2*%pi*(C_L+C_gd)*R_L); // 3dB frequency
+disp(f_H,"f_H (Hz)")
+f_t=-A_M*f_H; // Unity-gain frequency - sign to make gain positive as only magnitude is considered
+disp(f_t,"f_t (Hz)")
+f_Z=g_m/(2*%pi*C_gd); // frequency of the zero
+disp(f_Z,"f_Z (Hz)")
+I_D=400*10^-6; // I_D must be quadrupled by changing I_REF to 400uF
+V_OV=0.32;
+g_m=I_D/(V_OV/2);
+disp(g_m,"g_m (A/V)")
+r_o1=5*0.36/(0.4*10^-3);
+disp(r_o1,"r_o1 (ohm)")
+r_o2=6*0.36/(0.4*10^-3);
+disp(r_o2,"r_o2 (ohm)")
+R_L=(r_o1*r_o2)/(r_o1+r_o2);
+disp(R_L,"R_L (ohm)")
+A_M=-g_m*R_L;
+disp(A_M,"A_M (V/V)")
+f_H=1/(2*%pi*(C_L+C_gd)*R_L);
+disp(f_H,"f_H (Hz)")
+f_t=f_H*-A_M; // Unity gain frequency
+disp(f_t,"f_t (Hz)") \ No newline at end of file
diff --git a/68/CH6/EX6.11/ex11.sce b/68/CH6/EX6.11/ex11.sce
new file mode 100755
index 000000000..c73b89410
--- /dev/null
+++ b/68/CH6/EX6.11/ex11.sce
@@ -0,0 +1,29 @@
+// Example 6.11 : Avo Rin Rout Gi Gis Gv fH
+// Consider the common gate amplifier
+g_m=1.25*10^-3; // (A/V)
+r_o=18000; // (ohm)
+I_D=100*10^-6; // (A)
+X=0.2;
+R_S=10*10^3; // (ohm)
+R_L=100*10^3; // (ohm)
+C_gs=20*10^-15;// (F)
+C_gd=5*10^-15;// (F)
+C_L=0; // (F)
+gmplusgmb=g_m+0.2*g_m; // gmplusgmb=g_m+g_mb
+A_vo=1+(gmplusgmb)*r_o;
+disp(A_vo,"A_vo (V/V)")
+R_in=(r_o+R_L)/A_vo;
+disp(R_in,"R_in (ohm)")
+R_out=r_o+A_vo*R_S;
+disp(R_out,"ohm")
+G_v=A_vo*R_L/(R_L+R_out);
+disp(G_v,"G_v (V/V)")
+G_is=A_vo*R_S/R_out;
+disp(G_is,"G_is (A/A)")
+G_i=G_is*R_out/(R_out+R_L)
+disp(G_i,"G_i (A/A)")
+R_gs=R_S*R_in/(R_S+R_in);
+R_gd=R_L*R_out/(R_L+R_out);
+T_H=C_gs*R_gs+C_gd*R_gd;
+f_H=1/(2*%pi*T_H);
+disp(f_H,"f_H (Hz)") \ No newline at end of file
diff --git a/68/CH6/EX6.12/ex12.sce b/68/CH6/EX6.12/ex12.sce
new file mode 100755
index 000000000..ca344dadf
--- /dev/null
+++ b/68/CH6/EX6.12/ex12.sce
@@ -0,0 +1,84 @@
+// Example 6.12 : Comparison between Cascode amplifier and CS amplifier
+// 6.12a
+// CS amplifier
+g_m=1.25*10^-3;
+r_o=20*10^3;
+R_L=r_o*r_o/(r_o+r_o);
+C_gs=20*10^-15;
+R_sig=10000;
+C_gd=5*10^-15;
+C_L=5*10^-15;
+C_db=5*10^-15;
+A_o=g_m*r_o;
+disp(A_o,"A_o (V/V)")
+A_v=-A_o/2;
+disp(A_v,"A_v (V/V)")
+T_H=C_gs*R_sig+C_gd*[(1+g_m*R_L)*R_sig+R_L]+(C_L+C_db)*R_L;
+disp(T_H,"T_H (s)")
+f_H=1/(2*%pi*T_H);
+disp(f_H,"f_H (Hz)")
+f_t=-A_v*f_H;
+disp(f_t,"f_t (Hz)")
+// Cascode amplifier
+g_m1=1.25*10^-3;
+r_o1=20000;
+X=0.2;
+r_o2=20000;
+R_L=20000;
+A_o1=g_m1*r_o1;
+disp(A_o1,"A_o1 (V/V)")
+gm2plusgmb2=g_m1+X*g_m;
+A_vo2=1+(gm2plusgmb2)*r_o2;
+disp(A_vo2,"A_vo2 (V/V)")
+R_out1=r_o1;
+R_in2=1/(gm2plusgmb2)+R_L/A_vo2;
+disp(R_in2,"R_in2 (ohm)")
+R_d1=R_out1*R_in2/(R_out1+R_in2);
+disp(R_d1,"R_d1 (ohm)")
+R_out=r_o2+A_vo2*r_o1;
+disp(R_out,"R_out (ohm)")
+vo1byvi=-g_m1*R_d1;
+disp(vo1byvi,"(v_o1/v_i) (V/V)")
+A_v=-A_o1*A_vo2*R_L/(R_L+R_out);
+disp(A_v,"A_v (V/V)")
+C_gs1=20*10^-15;
+R_sig=10*10^3;
+gm1Rd1=1.5;
+C_gd1=5*10^-15;
+C_gs2=20*10^-15;
+C_db2=5*10^-15;
+C_gd2=5*10^-15;
+C_db1=5*10^-15;
+T_H=R_sig*[C_gs1+C_gd1*(1+gm1Rd1)]+R_d1*(C_gd1+C_db1+C_gs2)+((R_L*R_out)/(R_L+R_out))*(C_L+C_db2+C_gd2);
+f_H=1/(2*%pi*T_H);
+disp(T_H,"T_H (s)")
+disp(f_H,"f_H (Hz)")
+f_t=-A_v*f_H;
+disp(f_t,"f_t (Hz)")
+// 6.12b
+// CS amplifier
+A_v=-12.5;
+R_L=10*10^3;
+disp(A_v,"A_v (V/V)")
+T_H=(C_gd+C_L+C_db)*R_L;
+disp(T_H,"T_H (s)")
+f_H=1/(2*%pi*T_H);
+disp(f_H,"F_H (Hz)")
+f_t=-A_v*f_H;
+disp(f_t,"f_t (Hz)")
+// Cascode amplifier
+R_L=640*10^3;
+R_out=640*10^3;
+R_out1=20*10^3;
+A_v=-A_o1*A_vo2*R_L/(R_L+R_out);
+disp(A_v,"A_v (V/V)")
+R_in2=1/gm2plusgmb2+R_L/A_vo2;
+disp(R_in2,"R_in2 (ohm)")
+R_d1=R_in2*R_out1/(R_in2+R_out1);
+disp(R_d1,"R_d1 (ohm)")
+T_H=R_d1*(C_gd1+C_db1+C_gs2)+(R_L*R_out/(R_L+R_out))*(C_L+C_gd2+C_db2);
+disp(T_H,"T_H (s)")
+f_H=1/(2*%pi*T_H);
+disp(f_H,"f_H (Hz)")
+f_t=-A_v*f_H;
+disp(f_t,"f_t (Hz)") \ No newline at end of file
diff --git a/68/CH6/EX6.13/ex13.sce b/68/CH6/EX6.13/ex13.sce
new file mode 100755
index 000000000..08a8caaf6
--- /dev/null
+++ b/68/CH6/EX6.13/ex13.sce
@@ -0,0 +1,57 @@
+// Example 6.13: Analysis of CC-CE amplifier
+// Consider a CC-CE amplifier
+// at an emitter bias current of 1mA for Q_1 and Q_2
+g_m=40*10^-3; // (A/V)
+r_e=25; // (ohm)
+B=100; // beta value
+C_u=2*10^-12; // (F)
+f_T=400*10^6 // (Hz)
+r_pi= B/g_m;
+disp(r_pi,"r_pi (ohm)")
+C_pi=g_m/(2*%pi*f_T)-C_u;
+disp(C_pi,"C_pi (F)")
+R_in2=2500; // (ohm)
+r_pi2=2500; // (ohm)
+r_pi1=2500; // (ohm)
+r_e1=0.025; // (ohm)
+B_1=100; // beta value
+R_in=(B_1+1)*(r_e1+R_in2);
+disp(R_in,"R_in (ohm)")
+R_sig=4*10^3; // (ohm)
+R_L=4000; // (ohm)
+Vb1byVsig=R_in/(R_in+R_sig); // (V_b1/V_sig)
+disp(Vb1byVsig,"(V_b1/V_sig) (V/V)")
+Vb2plusVb1=R_in2/(R_in2+r_e1); // (V_b2/V_b1)
+disp(Vb2plusVb1,"(V_b2/V_b1) (V/V)")
+VobyVb2=-g_m*R_L; // (V_o/V_b2)
+disp(VobyVb2,"(V_o/V_b2) (V/V)")
+A_M=VobyVb2*Vb2plusVb1*Vb2plusVb1;
+disp(A_M,"A_M (V/V)")
+R_u1=R_sig*R_in/(R_sig+R_in);
+disp(R_u1,"R_u1 (ohm)")
+R_pi1=(R_sig+R_in2)/(1+(R_sig/r_pi1)+(R_in2/r_e1)); // C_pi1 sees a resistance R_pi1
+disp(R_pi1,"R_pi1 (ohm)")
+R_out1=25+4000/101;
+R_pi2=R_in2*R_out1/(R_in2+R_out1); // C_pi2 sees a resistance R_pi2
+disp(R_pi2,"R_pi2 (ohm)")
+R_u2=(1+g_m*R_L)*R_pi2+R_L;
+disp(R_u2,"R_u2 (ohm)")
+C_u1=2*10^-12; // (F)
+R_u1=3940; // (ohm)
+C_pi1=13.9*10^-12; // (F)
+C_u2=2*10^-12; // (F)
+C_pi2=13.9*10^-12; // (F)
+T_H=C_u1*R_u1+C_pi1*R_pi1+C_u2*R_u2+C_pi2*R_pi2;
+disp(T_H,"T_H (s)")
+f_H=1/(2*%pi*T_H);
+disp(f_H,"f_H (Hz)")
+A_M=r_pi*(-g_m*R_L)/(r_pi+R_sig);
+disp(A_M,"A_M (V/V)")
+R_pi=r_pi*R_sig/(r_pi+R_sig);
+disp(R_pi,"R_pi (ohm)")
+R_u=(1+g_m*R_L)*R_pi +R_L;
+disp(R_u,"R_u (ohm)")
+T_H=C_pi*R_pi+C_u*R_u;
+disp(T_H,"T_H (s)")
+f_H=1/(2*%pi*T_H);
+disp(f_H,"f_H (Hz)") \ No newline at end of file
diff --git a/68/CH6/EX6.14/ex14.sce b/68/CH6/EX6.14/ex14.sce
new file mode 100755
index 000000000..2b9f8da97
--- /dev/null
+++ b/68/CH6/EX6.14/ex14.sce
@@ -0,0 +1,15 @@
+// Example 6.14 : To determine required resistor values
+// The circuits generate a constant current I_D=10uA which operate at a supply of 10V
+V_BE=0.7; // (V)
+V_t=0.025; // (V)
+I_REF=10*10^-6; // (A)
+V_DD=10; // (V)
+I=1*10^-3; // (A)
+V_BE1=V_BE+V_t*log(I_REF/I); // Voltage drop across Q_1
+disp(V_BE1,"V_BE1 (V)")
+R_1=(V_DD-V_BE1)/(I_REF); // For the Widlar circuit we decide I_REF=1mA and V_BE1=0.7V
+disp(R_1,"R_1 (ohm)")
+R_2=(V_DD-V_BE)/I;
+disp(R_2,"R_2 (ohm)")
+R_3=(V_t/I_REF)*log(I/I_REF);
+disp(R_3,"R_3 (ohm)") \ No newline at end of file
diff --git a/68/CH6/EX6.2/ex2.sce b/68/CH6/EX6.2/ex2.sce
new file mode 100755
index 000000000..c4555eddf
--- /dev/null
+++ b/68/CH6/EX6.2/ex2.sce
@@ -0,0 +1,27 @@
+// Example 6.2 : Comparison between NMOS transistor and npn transistor
+
+disp("For NMOS transistor")
+I_D=100*10^-6; // (A)
+V_a=5; // V'_A=V_a (A)
+L=0.4; // (um)
+K_n=267*4/0.4*10^-6; // K_n=u_n*C_ox*(W/L) (A/V^2)
+V_OV=sqrt(2*I_D/K_n);
+g_m=sqrt(2*K_n*I_D)
+disp(g_m,"g_m (A/V)")
+disp("R_in is infinite")
+r_o=V_a*L/I_D;
+disp(r_o,"r_o (ohm)")
+A_O=g_m*r_o;
+disp(A_O,"A_O (V/V)")
+disp("For npn transistor")
+I_C=0.1*10^-3; // collector current
+B_o=100; // beta value
+V_A=35; // (V)
+g_m=I_C/V_T;
+disp(g_m,"g_m (A/V)")
+R_in=B_o/g_m;
+disp(R_in,"R_in (ohm)")
+r_o=V_A/I_C;
+disp(r_o,"r_o (ohm)")
+A_O=g_m*r_o;
+disp(A_O,"A_O (V/V)") \ No newline at end of file
diff --git a/68/CH6/EX6.3/ex3.sce b/68/CH6/EX6.3/ex3.sce
new file mode 100755
index 000000000..c35ad2531
--- /dev/null
+++ b/68/CH6/EX6.3/ex3.sce
@@ -0,0 +1,128 @@
+// Example 6.3 : Comparison between NMOS transistor and npn transistor
+// For npn transistor
+disp("For npn transistor")
+I_C=10*10^-6; // (A)
+V_T=0.025; // (V)
+V_A=35; // (V)
+C_jeO=5*10^-15; // (F)
+C_uO=5*10^-15; // (F)
+C_L=1*10^-12; // (F)
+disp("The data calculated for I_C=10uA")
+g_m=I_C/V_T;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_C;
+disp(r_o,"r_o (ohm)")
+A_O=V_A/V_T;
+disp(A_O,"A_O (V/V)")
+T_F=10*10^-12;
+C_de=T_F*g_m;
+disp(C_de,"C_de (F)")
+C_je=2*C_jeO;
+disp(C_je,"C_je (F)")
+C_pi=C_de+C_je;
+disp(C_pi,"C_pi (F)")
+C_u=C_uO;
+disp(C_u,"C_u (F)")
+f_T=g_m/(2*%pi*(C_pi+C_u));
+disp(f_T,"f_T (Hz)")
+f_t=g_m/(2*%pi*C_L);
+disp(f_t,"f_t (Hz)")
+disp("The data calculated for I_C=100uA")
+I_C=100*10^-6;
+g_m=I_C/V_T;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_C;
+disp(r_o,"r_o (ohm)")
+A_O=V_A/V_T;
+disp(A_O,"A_O (V/V)")
+T_F=10*10^-12;
+C_de=T_F*g_m;
+disp(C_de,"C_de (F)")
+C_je=2*C_jeO;
+disp(C_je,"C_je (F)")
+C_pi=C_de+C_je;
+disp(C_pi,"C_pi (F)")
+C_u=C_uO;
+disp(C_u,"C_u (F)")
+f_T=g_m/(2*%pi*(C_pi+C_u));
+disp(f_T,"f_T (Hz)")
+f_t=g_m/(2*%pi*C_L);
+disp(f_t,"f_t (Hz)")
+disp("The data calculated for I_C=1mA")
+I_C=1*10^-3;
+g_m=I_C/V_T;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_C;
+disp(r_o,"r_o (ohm)")
+A_O=V_A/V_T;
+disp(A_O,"A_O (V/V)")
+T_F=10*10^-12;
+C_de=T_F*g_m;
+disp(C_de,"C_de (F)")
+C_je=2*C_jeO;
+disp(C_je,"C_je (F)")
+C_pi=C_de+C_je;
+disp(C_pi,"C_pi (F)")
+C_u=C_uO;
+disp(C_u,"C_u (F)")
+f_T=g_m/(2*%pi*(C_pi+C_u));
+disp(f_T,"f_T (Hz)")
+f_t=g_m/(2*%pi*C_L);
+disp(f_t,"f_t (Hz)")
+// For NMOS transistor
+L=0.4*10^-6; // (m)
+C_L=1*10^-12; // (F)
+disp("The data calculated for I_D = 10uA")
+I_D=10*10^-6; // (A)
+WbyL=0.12*I_D; // WbyL=(W/L)
+disp(WbyL*10^6,"(W/L)")
+g_m=8*I_D;
+disp(g_m,"g_m (A/V)")
+r_o=2/I_D;
+disp(r_o,"r_o (ohm)")
+A_O=g_m*r_o;
+disp(A_O,"A_O (V/V)")
+C_gs=(2/3)*WbyL*0.4*0.4*5.8+0.6*WbyL*0.4;
+disp(C_gs,"C_gs (fF)")
+C_gd=0.6*WbyL*0.4;
+disp(C_gd,"C_gd (fF)")
+f_T=g_m/(2*%pi*(C_gs*10^-15+C_gd*10^-15));
+disp(f_T,"f_T (Hz)")
+f_t=g_m/(2*%pi*C_L)
+disp(f_t,"f_t (Hz)")
+disp("The data calculated for I_D = 100uA")
+I_D=100*10^-6; // (A)
+WbyL=0.12*I_D; // WbyL=(W/L)
+disp(WbyL*10^6,"(W/L)")
+g_m=8*I_D;
+disp(g_m,"g_m (A/V)")
+r_o=2/I_D;
+disp(r_o,"r_o (ohm)")
+A_O=g_m*r_o;
+disp(A_O,"A_O (V/V)")
+C_gs=(2/3)*WbyL*0.4*0.4*5.8+0.6*WbyL*0.4;
+disp(C_gs,"C_gs (fF)")
+C_gd=0.6*WbyL*0.4;
+disp(C_gd,"C_gd (fF)")
+f_T=g_m/(2*%pi*(C_gs*10^-15+C_gd*10^-15));
+disp(f_T,"f_T (Hz)")
+f_t=g_m/(2*%pi*C_L)
+disp(f_t,"f_t (Hz)")
+disp("The data calculated for I_D = 1mA")
+I_D=1*10^-3; // (A)
+WbyL=0.12*I_D; // WbyL=(W/L)
+disp(WbyL*10^6,"(W/L)")
+g_m=8*I_D;
+disp(g_m,"g_m (A/V)")
+r_o=2/I_D;
+disp(r_o,"r_o (ohm)")
+A_O=g_m*r_o;
+disp(A_O,"A_O (V/V)")
+C_gs=(2/3)*WbyL*0.4*0.4*5.8+0.6*WbyL*0.4;
+disp(C_gs,"C_gs (fF)")
+C_gd=0.6*WbyL*0.4;
+disp(C_gd,"C_gd (fF)")
+f_T=g_m/(2*%pi*(C_gs*10^-15+C_gd*10^-15));
+disp(f_T,"f_T (Hz)")
+f_t=g_m/(2*%pi*C_L)
+disp(f_t,"f_t (Hz)") \ No newline at end of file
diff --git a/68/CH6/EX6.4/ex4.sce b/68/CH6/EX6.4/ex4.sce
new file mode 100755
index 000000000..6cb6955e6
--- /dev/null
+++ b/68/CH6/EX6.4/ex4.sce
@@ -0,0 +1,21 @@
+// Example 6.4 : Design of the circuit with output current =100uA
+
+V_DD=3; // (V)
+I_REF=100*10^-6; // (A)
+I_D1=100*10^-6; // (A)
+L=1*10^-6; // (m)
+W=10*10^-6; // (m)
+V_t=0.7; // (V)
+k_n=200*10^-6; // k_n=k'_n (A/V^2)
+V_A=20; // V_A=V'_A (V)
+V_OV=sqrt(I_D1*2*L/(k_n*W));
+V_GS=V_t+V_OV;
+R=(V_DD-V_GS)/I_REF;
+V_Omin=V_OV;
+disp(V_Omin,"V_min (V)")
+r_o2=V_A/I_REF;
+disp(r_o2,"r_o2 (ohm)")
+V_O=V_GS;
+deltaV_O=1; // Change in V_O (V)
+deltaI_O=deltaV_O/r_o2; // Corresponding change in I_O (A)
+disp(deltaI_O,"The correspondng change in I_O (A)") \ No newline at end of file
diff --git a/68/CH6/EX6.5/ex5.sce b/68/CH6/EX6.5/ex5.sce
new file mode 100755
index 000000000..ea16be67b
--- /dev/null
+++ b/68/CH6/EX6.5/ex5.sce
@@ -0,0 +1,5 @@
+// Example 6.5 : Determine 3dB frequency
+// High frequency response of an amplifier can be characterized by th transfer function
+// F_H(s)=(1-s/10^5)/(1+s/10^4)(1+s/4*10^4)
+w_H=1/sqrt(1/10^8+1/(16*10^8)-2/10^10); // w_H=1/sqrt(1/w_P1^2+1/w_P2^2-2/w_Z1^2-2w_Z2^2)
+disp(w_H,"w_H (rad/s)") \ No newline at end of file
diff --git a/68/CH6/EX6.6/ex6.sce b/68/CH6/EX6.6/ex6.sce
new file mode 100755
index 000000000..3ff611de1
--- /dev/null
+++ b/68/CH6/EX6.6/ex6.sce
@@ -0,0 +1,17 @@
+// Example 6.6 : To determine midband gain and upper 3dB frequency
+R_in=420*10^3; // (ohm)
+R_sig=100*10^3; // (ohm)
+g_m=4*10^-3; // (mho)
+R_L=3.33*10^3; // R_L=R'_L (ohm)
+C_gs=1*10^-12; // F
+C_gd=C_gs;
+A_M=-R_in*g_m*R_L/(R_in+R_sig)
+disp(A_M,"Midband frequency gain A_M (V/V)")
+R_gs=R_in*R_sig/(R_in+R_sig);
+R=R_gs; //R=R'
+T_gs=C_gs*R_gs; // Oen circuit time constant of C_gs (s)
+R_gd=R+R_L+g_m*R_L*R;
+T_gd=R_gd*C_gd; // open circuit time constant of C_gd (s)
+w_H=1/(T_gs+T_gd); // upper 3dB frequency w_H
+f_H=w_H/(2*%pi);
+disp(f_H,"Upper 3dB frequency f_H (Hz)") \ No newline at end of file
diff --git a/68/CH6/EX6.7/ex7.sce b/68/CH6/EX6.7/ex7.sce
new file mode 100755
index 000000000..05a8e0203
--- /dev/null
+++ b/68/CH6/EX6.7/ex7.sce
@@ -0,0 +1,18 @@
+// Example 6.7 : Application of miller's theorem
+
+// 6.7a
+// By miller's theorem
+Z=1000*10^3; // (ohm)
+K=-100; // (V/V)
+R_sig=10*10^3; // (ohm)
+Z_1=Z/(1-K);
+disp(Z_1,"Z_1 (ohm)")
+Z_2=Z/(1-(1/K));
+disp(Z_2,"Z_2 (ohm)")
+VobyVsig=-100*Z_1/(Z_1+R_sig); // VobyVsig=(V_o/V_sig)
+disp(VobyVsig,"(V_o/V_sig) (V/V)")
+
+//6.7b
+// Applying miller's theorem
+f_3dB=1/(2*%pi*1.01*10^-6);
+disp(f_3dB,"f_3dB (Hz)") \ No newline at end of file
diff --git a/68/CH6/EX6.8/ex8.sce b/68/CH6/EX6.8/ex8.sce
new file mode 100755
index 000000000..ccea676cf
--- /dev/null
+++ b/68/CH6/EX6.8/ex8.sce
@@ -0,0 +1,35 @@
+// Example 6.8 : Analysis of CMOS CS amplifier
+k_n=200*10^-6; // (A/V^2)
+W=4*10^-6; // (m)
+L=0.4*10^-6; // (m)
+I_REF=100*10^-6; // (A)
+V_An=20; // (A)
+I_D1=0.1*10^-3; // (A)
+V_Ap=10; // (V)
+V_DD=3; // (V)
+I_D2=0.1*10^-3; // (A)
+V_tp=0.6; // (V)
+V_tn=0.6; // (V)
+g_m1=sqrt(2*k_n*(W/L)*I_REF);
+disp(g_m1,"g_m1 (A/V)")
+r_o1=V_An/I_D1;
+disp(r_o1,"r_o1 (ohm)")
+r_o2=V_Ap/I_D2;
+disp(r_o2,"r_o2 (ohm)")
+A_v=-g_m1*r_o1*r_o2/(r_o1+r_o2);
+disp(A_v,"A_v (v/V)")
+I_D=100*10^-6; // (A)
+k_n=65*10^-6; // (A/V^2)
+V_OV3=0.53; // (V)
+V_SG=V_tp+V_OV3;
+disp(V_SG,"V_SG (V)")
+V_OA=V_DD-V_OV3;
+disp(V_OA,"V_OA (V)")
+V_IB=0.93; // (V)
+V_IA=0.88; // (V)
+disp(V_IA,V_IB,"Coordinates of the extremities of the amplifier V_IB and V_IA")
+deltavI=V_IB-V_IA; // width of amplifier region
+V_OB=0.33; // (V)
+deltavO=V_OB-V_OA; // corresponding output range (V)
+deltavObydeltavI=-deltavO/deltavI; // Large signal voltage gain (V/V)
+disp(deltavObydeltavI,"Large signal voltage gain (V/V)") \ No newline at end of file
diff --git a/68/CH6/EX6.9/ex9.sce b/68/CH6/EX6.9/ex9.sce
new file mode 100755
index 000000000..394f547c2
--- /dev/null
+++ b/68/CH6/EX6.9/ex9.sce
@@ -0,0 +1,54 @@
+// Example 6.9: Analysis of CMOS CS amplifier
+// Consider CMOS open source amplifier
+I_D=100*10^-6; // (A)
+I_REF=I_D;
+uC_n=387*10^-6; // u_n*C_ox=uC_n (A/V^2)
+uC_p=86*10^-6; // u_n*C_ox=uC_n (A/V^2)
+W=7.2*10^-6; // (m)
+L=0.36*10^-6; // (m)
+V_An=5*10^-6; // (A)
+R_sig=10*10^3; // (ohm)
+V_OV=sqrt(2*I_D*L/(W*uC_n));
+g_m=I_D/(V_OV/2);
+disp(g_m,"g_m (A/V)")
+r_o1=5*0.36/(0.1*10^-3);
+disp(r_o1,"r_o1 (ohm)")
+r_o2=6*0.36/(.1*10^-3);
+disp(r_o2,"r_o2 (ohm)")
+R_L=r_o1*r_o2/(r_o1+r_o2);
+disp(R_L,"R_L (ohm)")
+A_m=-g_m*R_L;
+disp(A_m,"A_m (V/V)")
+C_gs=20*10^-15; // (F)
+C_gd=5*10^-15; // (F)
+C_in=C_gs+C_gd*(1+g_m*R_L); // using miller equivalence
+disp(C_in,"C_in (F)")
+f_H=1/(2*%pi*C_in*R_sig);
+disp(f_H,"f_H (Hz)")
+R_gs=10*10^3; // (ohm) using open circuit time constants methods
+R_L=9.82*10^3; // (ohm)
+R_gd=R_sig*(1+g_m*R_L) + R_L;
+disp(R_gd,"R_gd (ohm)")
+R_CL=R_L;
+T_gs=C_gs*R_gs;
+disp(T_gs,"T_gs (s)")
+T_gd=C_gd*R_gd;
+disp(T_gd,"T_gd (s)")
+C_L=25*10^-15;
+T_CL=C_L*R_CL;
+disp(T_CL,"T_CL (s)")
+T_H=T_gs+T_gd+T_CL;
+disp(T_H,"T_H (s)")
+f_H=1/(2*%pi*T_H); // 3dB frequency
+disp(f_H,"f_H (Hz)")
+f_Z=g_m/(2*%pi*C_gd); // frequency of the zero
+disp(f_Z,"f_Z (Hz)")
+// Denominator polynomial
+p=poly([1 1.16*10^-9 0.0712*10^-18],'s','coeff')
+disp(p,"Denominator polynomial")
+s=roots(p);
+f_P2=s(2)/(-2*%pi);
+f_P1=s(1)/(-2*%pi)
+disp(f_P2,f_P1, "The frequencies f_P1 (Hz) and f_P2 (Hz) are found as the roots of the denominator frequency")
+f_H=f_P1;
+disp(f_H,"Another estimate for f_H (Hz)") \ No newline at end of file
diff --git a/68/CH7/EX7.1/ex1.sce b/68/CH7/EX7.1/ex1.sce
new file mode 100755
index 000000000..b5d0b2c8c
--- /dev/null
+++ b/68/CH7/EX7.1/ex1.sce
@@ -0,0 +1,38 @@
+// Example 7.1 Analysis of differential amplifier
+// Consider the differential amplifier
+B=100; // beta value
+
+// 7.1a
+V_T=0.025; // (V)
+I_E=0.0005; // (A)
+R_E=150; // (ohm)
+r_e1=V_T/I_E; // emitter resistance (ohm)
+r_e2=r_e1; // emitter resistance (ohm)
+r_e=r_e1;
+R_id=2*(B+1)*(r_e+R_E);
+disp(R_id,"The input differential resistance R_id (ohm)")
+
+// 7.1b
+R_id=40000; // (ohm)
+R_sig=5000; // (ohm)
+R_C=10000; // (ohm)
+R_E=150; // (ohm)
+A_v=R_id/(R_id+R_sig); // A_v= v_o/v_sig (V/V)
+A_V=2*R_C/(2*(r_e+R_E)); // A_V= v_o/v_id (V/v)
+A_d=A_v*A_V; // A_d=v_o/v_sig (V/V)
+disp(A_d,"Overall differential voltage gain (V/V)")
+
+// 7.1c
+R_EE=200000; // (ohm)
+deltaR_C=0.02*R_C; // in the worst case
+A_cm=R_C*deltaR_C/(2*R_EE*R_C)
+disp(A_cm,"Worst case common mode gain (V/V)")
+
+// 7.1d
+CMRR=20*log10(A_d/A_cm)
+disp(CMRR,"CMRR in dB")
+
+// 7.1e
+r_o=200000; //(ohm)
+R_icm=(B+1)*(R_EE*r_o/2)/(R_EE+r_o/2);
+disp(R_icm,"Input common mode resistance (ohm)") \ No newline at end of file
diff --git a/68/CH7/EX7.2/ex2.sce b/68/CH7/EX7.2/ex2.sce
new file mode 100755
index 000000000..6601f8a17
--- /dev/null
+++ b/68/CH7/EX7.2/ex2.sce
@@ -0,0 +1,57 @@
+// Example 7.2 : Analysis of Active loaded MOS differential amplifier
+W=7.2*10^-6; // (m)
+L=0.36*10^-6; // (m)
+C_gs=29*10^-15; // (F)
+C_gd=5*10^-15; // (F)
+C_db=5*10^-15; // (F)
+uC_n=387*10^-6; // uC_n=u_nC_ox (A/V^2)
+uC_p=86*10^-6; // uC_p=u_pC_ox (A/V^2)
+V_an=5; // V_an=V'_An (V/um) (V)
+V_ap=6; // V_ap=V'_Ap (V/um) (V)
+I=0.2*10^-3; // (A)
+R_SS=25000; // (ohm)
+C_SS=0.2*10^-12; // (F)
+C_S=25*10^-15; // (F)
+K_n=uC_n*W/L;
+I_D=100*10^-6; // bias current (A)
+V_OV=sqrt(2*I_D/K_n);
+g_m=I/V_OV;
+g_m1=g_m;
+g_m2=g_m;
+r_o1=V_an*0.36/(0.1*10^-3);
+r_o2=r_o1;
+K_p=uC_p*W/L;
+V_OV34=sqrt(2*I_D/K_p); // V_OV3,4
+g_m3=2*0.1*10^-3/V_OV34;
+g_m4=g_m3;
+r_o3=V_ap*0.36/(0.1*10^-3);
+r_o4=r_o3;
+A_d=g_m*(r_o2*r_o4)/(r_o2+r_o4);
+disp(A_d,"A_d (V/V)")
+A_cm=-1/(2*g_m3*R_SS);
+disp(A_cm,"A_cm (V/V)")
+CMRR=20*log10(-A_d/A_cm); // negative sign to make A_cm positive
+disp(CMRR,"CMRR in dB")
+C_gd1=5*10^-15; // (F)
+C_db1=5*10^-15; // (F)
+C_db3=5*10^-15; // (F)
+C_gs3=20*10^-15; // (F)
+C_gs4=20*10^-15; // (F)
+C_m=C_gd1+C_db1+C_db3+C_gs3+C_gs4;
+C_gd2=5*10^-15; // (F)
+C_db2=5*10^-15; // (F)
+C_gd4=5*10^-15; // (F)
+C_db4=5*10^-15; // (F)
+C_x=25*10^-15; // (F)
+C_L=C_gd2+C_db2+C_gd4+C_db4+C_x;
+disp("poles and zeroes of A_d")
+R_o=r_o2*r_o4/(r_o2+r_o4)
+f_p1=1/(2*%pi*C_L*R_o);
+disp(f_p1,"f_p1 (Hz)")
+f_p2=g_m3/(2*%pi*C_m);
+disp(f_p2,"f_p2 (Hz)")
+f_Z=2*f_p2;
+disp(f_Z,"f_Z (Hz)")
+disp("Dominant pole of CMRR is at location of commom-mode gain zero")
+f_Z=1/(2*%pi*C_SS*R_SS);
+disp(f_Z,"f_Z (Hz)") \ No newline at end of file
diff --git a/68/CH7/EX7.3/ex3.sce b/68/CH7/EX7.3/ex3.sce
new file mode 100755
index 000000000..ea4d9db8b
--- /dev/null
+++ b/68/CH7/EX7.3/ex3.sce
@@ -0,0 +1,134 @@
+// Example 7.3 : To determine all parameters for different transistor
+I_REF=90*10^-6; // (A)
+V_tn=0.7; // (V)
+V_tp=0.8; // Magnitude is cconsidered
+uC_n=160*10^-6; // uC_n=u_n*C_ox
+uC_p=40*10^-6; // uC_p=u_p*C_ox
+V_A=10; // (V)
+V_DD=2.5; // (V)
+V_SS=2.5; // (V)
+L=0.8*10^-6; // (m)
+r_o2=222; // (ohm)
+r_o4=222; // (ohm)
+g_m1=0.3; // (mho)
+A_1=-g_m1*r_o2*r_o4/(r_o2+r_o4);
+disp(A_1,"A_1 (V/V)")
+r_o6=111; // (ohm)
+r_o7=111; // (ohm)
+g_m6=0.6; // (mho)
+A_2=-g_m6*r_o6*r_o7/(r_o6+r_o7);
+disp(A_2,"A_2 (V/V)")
+disp("For Q_1")
+W=20*10^-6; // (m)
+I_D=I_REF/2; // (A)
+disp(I_D,"I_D (A)")
+K_p=uC_p*W/L;
+V_OV=sqrt(2*I_D/K_p);
+disp(V_OV,"V_OV (V)")
+V_GS=V_tp+V_OV;
+disp(V_GS,"V_GS (V)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+disp("For Q_2")
+W=20*10^-6; // (m)
+I_D=I_REF/2; // (A)
+disp(I_D,"I_D (A)")
+K_p=uC_p*W/L;
+V_OV=sqrt(2*I_D/K_p);
+disp(V_OV,"V_OV (V)")
+V_GS=V_tp+V_OV;
+disp(V_GS,"V_GS (V)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+disp("For Q_3")
+W=5*10^-6; // (m)
+I_D=I_REF/2; // (A)
+disp(I_D,"I_D (A)")
+K_n=uC_n*W/L;
+V_OV=sqrt(2*I_D/K_n);
+disp(V_OV,"V_OV (V)")
+V_GS=V_tn+V_OV;
+disp(V_GS,"V_GS (V)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+disp("For Q_4")
+W=5*10^-6; // (m)
+I_D=I_REF/2; // (A)
+disp(I_D,"I_D (A)")
+K_n=uC_n*W/L;
+V_OV=sqrt(2*I_D/K_n);
+disp(V_OV,"V_OV (V)")
+V_GS=V_tn+V_OV;
+disp(V_GS,"V_GS (V)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+disp("For Q_5")
+W=40*10^-6; // (m)
+I_D=I_REF; // (A)
+disp(I_D,"I_D (A)")
+K_p=uC_p*W/L;
+V_OV=sqrt(2*I_D/K_p);
+disp(V_OV,"V_OV (V)")
+V_GS=V_tp+V_OV;
+disp(V_GS,"V_GS (V)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+disp("For Q_6")
+W=10*10^-6; // (m)
+I_D=I_REF;
+disp(I_D,"I_D (A)")
+K_n=uC_n*W/L;
+V_OV=sqrt(2*I_D/K_n);
+disp(V_OV,"V_OV (V)")
+V_GS=V_tn+V_OV;
+disp(V_GS,"V_GS (V)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+disp("For Q_7")
+W=40*10^-6; // (m)
+I_D=I_REF;
+disp(I_D,"I_D (A)")
+K_p=uC_p*W/L;
+V_OV=sqrt(2*I_D/K_p);
+disp(V_OV,"V_OV (V)")
+V_GS=V_tp+V_OV;
+disp(V_GS,"V_GS (V)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+disp("For Q_8")
+W=40*10^-6; // (m)
+I_D=I_REF;
+disp(I_D,"I_D (A)")
+K_p=uC_p*W/L;
+V_OV=sqrt(2*I_D/K_p);
+disp(V_OV,"V_OV (V)")
+V_GS=V_tp+V_OV;
+disp(V_GS,"V_GS (V)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+A_O=A_1*A_2;
+disp(20*log10(A_O),"The dc open loop gain in dB")
+v_ICMmin=-2.5+1;
+disp(v_ICMmin,"Lower limit of input common-mode (V)")
+v_ICMmax=2.2-1.1;
+disp(v_ICMmax,"Upper limit of input common-mode (V)")
+v_Omax=V_DD-V_OV;
+disp(v_Omax,"Highest allowable output voltage (V)")
+v_Omin=-V_SS+V_OV;
+disp(v_Omin,"Lowest allowable output voltage (V)") \ No newline at end of file
diff --git a/68/CH7/EX7.5/ex5.sce b/68/CH7/EX7.5/ex5.sce
new file mode 100755
index 000000000..12e9d18a9
--- /dev/null
+++ b/68/CH7/EX7.5/ex5.sce
@@ -0,0 +1,41 @@
+// Example 7.5 : Analysis of given circuit
+B=100; // beta value
+I_E=0.2510^-3; // (A)
+R_1=20000; // (ohm)
+R_2=20000; // (ohm)
+R_3=3000; // (ohm)
+R_4=2300; // (ohm)
+R_5=15700; // (ohm)
+R_6=3000; // (ohm)
+r_e1=25/0.25; // (ohm)
+r_e2=r_e1; // (ohm)
+r_pi1=(B+1)*r_e1;
+r_pi2=(B+1)*r_e2;
+R_id=r_pi1+r_pi2;
+disp(R_id,"Input differential resistance (ohm)")
+I_E=1*10^-3;
+r_e4=25/1;
+r_e5=r_e4;
+r_pi4=(B+1)*r_e4;
+r_pi5=(B+1)*r_e5;
+R_i2=r_pi4+r_pi5;
+disp(R_i2,"Input resistance of the second stage R_i2 (ohm)")
+A_1=(R_i2*(R_1+R_2)/((R_i2+R_1+R_2)*(r_e1+r_e2)))
+disp(A_1,"Voltage gain of the first stage (V/V)")
+r_e7=25/1;
+R_i3=(B+1)*(R_4+r_e7);
+disp(R_i3,"Input resistance of the third stage R_i3 (ohm)")
+A_2=(-R_3*R_i3)/((R_3+R_i3)*(r_e4+r_e5));
+disp(A_2,"Voltage gain of the second stage (V/V)")
+r_e8=25/5;
+R_i4=(B+1)*(r_e8+R_6);
+disp(R_i4,"Input resistance of the third stage R_i2 (ohm)")
+A_3=(-R_5*R_i4)/((R_5+R_i4)*(r_e7+R_4));
+disp(A_3,"Voltage gain of the third stage (V/V)")
+A_4=R_6/(R_6+r_e8);
+disp(A_4,"Voltage gain of the fourth stage (V/V)")
+A=A_1*A_2*A_3*A_4 ; // A=v_o/v_id (V/V)
+disp(A,"Overall output gain (V/V)")
+disp(20*log10(A),"Overall output gain in dB")
+R_o=R_6*(r_e8+R_5/(B+1))/(R_6+r_e8+R_5/(B+1))
+disp(R_o,"Output resistance (ohm)") \ No newline at end of file
diff --git a/68/CH8/EX8.1/ex1.sce b/68/CH8/EX8.1/ex1.sce
new file mode 100755
index 000000000..adc66e534
--- /dev/null
+++ b/68/CH8/EX8.1/ex1.sce
@@ -0,0 +1,23 @@
+// Example 8.1: Analysis of op amp connected in an inverting configuration
+// By inspection we can write down the expressions for A, B , closed loop gain , the input resistance and the output resistance
+u=10^4; // (ohm)
+R_id=100*10^3; // (ohm)
+r_o=1000; // (ohm)
+R_L=2000; // (ohm)
+R_1=1000; // (ohm)
+R_2=10^6; // (ohm)
+R_S=10000; // (ohm)
+A=u*(R_L*(R_1+R_2)/(R_L+R_1+R_2))*R_id/(((R_L*(R_1+R_2))/(R_L+R_1+R_2)+r_o)*(R_id+R_S+(R_1*R_2)/(R_1+R_2)))
+disp(A,"Voltage gain without feedback (V/V)")
+B=R_1/(R_1+R_2); // Beta value
+disp(B, "Beta value ")
+A_f=A/(1+A*B);
+disp(A_f,"Voltage gain with feedback (V/V)")
+R_i=R_S+R_id+(R_1*R_2/(R_1+R_2))// Input resistance of the A circuit in fig 8.12a of textbook
+R_if=R_i*7;
+R_in=R_if-R_S;
+disp(R_in,"Input resistance (ohm)")
+R_o=1/(1/r_o+1/R_L+1/(R_1+R_2));
+R_of=R_o/(1+A*B);
+R_out=R_of*R_L/(R_L-R_of);
+disp(R_out,"the output resistance (ohm)") \ No newline at end of file
diff --git a/68/CH8/EX8.2/ex2.sce b/68/CH8/EX8.2/ex2.sce
new file mode 100755
index 000000000..75738c2e4
--- /dev/null
+++ b/68/CH8/EX8.2/ex2.sce
@@ -0,0 +1,42 @@
+// Example 8.2: Feedback triple
+// Consider the given three stage series-series feedback
+h_fe=100;
+g_m2=40*10^-3; // (A/V)
+r_e1=41.7; // (ohm)
+a_1=0.99; // alpha value
+R_C1=9000; // (ohm)
+R_E1=100; //(ohm)
+R_F=640; // (ohm)
+R_E2=100; //(ohm)
+r_pi2=h_fe/g_m2;
+R_C2=5000; // (ohm)
+r_e3=6.25; // (ohm)
+R_C3=800; //(ohm)
+// First stage gain A_1=V_c1/V_i
+A_1=-a_1*R_C1*r_pi2/((R_C1+r_pi2)*(r_e1+((R_E1*(R_F+R_E2))/(R_E1+R_F+R_E2))))
+disp(A_1,"The voltage gain of the first stage (V/V)")
+// Gain of the second stage A_2=Vc2/V_c1
+A_2=-g_m2*{(R_C2*(h_fe+1)/(R_C2+h_fe+1))*[r_e3+(R_E2*(R_F+R_E1))/(R_E2+R_F+R_E1)]}
+disp(A_2,"The second stage gain (V/V)")
+// Third stage gain A_3 I_O/V_i
+A_3=1/(r_e3+(R_E2*(R_F+R_E1)/(R_E2+R_F+R_E1)));
+disp(A_3,"The third stage gain (V/V)")
+A=A_1*A_2*A_3; // combined gain
+disp(A,"Combined gain (V/V)")
+B=R_E1*R_E2/(R_E2+R_F+R_E1);
+disp(B,"Beta value")
+A_f=A/(1+A*B);
+disp(A_f,"Closed loop gain (A/V)")
+A_v=-A_f*R_C3; // Voltage gain
+disp(A_v,"Voltage gain (V/V)")
+R_i=(h_fe+1)*(r_e1+(R_E1*(R_F+R_E2))/(R_E1+R_F+R_E2));
+R_if=R_i*(1+A*B);
+disp(R_if,"Input resistance (ohm)")
+R_o=(R_E2*(R_F+R_E1)/(R_F+R_E1+R_E2))+r_e3+R_C2/(h_fe+1);
+R_of=R_o*(1+A*B);
+disp(R_of,"Output voltage (ohm)")
+r_o=25000; // (ohm)
+g_m3=160*10^-3; // (mho)
+r_pi3=625; // (ohm)
+R_out=r_o+(1+g_m3*r_o)*R_of*r_pi3/(R_of+r_pi3);
+disp(R_out,"R_out (ohm)") \ No newline at end of file
diff --git a/68/CH8/EX8.3/ex3.sce b/68/CH8/EX8.3/ex3.sce
new file mode 100755
index 000000000..91dff4c46
--- /dev/null
+++ b/68/CH8/EX8.3/ex3.sce
@@ -0,0 +1,21 @@
+// Example 8.3 : Small signal analysis
+B=100; // beta value
+I_B=0.015*10^-3; // (A)
+I_C=1.5*10^-3; // (A)
+V_C=4.7; // (V)
+g_m=40*10^-3;
+R_f=47000;
+R_S=10000;
+R_C=4700;
+r_pi=B/g_m;
+A=-358.7*10^3; // V_o/I_i= -g_m(R_f||R_C)(R_S||R_F||r_pi)
+R_i=1400; // R_i=R_S||R_f||r_pi (ohm)
+R_o=R_C*R_f/(R_C+R_f);
+B=-1/R_f;
+A_f=A/(1+A*B); // V_o/I_s
+A_v=A_f/R_S; // V_o/V_s
+disp(A_v,"The gain (V/V)")
+R_if=R_i/(1+A*B);
+disp(R_if,"R_if (ohm)")
+R_of=R_o/(1+A*B);
+disp(R_of,"R_of (ohm)") \ No newline at end of file
diff --git a/68/CH8/EX8.4/ex4.sce b/68/CH8/EX8.4/ex4.sce
new file mode 100755
index 000000000..3b9cc058a
--- /dev/null
+++ b/68/CH8/EX8.4/ex4.sce
@@ -0,0 +1,29 @@
+// Example 8.4: Small signal analysis
+R_S=10*10^3; // (ohm)
+R_B1=100*10^3; // (ohm)
+R_B2=15*10^3; // (ohm)
+R_C1=10*10^3; // (ohm)
+R_E1=870; // (ohm)
+R_E2=3400; // (ohm)
+R_C2=8000; // (ohm)
+R_L=1000; // (ohm)
+R_f=10000; // (ohm)
+B=100; // beta value
+V_A=75; // (V)
+A=-201.45 // I_o/I_i (A/A)
+R_i=1535; // (ohm)
+R_o=2690; // (ohm)
+B=-R_E2/(R_E2+R_f);
+R_if=R_i/(1+A*B);
+disp(R_if)
+R_in=1/((1/R_if)-(1/R_S));
+disp(R_in, "R_in (ohm)")
+A_f=A/(1+A*B); // I_o/I_S
+gain=R_C2*A_f/(R_C2+R_L); // I_o/I_S
+disp(gain,"I_o/I_S (A/A)")
+R_of=R_o*(1+A*B); // (ohm)
+r_o2=75/0.0004; // (ohm)
+g_m2=0.016; // (A/V)
+r_pi2=6250; // (ohm)
+R_out=r_o2*[1+g_m2*(r_pi2*R_of/(r_pi2+R_of))]
+disp(R_out,"R_out (ohm)") \ No newline at end of file
diff --git a/68/CH9/EX9.1/ex1.sce b/68/CH9/EX9.1/ex1.sce
new file mode 100755
index 000000000..46ce239cc
--- /dev/null
+++ b/68/CH9/EX9.1/ex1.sce
@@ -0,0 +1,54 @@
+// Example 9.1 Design of two-stage CMOS op-amp
+A_v=4000; // (V/V)
+V_A=20; // (V)
+k_p=80*10^-6; // k'_n=k_n (A/V^2)
+k_n=200*10^-6; // k'_p=k_P (A/V^2)
+V_SS=1.65; // (V)
+V_DD=1.65; // (V)
+V_tn=0.5; // (V)
+V_tp=0.5; // (V)
+C_1=0.2*10^-12; // (F)
+C_2=0.8*10^-12; // (F)
+I_D=100*10^-6; // (A)
+V_OV=sqrt(V_A^2/A_v);
+WbyL_1=I_D*2/(V_OV^2*k_p); // WbyL_1=(W/L)_1
+disp(WbyL_1,"Required (W/L) ratio for Q_1")
+WbyL_2=WbyL_1; // WbyL_2=(W/L)_2
+disp(WbyL_2,"Required (W/L) ratio for Q_2")
+WbyL_3=I_D*2/(V_OV^2*k_n); // WbyL_3=(W/L)_3
+disp(WbyL_3,"Required (W/L) ratio for Q_3")
+WbyL_4=WbyL_3; // WbyL_4=(W/L)_4
+disp(WbyL_4,"Required (W/L) ratio for Q_4")
+I_D=200*10^-6;
+WbyL_5=I_D*2/(V_OV^2*k_p); // WbyL_5=(W/L)_5
+disp(WbyL_5,"Required (W/L) ratio for Q_5")
+I_D=500*10^-6;
+WbyL_7=2.5*WbyL_5; // WbyL_7=(W/L)_7
+disp(WbyL_7,"Required (W/L) ratio for Q_7")
+WbyL_6=I_D*2/(V_OV^2*k_n); // WbyL_6=(W/L)_6
+disp(WbyL_6,"Required (W/L) ratio for Q_6")
+WbyL_8=0.1*WbyL_5; // WbyL_8=(W/L)_8
+disp(WbyL_8,"Required (W/L) ratio for Q_8")
+V_ICMmin=-V_SS+V_OV+V_tn-V_tp;
+disp(V_ICMmin,"The lowest value of input common mode voltage")
+V_ICMmax=V_DD-V_OV-V_OV-V_tp;
+disp(V_ICMmax,"The highest value of input common mode voltage")
+v_omin=-V_SS+V_OV;
+disp(v_omin,"The lowest value of output swing allowable")
+v_omax=V_DD-V_OV;
+disp(v_omax,"The highest value of output swing allowable")
+R_o=20/(2*0.5);
+disp(R_o,"Input resistance is practically infinite and output reistance is (ohm)")
+G_m2=2*I_D/V_OV;
+disp(G_m2,"G_m2 (A/V)")
+f_P2=3.2*10^-3/(2*%pi*C_2);
+disp(f_P2,"f_P2 (Hz)")
+R=1/G_m2;
+disp(R,"To move the transmission zero to s=infinite , r value selected as (ohm)")
+f_t=f_P2*tand(15); // Phase margin of 75 degrees , thus phase shift due to seccond pole must be 15 degrees
+disp(f_t,"f_t (Hz)")
+G_m1=2*100*10^-6/V_OV; // I_D = 100uA
+C_C1=G_m1/(2*%pi*f_t);
+disp(C_C1,"C_C1 (F)")
+SR=2*%pi*f_t*V_OV;
+disp(SR,"SR (V/s)") \ No newline at end of file
diff --git a/68/CH9/EX9.2/ex2.sce b/68/CH9/EX9.2/ex2.sce
new file mode 100755
index 000000000..b1ca52eb8
--- /dev/null
+++ b/68/CH9/EX9.2/ex2.sce
@@ -0,0 +1,145 @@
+// Example 9.2 : To determine A_v,f_t,f_P,SR and P_D of folded cascode amplifier
+// Consider a design of the folded-cascode op amp
+I=200*10^-6; // (A)
+I_B=250*10^-6; // (A)
+V_OV=0.25; // (V)
+k_n=100*10^-6; // k_n=k'_n (A/V^2)
+k_p=40*10^-6; // k_p=k'_p (A/V^2)
+V_A=20; // V_A=V'_A (V/um)
+V_DD=2.5; // (V)
+V_SS=2.5; // (V)
+V_t=0.75; // (V)
+L=1*10^-6; // (m)
+C_L=5*10^-12; // (F)
+disp("Data calculated for Q1")
+I_D=I/2;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_n*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q2")
+I_D=I/2;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_n*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q3")
+I_D=I_B-I/2;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_p*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q4")
+I_D=I_B-I/2;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_p*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q5")
+I_D=I_B-I/2;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_n*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q6")
+I_D=I_B-I/2;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_n*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q7")
+I_D=I_B-I/2;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_n*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q8")
+I_D=I_B-I/2;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_n*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q9")
+I_D=I_B;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_p*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q10")
+I_D=I_B;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_p*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+disp("Data calculated for Q11")
+I_D=I;
+disp(I_D,"I_D (A)")
+g_m=2*I_D/V_OV;
+disp(g_m,"g_m (A/V)")
+r_o=V_A/I_D;
+disp(r_o,"r_o (ohm)")
+WbyL=2*I_D/(k_n*V_OV^2); // WbyL =W/L
+disp(WbyL,"W/L")
+gmro=160; // gmro=g_m*r_o
+disp(gmro,"g_m*r_o for all transistors is (V/V)")
+V_GS=1;
+disp(V_GS,"V_GS for all transistors is (V)")
+V_ICMmin=-V_SS+V_OV+V_OV+V_t;
+disp(V_ICMmin,"The lowest value of input common mode voltage (V)")
+V_ICMmax=V_DD-V_OV+V_t;
+disp(V_ICMmax,"The highest value of input common mode voltage (V)")
+v_omin=-V_SS+V_OV+V_OV+V_t;
+disp(v_omin,"The lowest value of output swing allowable (V)")
+v_omax=V_DD-V_OV-V_OV;
+disp(v_omax,"The highest value of output swing allowable (V)")
+r_o2=200*10^3; // r_o calculated for Q2
+r_o10=80*10^3; // r_o calculated for Q10
+R_o4=gmro*(r_o2*r_o10)/(r_o2+r_o10);
+r_o8=133333; // r_o calculated for Q8
+R_o6=gmro*r_o8;
+R_o=R_o4*R_o6/(R_o4+R_o6);
+disp(R_o,"Output resistance (ohm)")
+G_M=0.0008;
+A_v=G_M*R_o;
+disp(A_v,"Voltage gain (V/V)")
+f_t=G_M/(2*%pi*C_L);
+disp(f_t,"Unity gain bandwidth (Hz)")
+f_P=f_t/A_v;
+disp(f_P,"Dominant pole frequency (Hz)")
+SR=I/C_L;
+disp(SR,"Slew Rate (V/s)")
+I_t=0.5*10^-3; // total current
+V_S=5; // Supply voltage
+P_D=I_t*V_S;
+disp(P_D,"Power dissipated (W)")
+
diff --git a/68/CH9/EX9.3/ex3.sce b/68/CH9/EX9.3/ex3.sce
new file mode 100755
index 000000000..4cbc99cb9
--- /dev/null
+++ b/68/CH9/EX9.3/ex3.sce
@@ -0,0 +1,9 @@
+// Example 9.3 : To determine input offset voltage
+r_e=2.63*10^3; // (ohm)
+R=1000; // (ohm)
+I=9.5*10^-6; // (A)
+deltaRbyR=0.02; // 2% mismatch between R_1 and R_2
+G_m1=10^-3/5.26; // (A/V)
+deltaI=deltaRbyR/(1+deltaRbyR + r_e/R); // Change of deltaI in I_E (A)
+V_OS=deltaI/G_m1;
+disp(V_OS,"Offset voltage (V)") \ No newline at end of file