Transistor:
The transistor mainly contains silicon atoms.
In depth, the silicon atomic structure is,
Silicon atomic number is 14, to get it into the stable stage it must be bonded with another four silicons or it should give four atoms to another silicons. Transistor mainly consists of npn and pnp types.
Let us consider the npn transistor,
Figure: NPN Transistor
In N side the phosporus atoms are interlinked to the silicon to bond each other and remaining atoms in phosporous gives to P side. In P side the Boron is bonded with silicon atoms and remaining lesser atoms will take from the N side. Now all the atoms will get to the stable stage to conduct the electricity. From the P side, the gate will be open to flow freely the electrons from source to the drain and conduct electricity.
When it is flowing freely the electrons will be in the ON Stage. And when it is stoped flowing then, the stage is called OFF stage.
In this way, when the power passes through source the remaining electrons will move through gate and passes into the drain.
Figure: Electrons moving from source to drain
How Does a Transistor store?
ON or OFF stages will be there in transsistor.
For ON stage it will store 1 and
for OFF stage it will store 0.
For example:
In computer there are 4 Billion+ transistors are available in a 4Square cms Processor.
That switches ON and OFF stages for storing images and videos or any data in a computer.
If we want to store an image in a computer
Similarly, for all the columns, it checks and gives the code for each column