You are on page 1of 10

Introduction

Boolean functions may be practically implemented by using electronic gates. The following
points are important to understand.

• Electronic gates require a power supply.


• Gate INPUTS are driven by voltages having two nominal values, e.g. 0V and 5V
representing logic 0 and logic 1 respectively.
• The OUTPUT of a gate provides two nominal values of voltage only, e.g. 0V and 5V
representing logic 0 and logic 1 respectively. In general, there is only one output to a
logic gate except in some special cases.
• There is always a time delay between an input being applied and the output responding.

• Logic is a form of human reasoning that tells us a certain proposition is true if


certain preconditions are true.

• In 1854 George Boole developed a mathematical system for formulating logic


statements with symbols, so the problems could be written and solved in a
similar manner to ordinary algebra. His system is called Boolean Algebra and
it is used in the analysis and design of digital systems.

• The basic building blocks of digital circuits are called logic gates. A gate is a
circuit that performs a simple logic operation. Gates can have one, two, three
or more inputs and the basic gates have a single output dependent on the
inputs. Each output is also called a digital ‘bit’ of information (or ‘bit’ for
short).

• The behavior of a gate can be shown in a truth table which systematically lists
all the possible input states for a gate and the corresponding output states.
Gates can be represented in five ways.

Consider the AND gate:


• A zero ( 0 ) corresponds to a low voltage. A one ( 1 ) corresponds to a high
voltage. An inverter logic gates converts a low voltage ( 0 ) to a high voltage (
1 ) or vice versa. Some alternative meanings for 0 and 1 are as follows:

Logic 0 Logic 1

False True

Off On

Low High

Open switch Closed switch


• Digital circuits can be put together using diodes, transistors and resistors and
connected together to provide a circuit output that corresponds to the logic
operations OR, AND, NOT performed on the inputs to those circuits.
• NOR and NAND gates are used extensively in digital circuitry. These gates
combine the basic operations AND OR and NOT which make it relatively
easy to describe them using Boolean Algebra. EELAB Student Pages, Electrical
and Information Engineering, The University of Sydney, NSW.
• Negative logic circuits can also be used where the positive logic gate is
equivalent to the complement when acting in a negative logic circuit, for
example +OR is equivalent to -AND and -AND is equivalent to +OR.
• In working through the above information about logic gates, you will have
noticed that each logic gate is represented uniquely. This is useful when
drawing and interpreting diagrams of logic circuits.

The set of symbols is as follows:

Name Symbol Input Output

AND Two signals One signal

OR Two signals One signal

NOT One signal One signal

NAND Two signals One signal

NOR Two signals One signal

XOR Two signals One signal

Logic gates

Digital systems are said to be constructed by using logic gates. These gates are the AND, OR,
NOT, NAND, NOR, EXOR and EXNOR gates. The basic operations are described below with
the aid of truth tables.

AND gate

The AND gate is an electronic circuit that gives a high output (1) only if all its inputs are
high. A dot (.) is used to show the AND operation i.e. A.B. Bear in mind that this dot is
sometimes omitted i.e. AB

OR gate
The OR gate is an electronic circuit that gives a high output (1) if one or more of its
inputs are high. A plus (+) is used to show the OR operation.

NOT gate

The NOT gate is an electronic circuit that produces an inverted version of the input at its
output. It is also known as an inverter. If the input variable is A, the inverted output is
known as NOT A. This is also shown as A', or A with a bar over the top, as shown at the
outputs. The diagrams below show two ways that the NAND logic gate can be configured
to produce a NOT gate. It can also be done using NOR logic gates in the same way.

NAND gate

This is a NOT-AND gate which is equal to an AND gate followed by a NOT gate. The
outputs of all NAND gates are high if any of the inputs are low. The symbol is an AND
gate with a small circle on the output. The small circle represents inversion.

NOR gate

This is a NOT-OR gate which is equal to an OR gate followed by a NOT gate. The
outputs of all NOR gates are low if any of the inputs are high.
The symbol is an OR gate with a small circle on the output. The small circle represents
inversion.

