Sie sind auf Seite 1von 16

LOGIC GATES

Logic gates are electronic components. They give a


power output when certain of the input terminals are
at a positive potential. They are also a very
important component in computers. Here they are
used to combine pulses of electricity in different
ways.
If the input or output terminal of a logic gate has a
positive potential it is said to be at logic 1. Inputs or
outputs at zero potential are at logic 0. The way in
which a logic gate works is described by means of a
logic or truth table. A truth table gives the logic
state of the output for all the possible different logic
states of the inputs. There are only four basic types
of logic gate.

NOT gate or inverter


This is the simplest gate. If the input is logic 1, the
output is logic 0, and vice versa. The NOT gate
inverts the input.
input output

input
A

output
NOT

AND gate
The AND gate has two inputs. The output is at logic
1 only if both inputs are at logic 1.
input output
A
inputs
B

AND

output

OR gate
The output of an OR gate is at logic 1, if either
of the two inputs is at logic 1.

input output

A B

A
inputs
B

output
OR

0 0

0 1

1 0

1 1

Exclusive OR gate

This gate is sometimes called an EXOR or nonequivalence (NEQ) gate. The output is at logic
1, if only one of the inputs is at logic 1. If both
inputs are at logic 1 the output is at logic 0.
inputs output

0 0

output
inputs

A B

NEQ

0 1
C
1 1

1 0
0

1
1

Combined gates
The NAND gate is made by placing a NOT gate
after an AND gate. It is an AND-NOT gate. The
NOT gate inverts the logic output of the AND
gate . As NAND gates are made as separate
electronic units they have their own symbol.

inputs output

output
inputs

A B
0

NAND

C
1

1
0

1
0

The NOR gate can be made by putting a NOT


gate after an OR gate. A NOR gate is an OR
NOT gate.
inputs output

output
inputs

A B

0 0

0 1

NOR

C
1 1

1 0
0

Analysis of logic systems

Logic gates can be combined in many different ways, to


operate different things.
Work out the truth table for the logic circuit below. Find
the logic state at the point D as well as at the output E.
A
B

OR

AND

C
C

First write down the truth table with the inputs filled in. It
is best to write the inputs down, in the order of binary
counting. Then fill in the logic state of point D. Finally,
fill in the logic state of the output E. This is the result of
an AND gate being applied to point C and D of the logic
circuit.

QUIZ NO. 6

Work out a truth table for the ff. logic circuit:

C
AND

G
E
NOT
AND
OR

ANSWERS
A

LOGIC GATES APPLICATIONS


Logic gates are used as switches. When the input
conditions are right, they switch on an electrical
device. The working conditions for logic gates
depend on the type. The conditions given in the
table below will operate the common types of logic
gates.
Operating conditions for a power supply of +5 V.
Terminal

Logic
state

Potential

Input

Less than 0.4 V

Input

More than 3.5 V

Output

Nearly 0 V

Output

Nearly 5 V

An input potential of between 0.4 V and 3.5 V could cause faulty


switching.

Automatic light switch


In bright daylight the resistance of the LDR is
about 100 . Point A is nearly at 5 V. The input
of the logic gate is at logic 1. The output is at
logic 0 and at 0 V.

+5 V

In the dark the resistance of


the LDR is about 1 M. This
ORP 12
A

causes the potential of point

NOT
A to drop to below 0.4 V.
The input of the NOT gate is
2 k

now at logic 0. The output is


at logic 1 and nearly at 5 V.
Current from the output

0V

flows through the LED to


light it up.

TIME DELAY SWITCH


This

sort of switch is used in some cars. The door operates the light switch. When the door
closes, the light stays on for a few seconds before going out.

+5 V

200

AND

470 F
100 k

0V
The circuit uses an AND gate with two inputs connected together. When the inputs are at
logic 1, the output is at logic 1. When the switch is closed, point A is at 5 V. Both inputs of
the AND gate are at logic 1. The output is at logic 1 and the LED is alight. When the switch is
opened, the charge on the capacitor slowly flows through the resistor until point A is at 0 V.
The output is now at logic 0, and the LED is switched off. The length of time delay is the
time constant RC.

SEATWORK (INDIVIDUAL)
The ff. figure shows a circuit used in a car door
and seatbelt warning system.
(+)
ignition
I

D
S
Door

Seatbelt
Buzzer

(-)

Questions:
1.
2.
3.

What two logic gates are used in the circuit?


Complete the ff. truth table for the circuit.
Explain briefly how the alarm works (what voltage is established at
each input when the switch is ON/OFF) . Under what conditions will
the buzzer sound? (Note: I = 0 means I switch is off; D = 0 means door
is locked; S = 0 means seatbelt is fastened.)
Ignition I

Door D

Seatbelt S

Buzzer B

Answers:
1.
2.
3.

What two logic gates are used in the circuit? OR gate and AND gate
Complete the ff. truth table for the circuit.
The buzzer will sound if: a) the ignition switch is ON and the door
is not locked; b) the ignition switch is ON and the seatbelt is not
fastened; c) the ignition is ON, the door is not locked and the
seatbelt is not fastened.
Ignition I

Door D

Seatbelt S

Buzzer B

Das könnte Ihnen auch gefallen