Unit6 Boolean Algebra and LOgical Gates

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

UNIT 6: BOOLEAN ALGEBRA AND LOGICAL GATE

Simplic circuits representing logic gates

Before we look at logic gates, let us try to represent basic logic operations using an
arrangement of switches that can control the states of a light bulb, either to go ON or OFF.

a) OR Operation b) AND Operation


A Battery A B

Battery Bulb
Bulb

c) NOT Operation

1. NOT circuit

In this circuit, when switch A is open, the bulb comes ON since there is a complete flow of
electrical current in the circuit. However, when A is closed, the bulb finds itself in between two
+ve opposing voltages that are equal to each other so it goes OFF. Therefore, when the state of
the switch is 1, that of the bulb is at 0. This is a generally referred to as the inversion or NOT
operation i.e. it inverts the input from 1 to 0 and vice versa.
2. AND circuit

Both switch A AND B must be closed (in state 1) before the bulb can light. If either or both
switches are open, the bulb is also OFF. This circuit represents the AND logic where all the
switches must be closed in order to light the bulb.
3. OR Logic
In this case if either switch A OR B is closed, the bulb will light. The bulb will be off only if
both switches A and B are open at the same time.
LOGIC GATE
A logic gate is the basic building block of a digital circuit. A digital circuit is one that can only be in
one of two states at any one time, either ON or OFF. An ON means there is high voltage in the
circuit while an OFF means zero or no voltage in the circuit. It usually has an input side (with one,
two or more inputs) and a single output.

Basic logic gates

There are quite a number of different logic gates. However, the basic ones are shown in table
6.1 below. Before discussing each one of them, take note of their names and drawing. You
should be able to identify and/or draw the representation of a particular gate.

6.3 Truth tables


A truth table is a mathematical table used in Boolean algebra or propositional logic to compute
the outcome of all possible combinations of input values i.e. it can be used to tell whether an
expression is valid for all legitimate input values. For example, if the inputs A and B can take
values 0 and 1; then possible combinations for inputs (A,B) are {(0,0), ),(0,1), (1,0) and (1,1)}.

The truth tables are important because they help us to know the output of each individual gate
given certain inputs hence we can use them to construct more complex logic circuits that can
solve real problems.
Truth tables for various logic gates

Based on the characteristics of individual logic gates, we can be able to investigate the
behaviour of each gate when a combination of inputs are used. For the sake of simplicity, we
look at gates that have only two inputs and one output. We accomplish this by constructing truth
tables. A truth table arranges all possible input combinations and their relevant outputs. In this
case, A and B represent inputs to the logic gate while Q the output.

Boolean algebra

Boolean algebra was invented by George Boole in 1654. It can be used to automate the
manipulation of objects that control real life processes. This is because computers are made up
of digital switches that are either ON or OFF. Since the inputs and outcomes of Boolean algebra
are either 1 or 0, it is a more natural way of representing digital information or computing logic.
The algebra is used to explain or solve problems related to logic and digital circuits.

6. Laws of Boolean algebra


Boolean operations revolve around boolean operators. A boolean operator takes two inputs of
either 1 or 0 and output a single value also either 1 or 0.

There are several laws of Boolean algebra. The most common operators that are used to
manipulate the various logic elements are the OR (+) and the AND (•) e.g.
A + B means A OR B.

A•B means A AND B or mostly just written as AB without the (•) symbol.
1. Commutative law
The commutative law states as follows:
A+B=B+A

A•B = B•A

2. Associative law
The associative law states as follows:
(A+B)+C=A+(B+C)

(A•B)•C = A•(B•C)
3. Distributive law
The distributive law states as follows:
A•(B+C) = A•B + A•C

A + (B•C) = (A+B).(A+C)

4. Identity law
The identity law states as follows:

(i) A + A = A

(ii) A•A = A
Also:

(iii) A•B + A•B – = A


(iv) (A+B)•(A+B) = A

NB: If A = 1 then A = 0. The bar on top signifies a NOT operation on the variable.
5. Redundance law
The redundance law states as follows:

A+A•B=A

A•(A+B) = A

6. De Morgans law

The De Morgans law:


– –
(A+B)

(i) =A.B
– –

(ii) (A•B) = A + B

NB: One of the most common mistakes that learners make is to assume that:

(A•B) = A•B.

This is wrong and is not an equality.

7. Boolean constants

(i) A•0 = 0 (Null law) (iii) A+0 = A

(ii) A•1 = A (Identity) (iv) A+1 = 1

Boolean algebra simplification


Using the above laws, both simple and complicated Boolean expressions and logic circuits can
be simplified and solved. Truth tables for the expressions are used to come up with relevant
solutions.
Similarly, the Boolean laws stated above can be used to simplify complex Boolean expressions.
It is often the case that a complex Boolean equation has to be simplified into its simpler exact
equivalent. This becomes very useful when one is designing circuits and wants to minimize the
number of gates needed to build the circuit. There are two methods of simplifying Boolean
expressions:
Using truth tables.

Using boolean algebra which entails applying identities and De-Morgan’s law.

Sum of Product (SOP) and Product of Sum (POS)

Using truth tables to simplify Boolean equations is good and straight forward. However, when
the logic circuits become more complex with more inputs, truth tables become very
cumbersome. It is desired therefore to find a better way of representing logic in such scenarios.
We use a standard form of boolean equations known as the canonical form written in SOP or
POS format. The SOP and POS equations help a person to quickly derive solutions from a
given logic table and come up with equivalent logic circuits.

Sum of products

We have so far seen that given a boolean value A, we assume that A = 1 and its complement is
A = 0. Conventionally, we can write a boolean expression which has three variables in the
following form:

F(A,B,C) = ABC + ABC + ABC

This kind of expression has three groups of the products of the variables A, B and
(AND operations) which are summed together (ORed). We therefore call such an expression a
sum of products (SOP). Each term in the equation is called a minterm
e.g. ABC is one of the three minterms. However, note that the domain of three binary variables
is capable of generating eight different minterms but only three were chosen for the above
equation. We are going to see how such equations are generated from truth tables.

In the SOP arrangement, the AND operations have precedence over the OR operations.

That means we first AND the terms in the minterms before we do the OR operations.

2 Product of sums (POS)


The product of sums (POS) takes every combination of variables in the domain and performs an
OR operation. The OR operations are then ANDed. Each valid combination is called a Maxterm
and is designated as Mx where x = 1, 2, 3 . . . n. The OR operations take precedence over the AND
operations here.
END UNIT 6

You might also like