Lecture 02 24.06.11 Logic Gates

27
Digital Electronics EEE 357 Lecture 02 (Cont.) Logic Gates (Continued) Course Conducted by: Shuvodip Das, Lecturer, ETE Dept. PU. 1

Transcript of Lecture 02 24.06.11 Logic Gates

Digital Electronics EEE 357 Lecture 02 (Cont.) Logic Gates (Continued)Course Conducted by: Shuvodip Das, Lecturer, ETE Dept. PU.1

NAND Gate is a Universal Gate To prove that any Boolean function can be implemented using only NAND gates, we will show that the AND, OR, and NOT operations can be performed using only these gates.

2

Implementing an Inverter Using only NAND Gate

3

Implementing AND Using only NAND Gates

4

Implementing OR Using only NAND Gates

Thus, the NAND gate is a universal gate since it can implement the AND, OR and NOT functions.

5

NOR Gate is a Universal Gate

To prove that any Boolean function can be implemented using only NOR gates, we will show that the AND, OR, and NOT operations can be performed using only these gates.

6

Implementing an Inverter Using only NOR Gate

7

Implementing OR Using only NOR Gates

8

Implementing AND Using only NOR Gates

Thus, the NOR gate is a universal gate since it can implement the AND, OR and NOT functions.9

Diode Logic Gates Diodes can perform digital logic functions: AND, and OR. Diode logic was used in early digital computers. It only finds limited application today. Sometimes it is convenient to fashion a single logic gate from a few diodes.

10

Diode AND gate

The logic levels are generated by switches. If a switch is up, the input is effectively high (1). If the switch is down, it connects a diode cathode to ground, which is low (0). The output depends on the combination of inputs at A and B. The inputs and output are customarily recorded in a truth table at (c) to describe the logic of a gate. At (a) all inputs are high (1). This is recorded in the last line of the truth table at (c). The output, Y, is high (1) due to the V+ on the top of the resistor.11

Diode AND gate (Continued)

It is unaffected by open switches. At (b) switch A pulls the cathode of the connected diode low, pulling output Y low (0.7 V). This is recorded in the third line of the truth table. The second line of the truth table describes the output with the switches reversed from (b). Switch B pulls the diode and output low. The first line of the truth table records the Output=0 for both input low (0). The truth table describes a logical AND function.

Summary: both inputs A and B high yields a high (1) out.12

Diode OR Gate

A two input OR gate composed of a pair of diodes is shown in Figure . If both inputs are logic low at (a) as simulated by both switches downward, the output Y is pulled low by the resistor. This logic zero is recorded in the first line of the truth table at (c). If one of the inputs is high as at (b), or the other input is high, or both inputs high, the diode(s) conduct(s), pulling the output Y high. These results are reordered in the second through fourth lines of the truth table.

Summary: any input high is a high out at Y.13

Diode OR Gate

A backup battery may be OR-wired with a line operated DC power supply in Figure to power a load, even during a power failure. With AC power present, the line supply powers the load, assuming that it is a higher voltage than the battery. In the event of a power failure, the line supply voltage drops to 0 V; the battery powers the load.

14

Transistor Logic Gates Transistors, when operated at their bias limits, may be in one of two different states: either cutoff (no controlled current) or saturation (maximum controlled current). If a transistor circuit is designed to maximize the probability of falling into either one of these states (and not operating in the linear, or active, mode), it can serve as a physical representation of a binary bit. A voltage signal measured at the output of such a circuit may also serve as a representation of a single bit, a low voltage representing a binary 0 and a (relatively) high voltage representing a binary 1.15

Transistor as Inverter

In this circuit, the transistor is in a state of saturation by virtue of the applied input voltage (5 volts) through the two-position switch. Because its saturated, the transistor drops very little voltage between collector and emitter, resulting in an output voltage of (practically) 0 volts. If we were using this circuit to represent binary bits, we would say that the input signal is a binary 1 and that the output signal is a binary 0.16

Transistor as Inverter (Continued)

When we move the switch downward then base is connected to ground, that is, we are applying a binary 0 to the input and receive a binary 1 at the output.

17

OR Gate using Transistor

Emitter follower circuit

An OR gate is a circuit whose output is HIGH if either input (or both) is HIGH, and LOW only if both inputs are LOW. Connect and disconnect wires from Vin to points A and B to turn the inputs ON (high, or logic 1 or +4V to +6V) or OFF (low, 0,