Chapter 10 - Basic Logic Gates and Logic Functions

Example E1 - Pg 313

In [1]:
#Caption:Determine low and high voltage outputs and resistance for desinging the gate circuit
Vcc=5.#Supply voltage(in volts)
Vf=0.7#Diode forward voltage(in volts)
I=0.5#Collector current(in mA)
Vce=0.2#Collector emitter voltage(in volts)
R=(Vcc-Vf-Vce)/I
Vl=Vce+Vf
Vh=Vcc
print '%s %.1f %s %.f %s %.1f' %('Lowvoltage outputs(in volts)=',Vl,'\nhigh voltage outputs(in volts)=',Vh,'\nRequired resistance(in kilo ohm)=',R)
Lowvoltage outputs(in volts)= 0.9 
high voltage outputs(in volts)= 5 
Required resistance(in kilo ohm)= 8.2

Example E2 - Pg 315

In [2]:
#Caption:Find minimum value of the resistance to design OR Gate
Rc=3.3#Collector resistance(in kilo ohm)
V=3.508#Gate output voltage(in volts)
Vcc=5.#Supply voltage(in volts)
Vf=0.7#Forward diode voltage(in volts)
I=(Vcc-Vf-V)/Rc
R=V/I
print '%s %.1f' %('Minimum value of resistance to design the circuit is(in kilo ohm)=',R)
Minimum value of resistance to design the circuit is(in kilo ohm)= 14.6