WHY DO WE NEED TO KNOW
ABOUT LOGIC GATES?
Computer Logic
- data in a computer is stored in a series
of bits
- the ALU performs arithmetic operation
on data and the CU ‘decode’ instructions
- both of these instructions are
performed by logic circuits
Logic Gates
Computer Logic
- computer logic is based on Boolean
Algebra ( and, or, etc.) by combining
these operations you create complex
logical expressions
There are rules governing priority of the
operations. These need to be known just
as you need to be aware of priorities in
the arithmetic operators ( 2+4X5)=?
Boolean Variables
A Boolean variable has one of two
values
Often referred to as TRUE or FALSE
As we are dealing with an electronic
system there is either a voltage present
( e.g. 5 or 3.3V) a value of 1 or no
voltage a value of 0
Gates
The term ‘Gate’ is used to describe the
members of a set of basic electronic
components which, when combined
with each other, are able to perform
complex logical and arithmetic
operations. ‘Gates” are the physical
realization of the simple Boolean
expressions.
Basic Logic Gates
All digital systems can be constructed by
only three basic logic gates.
These basic gates are called:
– And gate
– OR gate
– NOT gate
– others - NAND gate
– - NOR gate
– - EOR gate
Fundamental Gates
Each set of gates is enclosed in a
computer chip(Integrated Circuit or simple
IC)
Each IC has a certain number of input and
output pins, an identification number, an
electronic symbol, and a Boolean
Equation.
Electronic Circuits and
Components
Electric current flows through wires
much like water flows through pipes
Voltage is like the water pressure in the
pipes, which forces the flow along.
Diodes, resistors, and transistors that
exit in circuits are used for the purpose
of controlling the voltage levels and
current flow.
Resistors
Resistors in logic gates circuits are
present mainly to limit the current flow.
Without them, the current would be too
great and other components might be
damaged.
Resistors have no definite input or
output. -- when a resistor is connected to
other components in a circuit, it makes
no difference which end is which.
(electricity may flow in either direction
Resistance is measured in ohms
A 2K resistor has a resistance of 2000
ohms (K stands for 1000ohms)
a resistor is coded with colour bands
which indicates its value
First digit Tolerance
Second digit Multiplier
Give out handout Resistor colour code
Electronic Logic Gates
A logic gate is an electronic circuit whose output
is the result of a logic operation performed on
one or more inputs.
The inputs and outputs are voltages which stand
for logic variables.
There are only two voltage levels, low and high.
They represent the logic of states 0 and1
Logic gates are the building blocks of logic
circuits
NOT Gate
Logic: NOT A opposite or negative
Algebraic: A complement
Electronic: an inverter
also called inverter, because the inverts
a signal, changing 1 to 0 or 0 to 1
NOT Gate
Rule: The NOT gate is a circuit which
produces at its output the negated
(inverted) version of its input logic
If the input variable is A, the output is A
Note: l. Only one input
2. Written as X in boolean
expression
Truth table
Illustrates the results of the input
AND Gate
AND gate - the output will be high only if
both inputs are high. If either of the
inputs is low, then the output will be low.
Rule: The AND gate is a circuit which
gives a high output(logic 1) if all its
inputs are high.
The output is 1 only when both
inputs are 1
OR Gates
Rule: The OR gate is a circuit which
gives a high output if one or more of its
inputs are high. A plus sign(+) is used
to indicate the OR operation.\
The output value is 1 when at
least one input value is 1
NAND Gate
Rule: The NAND gate is a NOT- AND
circuit which is equivalent to an AND
circuit followed by a NOT circuit.
The output of the NAND gate is high if
any of its inputs is low.
NOR Gate
Rule: The NOR gate is a NOT-OR
circuit which is equivalent to an OR
circuit followed by a NOT circuit.
The output of the NOR gateis low if any
of its inputs is high
EOR Gate
Rule: the Exclusive-OR circuit which is
equivalent to an OR circuit followed by a
NOT circuit. The output of the NOR
gate is low if any of its inputs is high.
Truth Tables
Representation of Logic Gates
The function of these building blocks
are summarized by means of a :
Truth Table
The truth table shows all possible
input/output combinations for two inputs
A truth table with n inputs (logic
variables) has 2n rows.
Truth Table for Not Gate
Truth Table for
AND - OR - NAND - NOR - ROR