blob: f22589cb93f79b68e7d82c2ed44f0ce0af5422e4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
clear;
clc;
//Caption:When atleast one input is at V(0) in NAND gate
//Given Data
//For transistor
Vbesat=0.8;//in V
Vy=0.5;//in V
Vcesat=0.2;//in V
R = 5;//in K
Rc = 2.2;//in K
//For diode
Vyd=0.6;//Vgamma in V
Vdrop=0.7;//in V
//The logic levels are Vcesato=0.2V for 0 state
Vcesato=0.2;//in V
disp('If atleast one input is in 0 state');
Vp = Vcesato + Vdrop;//Voltage at point P
disp('V',Vp,'Vp=');
Vbe = Vp-Vyd;//Voltage at base emitter
disp('V',Vbe,'Vbe=');
if(Vbe<Vy)
disp('Q is cutoff');
end
if(Vbe>Vy)
disp('Q is ON');
end
//end
|