Science at its best
Monday, January 12, 2015
Friday, January 9, 2015
Fibonacci series
Program to implement fibonacci series:-
code:
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c,i,n;
a=0;
b=1;
printf("\n Enter the value of n which will terminate the series after reaching nth value:");
scanf("%d",&n);
printf("\n Fibonacci series generated \n");
printf("\t%d\t%d",a,b);
for(i=0;i<n;i++)
{
c=a+b;
a=b;
b=c;
printf("\t%d",c);
}
getch();
}
output:-
code:
#include<stdio.h>
#include<conio.h>
int main()
{
int a,b,c,i,n;
a=0;
b=1;
printf("\n Enter the value of n which will terminate the series after reaching nth value:");
scanf("%d",&n);
printf("\n Fibonacci series generated \n");
printf("\t%d\t%d",a,b);
for(i=0;i<n;i++)
{
c=a+b;
a=b;
b=c;
printf("\t%d",c);
}
getch();
}
output:-
Thursday, January 8, 2015
Addition of complex numbers(C coding)
BASIC C PROGRAMS :-
- addition of complex numbers-
#include<conio.h>
#include<stdlib.h>
struct complex
{
int real;
int img;
};
int main()
{
struct complex a,b,c;
printf("Enter a and b where a+ib is the first complex number");
printf("\na=");
scanf("%d",&a.real);
printf("b=");
scanf("%d",&a.img);
printf("Enter c and d where c+id is the second complex number.");
printf("\nc=");
scanf("%d",&b.real);
printf("d=");
scanf("%d",&b.img);
c.real=a.real+b.real;
c.img=a.img+b.img;
if(c.img>=0)
printf("sum of two complex numbers=%d+%di",c.real,c.img);
else
printf("sum of two complex numbers=%d%di",c.real,c.img);
getch();
return 0;
}
output:-
please comment if you have any problem with this coding.
Saturday, August 9, 2014
Circuit configuration of BJT
A transistor has three terminals namely emitter,base and collector terminals which are all mentioned in my previous posts.So,when a transistor is connected in a circuit it requires four terminals of which two would be input and the other two would be output terminals but a transistor has only three terminals as of which one terminal has to be common to make up for the loss.As a result of which a transistor has three types of configuration namely common base,common collector and common emitter configuration.All these configuration with respective circuit diagrams will be mentioned below.There is not much of an explanation for the circuits,you only have to remember the configuration that's all.
Here you can see the base terminal is taken as common terminal between input and output terminals.Input signal is applied between base and emitter terminals and output is taken from collector and base terminals.
- Common base configuration (CB)-
circuit configuaration for npn transistor |
- Common emitter configuration(CE)-
Here you will observe that the emitter acts as a common terminal between input and output terminals.Input signal is applied between base and emitter terminals and output is taken out from emitter and collector terminals.
- Common collector configuration(CC)-
Here the collector terminal acts as the common terminal between the input and output terminals.Input signal is applied between base and collector terminals where the output is taken out from emitter and collector terminals.
Remember the direction of arrow for npn transistors and likewise you will be able to draw circuits for pnp transistors in these three configuration.Feel free to ask any questions!!!Till then Happy Reading!!!
Thursday, August 7, 2014
Transistor action
Working of a p-n-p transistor
Before starting this please refer to the basic framework of a transistor( http://dutta60.blogspot.in/2014/08/bipolar-junction-transistorsbasic.html)for better understanding of this following article.So let's start.........
You can observe from the following figure that the emitter base junction is forward biased with the help of voltage VEE(For information on biasing refer to- http://dutta60.blogspot.in/2014/07/biasing-of-diode.html) and collector base junction is reverse biased with the help of voltage VCC.Always remember the above two things for a p-n-p transistor.The forward bias of the emitter base junction helps the movement of holes in the p-region and electrons in the base region towards the junction thereby reducing the depletion width.On the other hand ,the reverse bias of the collector base junction increases the depletion width .
The Holes in the emitter region are accelarated towards the base junction due to the electrostatic influence of the battery (VEE).As the base is slightly doped only 1%of the total holes injected into it combine with electrons which further validates the fact that base current IB is indeed very small.After this ordeal,again what happens is that holes rush towards the collector through the base and nearly (97. 99%) of holes are collected in the collector region.Now for one hole reaching the collector an electron is released from VCC to neutralise the hole as depicted by the above image.Now again a counter effect is produced due to the neutralisation where in the emitter region a covalent bond is broken and an electron is liberated which enters the respective battery.
So,it can be summed up by saying current is carried by holes in the internal circuit and by electrons in the external circuit.
Mathematical relation to find the base current:-
IE = IB + IC
Hope this post helps.Your comments are welcome .Happy Reading!!!
Bipolar Junction transistors(Basic)
A bipolar junction transistor(BJT) has three differently doped region where the n-type semiconductor may be sandwiched between two p-type semiconductors or the opposite thus giving it a common name as PNP or NPN transistor.The semiconductor material which is sandwiched is very small and is coated with plastic materials to protect it with moisture.
The above diagram which you can see is PNP transistor consisting of emitter region,base region and collector region.
Emitter(E)- The above figure indicates where emitter region is placed,this region is responsible for providing charge carriers to the base and collector regions.The emitter region is always denser as compared to the other regions as it is always heavily doped.
Base (B)-As mentioned earlier base region is situated in the middle of two p or n-type semiconductors.The base region is a thin region and always lightly doped.
Collector(C)-The position of collector region is clearly indicated by the diagram.The name is so given as it collects charge carriers.The collector region is comparatively bigger than emitter region(not indicated in the diagram correctly).The doping level of collector is less than the emitter but it is more than the base region.The above transistor has two junctions namely emitter-base junction(JE) and collector base junction(Jc).
SYMBOL(NPN only)-
The arrow head on the emitter terminal represents the flow of current.This above post only gives you the basic framework of bipolar junction transistor.Working and biasing will be taken up by subsequent posts.Until then Happy Reading!!
Tuesday, August 5, 2014
Zener Diode
Circuit symbol of zener diode |
When reverse biasing across a p-n junction diode(For more information on p-n junction please refer to http://dutta60.blogspot.in/2014/07/p-n-junction-diode.html) is increased beyond the breakdown voltage as a consequence of which reverse current increases rapidly, then the diode is said to oprate in reverse breakdown region and is termed as zener diode.Now the question is how the breakdown is achieved-When the p-n junction is reverse biased free electrons get energised and is accelerated by the reverse electric field .These electrons then collide with atoms and ionise them as a result of which more electrons are generated resulting in more atoms being ionised.As the no. of electrons generated is more reverse current increases abruptly.When the p-n junction is highly reverse biased electric field across the junction is very high and the zener breakdown occurs.After reading this one more question may arise that how the electrons are generated-what happens is that the electric field exerts a force on electrons of the outermost shells of the atoms and pulls it away thereby ionising it instantly.On the other hand the reverse current keeps on increasing due to this.
CHARACTERISTICS:-
Here I am only going to discuss about the negative portion of the graph as that is the operating region of zener diode.As you can see from the graph itself that at a particular voltage or reverse voltage you can say the curve falls almost linearly .The breakdown point at which this occurs is termed as the knee of the curve and the breakdown process starts at this point.As you can see below the breakdown point reverse current is almost negligible but when the voltage is more than the breakdown voltage zener breakdown occurs and current increases almost linearly after that.However the zener diode operates between specified range of current values .This range of current must be maintained for the operation of zener diode in the breakdown region.
That's all for now!!Happy reading!!
Subscribe to:
Posts (Atom)