Viewing a single comment thread. View all comments

m_i_c_r_o_b_i_a_l t1_itwlbhi wrote

The basic building block is the transistor which is a kind of switch for electricity. The transistor is made from silicon (the rocks) mixed with stuff to get two silicon mixes. There are two basic kinds of this switch which are based on how you sandwich the silicon mixes. An analogy would be to have two types of push button switches with these behaviors

  • Button type 1: Push the button, a light turns on. Let go of the button the light turns off.
  • Button type 2: Push the button, the light turns off. Let go of the button the light turns on.

You can arrange these switches in certain combinations to make logic. One type of this logic could be turn on the light when one button is pushed, but not if two are pushed. It could also be turn on the light if either button is pushed. There is a variety of different combinations that can be made with just these two switch types. Those switches can in turn be fed into more switches to make more complex logic. In this analogy a computer program is just determining which buttons are pushed and when. The CPU is a few billion of these switches which arranged the right way allows for more complex things to happen.

There is a good set of videos by Ben Eater on youtube. He starts at one transistor and builds up some simple logic building blocks with a couple more. I learned a lot about why transistors put together in the correct way make the logic in computers work.

Here's one of his videos on how the transistor does its thing: https://www.youtube.com/watch?v=DXvAlwMAxiA

Here's another of his videos describing logic gates: https://www.youtube.com/watch?v=sTu3LwpF6XI

1