Sunteți pe pagina 1din 9

Understanding Logic Gates 1 of 32

This Automotive Series


UNDERSTANDING
LOGIC GATES
has been developed by

Kevin R. Sullivan

Professor of
Automotive Technology
Skyline College
San Bruno, California

Images by
Toyota Motor Sales, U.S.A., Inc.

All Rights Reserved

LOGIC GATES
Logic Gates are circuits made up of transistors, diodes, and resistors. Logic gates
process one or more input signals in a logical fashion. Depending on the input value or
voltage, the logic gate will either output a value of '1' for ON or a value of '0' for OFF.

Logic Gates allow simplification of circuit operation. A basic understanding of logic gates
will aid technicians in electrical diagnosis.

The five common logic gates used in wiring diagrams are the:
AND, OR, NOT, NAND, NOR

DIGITAL CIRCUITS
Logic Gates are digital circuits. All digital circuits are either ON or OFF.

A light switch in your house can be used as an example of a digital circuit. The light is
either ON or OFF depending on the switch position.

When the Light is ON the output value is '1'.

When the Light is OFF the output value is '0'.

The inputs are the position of the light switch. The switch is placed either in the ON or
OFF position to activate the Light.

1
BINARY CODE
Logic gates are digital circuits and they utilize a binary numbering system known as
binary code. Binary code is the same language used by computers which use only 1 or 0
as numbers.

People use a base 10 numbering system, ones, tens, hundreds, etc. Example:
1,2,3,4,5,6,7,8,9,and 0. Once we get to zero, we expand to the tens place: 10, 11, etc.

BINARY CODE EXAMPLE:

00000001 = 1
When the number place holder is empty, it has a zero in it. When
00000010 = 2 full, there is a 1.
00000011 = 3
00000100 = 4 Look at the first example, the number one.
00000101 = 5
When we add a 1 to the number 1, the first place holder becomes a
00000110 = 6 zero and we carry one place to the left. The zero (the second from
00000111 = 7 the left) now becomes a 1. So a number 10 in the bin
00001000 = 8
00001001 = 9
00001010 = 10

LOGIC SYMBOLS FOR THE FIVE COMMON LOGIC GATES

LOGIC SYMBOL FOR THE "AND" GATE

HOW DOES THE "AND" GATE WORK?

2
'AND' gates are like two or more switches in series. All the switches have to be closed
( 'ON' or a value of '1') in order to make the lamp (output C) turn on.

If all inputs are not "ON", the output is "OFF".

TRUTH TABLE FOR THE "AND" GATE

TRUTH TABLE
Input Input Output
A B C
0 0 0
0 1 0
1 0 0
1 1 1

All input values to the AND gate must be a '1' in order for the output value to be '1'.

Any other input combinations will result in a 'zero' as the output as shown in the truth
table above.

EXAMPLE OF "AND" GATE OPERATION

A value of '1' is needed at all AND gate inputs to produce an output value of '1' from the
AND gate, thus sending B+ to the lamp.

EXAMPLE OF "AND" GATE OPERATION

3
Unless all AND gate inputs receive a value of '1' the output value will be '0', thus
preventing B+ to the lamp.

LOGIC SYMBOL FOR THE "OR" GATE

HOW DOES THE "OR" GATE WORK?

An 'OR' gate is like two or more switches in parallel. Only one switch needs to be closed
('ON' or a value of '1') in order to make the lamp (output C) turn 'ON' with a value of '1'.

TRUTH TABLE FOR THE "OR" GATE

TRUTH TABLE
Input Input Output
A B C
0 0 0
0 1 1
1 0 1
1 1 1

4
A value of '1' applied to either or both inputs of the OR gate will result in an output value
of '1'.

A value of '0' applied to both inputs will result in an output value of '0'.

EXAMPLE OF "OR" GATE OPERATION

An input value of '1' at either of the OR gate inputs will result in an output value of '1'
from the OR gate, thus sending B+ to the lamp.

EXAMPLE OF "OR" GATE OPERATION

Input values of '0' at all inputs to the OR gate will result in an output value of '0' from the OR
gate, thus preventing B+ from going to the lamp.

LOGIC SYMBOL FOR THE "NOT" GATE

TRUTH TABLE FOR THE "NOT" GATE

TRUTH TABLE
Input Output
A C
0 1
1 0

NOT gates reverse the input signal value. If the input value is '1', the output value will

5
be '0'. If the input value is '0', then the output value will be '1'. NOT gates can be
referred to as inverters; whatever the input signal is the output is always the opposite.

EXAMPLE OF "NOT" GATE OPERATION

An input value of '0' at the NOT gate produces an output value of '1' from the NOT gate,
thus sending B+ to the lamp (as shown above).

An input value of '1' at the NOT gate produces an output value of '0' from the NOT gate,
thus preventing B+ from going to the lamp.

LOGIC SYMBOL FOR THE "NAND" GATE

Notice the circle on output C. What could it be?

TRUTH TABLE FOR THE "NAND" GATE

TRUTH TABLE
Input Input Output
A B C
0 0 1
0 1 1
1 0 1
1 1 0

A NAND gate is the combination of both an AND gate and a NOT gate. It operates the
same as an AND gate but the output will be the opposite. Remember the NOT gate does
not always have to be on the output leg; it could be used to invert an input signal also.

EXAMPLE OF "NAND" GATE OPERATION

6
If a value of '1' is sent to all inputs of the AND gate the result will be an output value of
'1' from the AND gate. The NOT gate receives an input value of '1' and will invert the
output value to '0'.

EXAMPLE OF "NAND" GATE OPERATION

If a value of '1' is applied to all the NAND gate inputs, an output value of '0' will result
from the NAND gate, thus preventing B+ to the lamp.

EXAMPLE OF "NAND" GATE OPERATION

If a value of '0' is sent to all of the AND gate inputs, the output value of '0' will result
from the AND gate. The NOT gate will receive an input value of '0', which is inverted to
produce an output value of '1'.

EXAMPLE OF "NAND" GATE OPERATION


If a value of '0' is applied to all the NAND gate inputs, an output value of '1' will result
from the NAND gate, thus sending B+ to the lamp.

LOGIC SYMBOL FOR THE "NOR" GATE

7
Notice the circle on output C

TRUTH TABLE FOR THE "NOR" GATE

TRUTH TABLE
Input Input Output
A B C
0 0 1
0 1 0
1 0 0
1 1 0

A NOR gate is the combination of both an OR gate and a NOT gate. It operates the same
as an OR gate, but the output will be the opposite.

EXAMPLE OF "NOR" GATE OPERATION

If a value of '1' is applied to either input of the OR gate, it will produce an output value
of '1' from the OR gate. The NOT gate receives an input value of '1', which is inverted by
the NOT gate to an output value of '0'.

EXAMPLE OF "NOR" GATE OPERATION

If a value of '1' is applied to either input of the NOR gate, an output value of '0' will
result from the NOR gate, thus preventing B+ from going to the lamp.

8
EXAMPLE OF "NOR" GATE OPERATION

If a value of '0' is sent to all of the inputs of the NOR gate, the output value of '0' will
result from the OR gate. The NOT gate will receive an input value of '0' which is inverted
to an output value of '1'.

EXAMPLE OF "NOR" GATE OPERATION

If a value of '0' is applied to all the NOR gate inputs, an output value of '1' will result
from the NOR gate, thus sending B+ to the lamp.

S-ar putea să vă placă și