* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download Logic Gates
Mains electricity wikipedia , lookup
Resistive opto-isolator wikipedia , lookup
Flip-flop (electronics) wikipedia , lookup
Control system wikipedia , lookup
Power electronics wikipedia , lookup
Power MOSFET wikipedia , lookup
Schmitt trigger wikipedia , lookup
Switched-mode power supply wikipedia , lookup
Integrated circuit wikipedia , lookup
Light switch wikipedia , lookup
Crossbar switch wikipedia , lookup
Buck converter wikipedia , lookup
Digital electronics wikipedia , lookup
Logic Gates Unit 16 Objectives Upon completion of this unit the student will be able to: 1. Explain how different kinds of logic gates function. 2. Use diodes and transistors to build logic gates. Recall for unit 11 the integrated circuits (ICs) are made by forming individual transistors, diodes and resistors on small silicon chips. Most integrated circuits can be categorized as analog, digital or analog-digital, according to their function. Analog (or linear) IC’s produce, amplify or respond to variable voltages. Analog ICs include many kinds of amplifiers, timers and voltage regulators. Digital ICs or logic circuits respond to or produce signals having only two voltage levels. These circuits count, compare or otherwise process information in the form of on-off electrical pulses. Digital ICs include microprocessors, microcomputers, memories and many kinds of simpler chips. Microprocessors equipped with ROM (Read Only Memory, which stores constantly used, unchanging computer programs) are used to perform process-control, testing,, monitoring and diagnostic functions. For example, they are used in car ignition systems and in car-engine diagnosis. No matter how complicated, all logic circuits are made from a simple building blocks called logic gates. Logic gates are like electronically controlled switches. They are either on or off. A typical logic gate has two inputs and one output. The simplest logic gates can be compared to mechanical switch gates. Notice that the circuit in Figure 16-1 contains a battery, a lamp and two switches in series. The switches are the gate’s input and the lamp is the output. Because the two switches are connected in series, the lamp will light only when both switches A and B are closed. For this reason, the switch gate is called an AND gate. AND Switch Gate The Table in Figure 16-2 summarizes the operation of an AND switch gate. It includes all possible on/off combinations of switches. The punch press you read about in Unit 15 is an example of AND logic. For the punch press to operate, both switches must be turned on. Notice the circuit in Figure 16-3 also contains a battery, a lamp and two switches. But this time the switches are in parallel. In this case the lamp will light when Switch A or Switch B or both switches are closed. For this reason, the switch gate is called an OR gate. OR Switch Gate The table in Figure 164 summarizes the operation of an OR switch gate. It includes all possible on/off combinations of switches. You can substitute the digits 0 and 1 for the off and on positions, respectively of a switch. In this case, the tables in Figures 16-2 and 16-4 can be expressed as shown in Figure 16-5. A NOT gate reverses (or inverts) the usual action of a switch. For example, in a circuit containing a battery, a lamp, a switch, and a NOT gate, the lamp would be lit only when the switch is opened. When the switch is closed, the lamp would be off. NOT gates, or inverters, make it possible to create NAND ( not AND) and NOR (not OR) logic gate The following Figure shows the binary tables of NAND and NOR gates. Notice that the outputs of these gates are the opposite of the corresponding AND and OR gates. The simplest electrically controlled gates use PN junction diodes that are switched on (forward biased) or off (reverse biased) by an input signal of several volts (binary 1) or an input near or at ground (binary 0). In the diode OR gate shown in the following Figure, when the input voltage at A or B is more positive than ground, the voltage passes through the forward biased diodes and appears at the output. Otherwise, the output is at or near ground. In the diode AND gate shown in the following Figure, when the input voltage at A and B is more positive than ground, current flows to the output. IF either A or B is at or near ground, one or both diodes become forward biased and the current flows away from the output. Notice that the output never reaches a full 6 volts in either gate. This is because the diodes require a forward voltage of 0.6 volt, and this voltage is subtracted from the output voltage. The voltage drop of diode gates means that amplification is needed in order to connect a series of gates together. Transistors can provide the needed amplification and they can act as gates. In modern electronic computers, transistors are the devices that act as gates (switches). As required operations of computers have become more complex, switches were developed that have a variety of ways in which they can be turned on and off. Today, computer contain thousands of transistors integrated in a semiconductor chip (IC). You will now have the opportunity in the Experiments to make logic gates using diodes and transistors. For most applications, however, an integrated circuit can be purchased containing the needed gate. Combinational Logic Combinational circuits are built of five basic logic gates: AND gate - output is 1 if BOTH inputs are 1 OR gate - output is 1 if AT LEAST one input is 1 XOR gate - output is 1 if ONLY one input is 1 NAND gate - output is 1 if AT LEAST one input is 0 NOR gate - output is 1 if BOTH inputs are 0 Truth Tables The descriptions above are adequate to describe the functionality of single blocks, but there is a more useful tool available: the truth table. Truth tables are simple plots which explain the output of a circuit in terms of the possible inputs to that circuit. Here are truth tables describing the six main elements: