APCS – Unit 1 – Lesson 7 – Transistors and Logic Gates

1. What is a transistor?

As per Wikipedia, a transistor is a semiconductor device used to switch or amplify electronic signals and electrical power. It is composed of semiconductor material usually with at least three terminals from connection to an external circuit. A voltage or current applied to one pair of the transistor’s terminals controls the current through another pair of terminals.   Transistors are the vital electronic building blocks! With the transistors, we can turn on / off with an electric signal! Microscopic transistors are etched onto silicon chips, and the chips can pack billions of transistors!   Modern computers use tiny electronic components which can be etched onto the surface of a silicon chip. (See: wikipedia chip) Note that silicon (chips, solar panels) and silicone (soft rubbery material) are different!

The transistor was invented in the early 1950’s, replacing the vacuum tube. Since then, transistors have been made smaller and smaller, allowing more and more of them to be etched onto a silicon chip.

Interesting Facts: Moore’s law

Moore’s law (Gordon Moore, Intel co-founder) states that the density of transistors on a chip doubles about every 2 years or so (sometimes listed as every 18 months). The increase is due to improved chip making technology. It is not a scientific law, just a broad prediction that seems to keep working. More broadly, it captures the idea that per dollar, computer technology (not just transistors) gets exponentially better as time goes along. This is quite clear if you look at the cost or capability of computers/cameras etc. you have owned. Moore’s Law results in more capable computers (compare what an iPhone 7 can do vs. the original iPhone) as well as cheaper computers (less capable computers show up everywhere, like in thermostats and cars).

2. What are Logic Gates?

Logic gates are constructed by combining transistors in complementary arrangements. They are digital circuit that either allows signal to pass through it or not. 

George Boole (1815 – 1864) is the inventor of the idea of logic gates. He was born in Lincoln, England and he was the son of a shoemaker.

Logic gates can be used to build logic functions. The seven basic logic gates include:

  • AND
  • OR
  • NOT
  • NAND (not AND)
  • NOR (not OR)
  • XOR
  • XNOR (not XOR)

3. Logic gates and truth table

Example:

Complete the truth table for the given circuit diagram.

The diagram might seem confusing upon the first look, but it is actually pretty straight forward. To solve the problem, just write the logic function on the logic gate, and convert the logic gates truth table problem into a logic operation problem that you learned how to solve in your 9th grade geometry class!

 

First of all, let’s consider when both inputs A and B equal to 0. If B is 0, then NOT B must be 1. 0 AND 1 (false AND true) must be 0. Finally, because 0 OR 0 is 0, the final output equals to 0.

In the second scenario on the truth table, A equals to 0 and B equals to 1. NOT A equals to 1, and NOT B equals to 0. 0 OR 1 (false OR true) equals 1. The final output is 1.

Let’s consider the third scenario, when A equals to 1 and B equals to 0. Well, we can see that in the diagram A and B are exchangeable and the diagram is symmetrical. The result is the same as the second scenario. 

In the last scenario, A and B both equals to 1. The output is 0.

The above logic gates combination is also called the XOR gate.

 

List of References:

http://www.cs.cornell.edu/courses/cs3410/2018fa/schedule/slides/02-gates.pdf

https://web.stanford.edu/class/cs101/hardware-1.html

https://sites.google.com/site/stephenmatthewssite/logic-gates-exercises

Chapter 3-Logic gates and Logic Circuits