How do a diode and a transistor work?
A diode is normal built by touching two different pieces of semiconductor together to form what is called a “p-n junction.” Semiconductors are materials that are in between good conductors and good insulators. A pure semiconductor is a very poor conductor of electricity. With careful chemical processing, a semiconductor can be made into n-type semiconductor—a semiconductor that contains a small number of mobile electrons that permit it to carry electric current. With different processing, a semiconductor can also be made into p-type semiconductor—a semiconductor that contains a small number of mobile holes for electrons that permit it to carry electric current. It may seem strange that a hole for an electron can allow electricity to flow, but imagine a highway packed with cars (electrons) bumper to bumper. If there are a couple of empty places (holes) in the bumper-to-bumper traffic, then cars (electrons) can rearrange enough that the traffic can flow. Both mobile electrons and mobile