Você está na página 1de 28

Fundamentals of Logic Gates

Presentation for 3 Year Lab

Logic gates
Logic gates perform basic logical functions and are the fundamental building blocks of digital integrated circuits. Most logic gates take an input of two binary values, and output a single value of a 1 or 0. Some circuits may have only a few logic gates, while others, such as microprocessors, may have millions of them. There are seven different types of logic gates, which are outlined below.

Combinational Logic Circuits are made up from basic logic NAND, NOR or NOT gates that are "combined" or connected together to produce more complicated switching circuits.

Classification of Combinational Logic

One of the most common uses of combinational logic is in Multiplexer and De-multiplexer type circuits. Here, multiple inputs or outputs are connected to a common signal line and logic gates are used to decode an address to select a single data input or output switch. A multiplexer consist of two separate components, a logic decoder and some solid state switches. in a Combinational Logic Circuit, the output is dependant at all times on the combination of its inputs and if one of its inputs condition changes state

The three main ways of specifying the function of a combinational logic circuit are: Truth Table Truth tables provide a concise list that shows the output values in tabular form for each possible combination of input variables. Boolean Algebra Forms an output expression for each input variable that represents a logic "1" Logic Diagram Shows the wiring and connections of each individual logic gate that implements the circuit.

In the following examples, each logic gate except the NOT gate has two inputs, A and B, which can either be 1 (True) or 0 (False). The resulting output is a single value of 1 if the result is true, or 0 if the result is false.

AND - True if A and B are both True

OR - True if either A or B are True


NOT - Inverts value: True if input is False; False if input is True

XOR - True if either A or B are True, but False if both are True
NAND - AND followed by NOT: False only if A and B are both True

NOR - OR followed by NOT: True only if A and B are both False


XNOR - XOR followed by NOT: True if A and B are both True or both False

Logic Element Symbols

Logic Gates

Logic gates will be introduced shortly in the lecture portion of this course. A few basic logic gates are introduced here that will be used in Lab #1.

Inverter (NOT gate)


A' A " NOT A" " A NOT"
A A

Truth table A 0 1 A 1 0

AND gate AB = AB = A AND B AB = 1 if A = 1 and B = 1


A AB B

Truth table

A
0 0 1 1

B
0 1 0 1

AB
0 0 0 1
10

OR gate A+B = A OR B A+B = 1 if A = 1 or B = 1 or both


A B

Truth table A 0 0 1 1 B 0 1 0 1 A+B 0 1 1 1

A+B

XOR gate AB = A Exclusive-OR B Definition for two inputs only: AB = 1 if A B Definition for two or more inputs: AB = 1 if the input has odd weight where weight = number of inputs equal to 1
A B AB

Truth table A 0 B 0 AB 0

0
1 1

1
0 1

1
1 0
11

AND

AND
in order for the Output of an AND Logical Function to be TRUE: input (1) AND input (2) must both be TRUE. This is Positive Logic. Hint: TRUE is when the switch is closed, applying power to the LED. FALSE is when the switch is open, NOT applying power to the LED)

OR

OR
In order for the Output of an OR Logical Function to be TRUE: either input (1) OR input (2) (or both) must be TRUE

NOT

The output is exactly the opposite of the input, so if the input is a 0, the output is a 1 and vice versa

XOR
In order for the Output of an XOR Logical Function to be TRUE: input (1) & input (2) must both Different 01, 10.

Diode
A diode is a semiconductor device that acts somewhat like a voltage controlled switch. The symbol for a diode is shown

below. The positive terminal of the diode is called the anode


and the negative terminal is the cathode.
anode + V _ cathode

Diode Symbol
anode cathode _ + V Diode Appearance

18

In simple language, a diode is like one-way valve which allows electric current to flow in one direction but generally does not allow it to flow in the opposite direction. The direction of the electric current in the diode may be reversed. However, even if it is, the flow will still be one directional. A diode contains two electrodes that act in much the same manner as semiconductors. The positive or p-type is usually the anode and the negative or n-type is the cathode. In other words, the cathode is negatively charged as compared to the anode. If the cathode is charged at the same or very similar voltage to the anode, current will not flow.

LED (Light emitting diode) LEDs are diodes that emit light when they are forward biased (a positive voltage placed across the LED from anode to cathode as shown below). The amount of light produced is proportional to the current through the LED
Luminous intensity destruction

anode
+ V _

cathode
anode (long) cathode (short) I (mA) 12 20 Typical LED characteristics

Forward-biased LED

LED: Physical appearance

20

What type of logic gate does this logic circuit configuration produce?

( ( ( (

) ) ) )

NAND gate NOR gate EXOR gate EXNOR gate

What type of logic gate's behaviour does this truth table represent?

( ( ( (

) ) ) )

2 input OR 3 input OR 3 input EXOR 4 input EXOR

Write the expression::

For the equation below, draw the logic circuit using the basic logic gates

Você também pode gostar