# Fall 2006

## 1. Chapter 16 - Logic Circuits and Switches

• We have looked at the technological side of computing from a Macro to a Micro level:
• The Internet and the World Wide Web ( packet switching, routers, TCP/IP)
• Structure of a single computer: CPU, I/O, and Memory
• Structure of the CPU: ALU, CU, and Registers (all built from logic circuits)
• Now -- Logic Circuits
• Logic Circuit -- circuit that controls the flow of electricity
• Electricity -- flow of electrons through a conducting material
• Flow "ON" - represents a binary value of 1, or a logical value of TRUE
• Flow "OFF" - represents a binary value of 0, or a logical value of FALSE
• So, Logical Circuit is essentially a sophisticated Switch

## 2. Switches

• A switching circuit can be as simple as a switch connected in series with a lamp. But when you have a switch connected in series with another switch and/or connected in parallel with another switch, then you create a logic circuit that will function to turn on the lamp depending on how the switches are arranged and connected and what results when certain switches are closed or open.
• Example - Switches A and B represent logical values, A and B can be closed or open (1 or 0) (T or F).  The power supply (lower left component) supplies the current and the light bulb (circle with inside circle) shows the output of the switch (lit = 1).

• The CPU of a computer can be entirely constructed from such simple circuits! But, millions of wall switches would be quite something to control
• Earliest computer (~1930) used electric relays for switches.  Such switches are controlled by voltage to a magnet.  We can use a common power source by connecting the positive and negative terminals. We can also assume a common "ground" ("earth" in non-American English) for the negative terminals and use "V" (voltage source) for the positive terminal. The power source for the relay can then be the output of another circuit! In this way we can automate the operation of logic switches

• In the above relay circuit, the switch is open by default. We could reverse this and have a relay that is by default closed. If the switch on the relay is labeled "P" then when P is TRUE the bulb is extinguished; we could say that the bulb is FALSE, or NOT P.

• Generation 0 Computers (1940's) - Vacuum Tubes as switches. Tubes could control current, just like a relay, but could switch on and off much faster. However, they generated lots of heat and burned out frequently.

## 3. Transistors (Generation 1 Computers)

• 1948 -- Bardeen, Brattain, and Shockley invented the transistor.  Pure silicon, the base material of most transistors, is considered a semiconductor because its conductivity can be modulated by the introduction of impurities.
• Silicon containing boron impurities is called p-type silicon-p for positive or lacking electrons. Silicon containing phosphorus impurities is called n-type silicon-n for negative or having a majority of free electrons. Transistors consist of three terminals: the source, the gate, and the drain. (Images from Intel web site)

• In the n-type transistor, both the source and the drain are negatively charged and sit on a positively charged well of p-silicon.  When positive voltage is applied to the gate, electrons in the p-silicon are attracted to the area under the gate, forming an electron channel between the source and the drain.

• This opens the flow from the drain to the source, so that when a positive voltage is applied to the drain, the electrons are pulled from the source to the drain. In this state the transistor is on.

• Advantages -- Reduced Size, Reduced Power Consumption, Reduced Heat,  Low Maintanance

## 4. Transistors as Building Blocks of Logic Gates

• Combinations of NMOS and PMOS transistors can be used in sequence (connecting output of one to input of another) to produce signals that are functions of the input.
• Example -- A Logical NOT circuit (overhead)

``` ```