# Chapter 2 The fundamentals of Electronics: A Review¶

## Example 2.1 Page no 31¶

In :
#given
vout=750*10**-3
vin = 30*10**-6

#calculation
gain=vout/vin

#Result
print"The Voltage gain of the amplifier is ",gain

The Voltage gain of the amplifier is  25000.0


## Example 2.2 Page no 31¶

In :
#given
pout=6
power_gain=80.0

#calculation
pin=pout/power_gain

#Result
print"The input power of the signal is ",pin*1000,"mW"

The input power of the sigmal is  75.0 mW


## Example 2.3 Page no 32¶

In :
#given
A1=5;
A2=2;
A3=17;
total_gain=A1*A2*A3;
pin= 40*10**-3;

#calculation
pout=total_gain*pin;

#Result
print"The output power is",pout,"watts"

The output power is 6.8 watts


## Example 2.4 Page no 32¶

In :
#given
pin=25.0*10**-6;
pout=1.5*10**-3;
A1=3.0;

#Calculation
total_gain=pout/pin;
print"Total gain is",total_gain
A2=total_gain/A1

#Result
print"The gain of second stage is ",A2

Total gain is 60.0
The gain of second stage is  20.0


## Example 2.5 Page no 34¶

In :
#given
R1=10.0*10**3;
R2=470.0;

#Calculation
attenuation=R2/(R2+R1)
A2=1/attenuation

#Result
print"(a) The attenuation (A1) is",round(attenuation,3)
print"(b) The attenuation (A2) is",round(A2,1)

(a) The attenuation (A1) is 0.045
(b) The attenuation (A2) is 22.3


## Example 2.6 Page no 35¶

In :
#given
Vin=20.0*10**-6;
Vout=100*10**-3;
A1=45000.0                                #A1 isAmplifier gain

#calculation
AT=Vout/Vin                                #AT is Total gain
A2=AT/A1                                   #A2 is attenuation factor

#Result
print"Total gain is",AT
print"The atenuation factor needed to to keep the output voltage from exceeding 100 mv is ",round(A2,4)

Total gain is 5000.0
The atenuation factor needed to to keep the output voltage from exceeding 100 mv is  0.1111


## Example 2.7 Page no 36¶

In :
#given
Vin=3.0*10**-3
Vout=5
Pin=50.0*10**-3
Pout=2*10**-3

#calculation
import math
gain_dB= 20*log10 (Vout/Vin)
gain_db=10*log10 (Pout/Pin)

#Result
print"(a) The gain of amplifier in dB is ",round(gain_dB,1)
print"(b) The gain in dB is ",round(gain_db,2)

(a) The gain of amplifier in dB is  64.4
(b) The gain in dB is  -13.98


## Example 2.8 Page no 38¶

In :
#given
gain_dB = 40
pout_W= 100

#calculation
pin_W = pout_W/10.0**4

#Result
print"The input power is ",pin_W,"Watt"


The input power is  0.01 Watt


## Example 2.9 Page no 38¶

In :
#given

gain_db = 60
vin = 50*10**-6

#calculation
vout = 10**(60/20.0)*vin

#Result
print"The output voltage is ",vout,"volt"

The output voltage is  0.05 volt


## Example 2.10 Page no 39¶

In :
#given

vin=90*10**-3
R1= 10.0*10**3
vout=7.8
Rout=8.0

#calculation
pin= vin**2/R1
pout=vout**2/Rout

import math
Ap_db = 10*log10 (pout/pin)

#Result
print"The power gain in decibel is ",round(Ap_db,1),"dB"

The power gain in decibel is  69.7 dB


## Example 2.11 Page no 40¶

In :
#given

gain_db = 28
pin = 36*10**-3

#calculation
pout = 10**2.8*pin;

#Result
print"The output power is ",round(pout,2),"watt"

The output power is  22.71 watt


## Example 2.12 Page no 40¶

In :
#given
gain1 = 6.8
gain2 = 14.3
attenuation1 = -16.4
attenuation2 = -2.9
vout = 800*10**-3

#calculation
At = gain1+gain2+attenuation1+attenuation2
vin = vout/10.0**(At/20.0)

#Result
print"The input voltage is ",round(vin*10**3,1),"mv"

The input voltage is  650.3 mv


## Example 2.13 Page no 40¶

In :
#given
pout_db =12.3

#calculation
pout_mW = 0.001*10**(12.3/10.0)

#Result
print"The output power is " ,round(pout_mW*10**3,0),"mv"

The output power is  17.0 mv


## Example 2.14 Page no 46¶

In :
#given
c = 2.7*10**-12
l = 33*10**-9

#calculation
fr= 1/(6.28*(l*c)**0.5)

#Result
print"The resonat frequency is " ,round(fr/10.0**6,0),"Mhz"

The resonat frequency is  533.0 Mhz


## Example 2.15 Page no 47¶

In :
#given
c =12*10**-12
fr = 49*10**6

#calculation
l=1/(4*3.14**2*fr**2*c)

#Result
print"The value of inductance is " ,round(l*10**9,0),"nh"

The value of inductance is  880.0 nh


## Example 2.16 Page no 49¶

In :
#given
fr=28*10**6
Q=70.0

#calculation
bandwidth = fr/Q

#Result
print"The bandwidth is ",bandwidth/10.0**3,"Khz"

The bandwidth is  400.0 Khz


## Example 2.17 Page no 50¶

In :
#given
f1= 7.93*10**6
f2= 8.07*10**6