EXOR gate

The 'Exclusive-OR' gate is a circuit which will give a high output if either, but not both,
of its two inputs are high. An encircled plus sign ( ) is used to show the EOR operation.
EXNOR gate

The 'Exclusive-NOR' gate circuit does the opposite to the EOR gate. It will give a low output
if either, but not both, of its two inputs are high. The symbol is an EXOR gate with a small
circle on the output. The small circle represents inversion.

The NAND and NOR gates are called universal functions since with either one the AND and
OR functions and NOT can be generated.

Note:

A function in sum of products form can be implemented using NAND gates by replacing all
AND and OR gates by NAND gates.

A function in product of sums form can be implemented using NOR gates by replacing all AND
and OR gates by NOR gates.

Table 1: Logic gate symbols

Table 2 is a summary truth table of the input/output combinations for the NOT gate together
with all possible input/output combinations for the other gate functions. Also note that a truth
table with 'n' inputs has 2n rows. You can compare the outputs of different gates.

Table 2: Logic gates representation using the Truth table


How Logic Gates Work

As we all know the microprocessor is the 'brain' of the modern digital computer,
but have you ever wondered how a piece of silicon manages to process
information so accurately and at such a high speed rate? The answer lies behind
the basic building blocks of the processor, the logic gates, and a special type of
information processing technique invented in the middle of the 1800s by George
Boole, called Boolean logic.

Basically, Boolean logic operates only in the binary system by following a couple of simple rules.
There are about seven simple logic gates that need to be studies in order to understand the full
picture of how Boolean logic and computer microprocessors work by combining logical gates in
a single electronic circuit that may contain several million transistors.

We'll start with the simplest of all - the NOT gate, or the logical inverter (see bottom image,
lower left corner). The NOT gate has one entrance and one exit and has the role of inverting logic
bits. This basically means that when a '1' logic bit is applied on the 'a' terminal for example, the 'c'
terminal must produce a '0' logic bit. The situation is reversed when '0' logic is applied on the 'a'
terminal by forcing the 'c' terminal to output a '1' logic bit. Inversion is one of the basic operations
in Boolean logic.

Another logic gate of critical importance is the AND gate (upper left corner), which practically
designates an operation similar to multiplying. As you can see, the AND gate has two input
terminals (a,b) and an output terminal (c). In fact the number of input terminals is unlimited.
Boolean logic puts it very simple. If one of the input values is '0' logic, then the value of the other
bits is irrelevant and the output will always produce a '0' logic. A '1' logic bit is present at the
output terminal, only when all input bits are equal to '1' logic.

The OR gate, operates according to the logic that if one of the input terminals bears a '1' logic bit,
then the 'c' terminal will always produce a '1'. The situation reverses when all of the input bits are
'0' logic. The NAND (NOT AND) and NOR (NOT OR) gates can be imagined
as an AND respectively an OR gate to whose output terminals a NOT gate (see
image for symbols) is connected. Their logic is basically identical to that of
AND and OR gates, but the output value is always reversed.

The last two significant logic gates are the XOR and XNOR gates, both of
which can be constructed by using the basic logic gates (similar to the case of NAND and OR
gates). XOR outputs a '1' logic only when a single input value equals '1' logic. In other cases the
output produces a '0' bit. XNOR gates produce XOR reverse values.

Truth Tables
A truth table shows how a logic circuit's output responds to various combinations of the inputs,
using logic 1 for true and logic 0 for false. All permutations of the inputs are listed on the left,
and the output of the circuit is listed on the right. The desired output can be achieved by a
combination of logic gates. A truth table for two inputs is shown, but it can be extended to any
number of inputs. The input columns are usually constructed in the order of binary counting
with a number of bits equal to the number of inputs.
Negative Logic Gates

Each of the basicgates has a negative logic


equivalent as shown. The equivalence is shown
by the application ofDeMorgan's theorem. It
amounts to changing AND's to OR's or vice
versa and inverting all input and output lines
compared to the implementation in gates shown
at left.