#calculation
bw= f2-f1
fr=(f1*f2)**0.5
Q= fr/bw

#Result
print"(a) The bandwidth is ",bw/10.0**3,"Khz"
print"(b) The resonant frequency is ",round(fr/10.0**6,0),"Mhz"
print"(c) The Q of resonant circuit is ",round(Q,2)

(a) The bandwidth is  140.0 Khz
(b) The resonant frequency is  8.0 Mhz
(c) The Q of resonant circuit is  57.14


## Example 2.18 Page no 50¶

In :
#given
Q=200.0
fr=16*10**6

#calculation
bw=fr/Q
f1= fr-(bw/2)
f2=fr+(bw/2)

#Result
print"Bandwidth is ",bw*10**-3,"KHz"
print"f1= ",f1*10**-6,"MHz"
print"f2= ",f2*10**-6,"MHz"

Bandwidth is  80.0 KHz
f1=  15.96 MHz
f2=  16.04 MHz


## Example 2.19 Page no 52¶

In :
#given
Q= 150
Vs=3*10**-6

#calculation
Vc= Q*Vs

#Result
print"The voltage across capacitor is ",Vc*10**6,"microvolt"

The voltage across capacitor is  450.0 microvolt


## Example 2.20 Page no 54¶

In :
#given
fr= 52*10**6
Q=12.0
L=0.15*10**-6

#calculation
Rw=(6.28*fr*L)/Q
Req= Rw*(Q**2+1)

#Result
print"Impedance of the parellel LC circuit is ",round(Req,0),"ohm"

Impedance of the parellel LC circuit is  592.0 ohm


## Example 2.21 Page no 54¶

In :
#given
fr= 52.0*10**6
Rw= 4.1
L =0.15*10**-6

#calculation
C=1/(4.0*3.14**2*fr**2*L)
Z = L/(C*Rw)

#Result
print"the impedance of the circuit is ",round(Z,0),"ohm"

the impedance of the circuit is  585.0 ohm


## Example 2.22 Page no 55¶

In :
#given
bw = 1.0*10**6
XL = 300
Rw = 10.0
fr =10*10**6

#calculation
Q1 = XL/Rw
Rp = Rw*(Q1**2+1)

Q2 = fr/bw
Rpnew = Q2*XL

Rext = (Rpnew*Rp)/(Rp-Rpnew)

#Result
print"The value of resistor needed to set the bandwidth of the parellel tuned circuit is ",round(Rext,1),"ohm"

The value of resistor needed to set the bandwidth of the parellel tuned circuit is  4497.5 ohm


## Example 2.23 Page no 57¶

In :
#given
R = 8.2*10**3
C =0.0033*10**-6

#calculation
fco = 1/(6.28* R*C)

#Result
print"The cut off frequency is ",round(fco/10.0**3,2),"Khz"

The cut off frequency is  5.88 Khz


## Example 2.24 Page no 60¶

In :
#given
fco =3.4*10**3
C = 0.047*10**-6

#calculation
R = 1/(6.28* fco* C)

#Result
print"The value of the resistor is ",round(R,0),"ohm"
print"The closest standard value is ", 1000 ,"ohm"

The value of the resistor is  996.0 ohm
The closest standard value is  1000 ohm


## Example 2.25 Page no 61¶

In :
#given
fnotch = 120
R = 220*10**3

#calculatiuon
C = 1/(6.28*R*fnotch)

#Result
print"The value of capacitance required is ",round(2*C*10**6,3),"microfarad"

The value of capacitance required is  0.012 microfarad


## Example 2.26 Page no 82¶

In :
#given
Vpeak =3.0
f=48*10**3

#calculation
fifth_harmonic = 5*f
Vrms=(4/3.14)*(3/5.0)*0.707

#Result
print"(a) The frequency of the fifth harmonic is ",fifth_harmonic/10.0**3,"Khz"
print"The RMS voltage of the fifth harmonic is ",round(Vrms,3)

(a) The frequency of the fifth harmonic is  240.0 Khz
The RMS voltage of the fifth harmonic is  0.54


## Example 2.27 Page no 87¶

In :
#given
Vpeak = 5
f = 4.0*10**6
duty_cycle=0.3

#calculation
T = 1/f
t0 = duty_cycle*T
Vavg = Vpeak*duty_cycle
min_bw =1/t0

#Result
print"(a) The average DC value is ",Vavg,"volt"
print"(b) The minimum bandwidth required is " ,round(min_bw/10.0**6,3),"Mhz"

(a) The average DC value is  1.5 volt
(b) The minimum bandwidth required is  13.333 Mhz


## Example 2.28 Page no 88¶

In :
#given
tr =6*10**-9

#calculation
min_bw=(35/0.006)

#Result
print"The minimum bandwidth is % is ",round(min_bw/10.0**2,1),"Mhz"

The minimum bandwidth is % is  58.3 Mhz


## Example 2.29 Page no 89¶

In :
#given
bw= 200.0*10**3

#calculation
tr= 0.35/(bw*10**-3)

#Result
print"The fastest rise time of the circuit is " ,tr*10**3,"microseconds"

The fastest rise time of the circuit is  1.75 microseconds


## Example 2.30 Page no 90¶

In :
#given
bw_mhz = 60
tri_ns= 15

#calculation
tra_osci = 0.35/(bw_mhz)
tra_comp = 1.1*(tri_ns**2 + (tra_osci*10**3)**2)**0.5

#Result
print"The rise time of the displayed square wave is ",round(tra_comp,1),"ns"

The rise time of the displayed square wave is  17.7 ns