You are on page 1of 14

I.

CHATPER TWO: COMBINATIONAL LOGIC


Introduction

1. Boolean Algebra
Boolean algebra also known as the algebra of logic was developed by an English mathematician called
George Boole. It deals with binary variables and logic operators operating on these variables. A binary
variable has only two possible values 0 or 1. Logic operators operating on these variables are AND (·), OR
(+) and NOT (‘). Operations are defined for the values 0 and 1 as follows:

AND
0·0=0 OR NOT
0·1= 0 0+0=0 0=1
1. 0 = 0 0+1=1 1= 0
1·1=1 1+ 0 = 1
1+1=1

|Page HND1/DIGITALELECTRONICS
1.1. Laws and Theorems of Boolean Algebra

Where (~) is (‘)

|Page HND1/DIGITALELECTRONICS
1.2. Simplifying Boolean Expressions
There are two main methos of simplifying Boolean expressions: Using laws of Boolean algebra and using the Karnaugh
map.

Simplifying a Boolean expression using the laws of Boolean algebra is to write the expression in its
simplest form whiles making use of the laws listed..

Example 1: Simplify the expression 𝐴𝐵 + (𝐵 + 𝐶) + 𝐵(𝐵 + 𝐶)


Solution:
𝐴𝐵 + (𝐵 + 𝐶) + 𝐵(𝐵 + 𝐶) = 𝐴𝐵 + 𝐴𝐵 + 𝐴𝐶 + 𝐵𝐵 + 𝐵𝐶 Distributiverule
= 𝐴𝐵 + 𝐴𝐵 + 𝐴𝐶 + 𝐵 + 𝐵𝐶 Idempotence rule 𝐵 = 𝐵
= 𝐴𝐵 + 𝐴𝐶 + 𝐵 + 𝐵𝐶 Idempotencerule 𝐴𝐵 + 𝐴𝐵 = 𝐴𝐵
= 𝐴𝐵 + 𝐴𝐶 + 𝐵 Absorption rule 𝐵 + 𝐵𝐶 = 𝐵
= 𝐵 + 𝐴𝐶 Absorption rule𝐴𝐵 + 𝐵 = 𝐵

Example 2: Simplify the expression


𝐴𝐵 + (𝐵+𝐶) + 𝐵(𝐵+𝐶) = 𝐴𝐵 + 𝐴(𝐵𝐶) + 𝐵(𝐵𝐶) De Morgan’s theorem
= 𝐴𝐵 + 𝐴𝐵𝐶 + 𝐵𝐵𝐶
= 𝐴𝐵 + 𝐴𝐵𝐶 + 0𝐶 Complement law𝐵𝐵 = 0
= 𝐴𝐵 + 𝐴𝐵𝐶 + 0 Distributive law,
Redundancy law0𝐶′ = 0
= 𝐴𝐵(1 + 𝐶) Redundancy1 + 𝐶’ = 1
= 𝐴𝐵 1 Identity rule𝐴𝐵 ∙ 1 = 𝐴𝐵
= 𝐴𝐵 Identity rule𝐴𝐵 ∙ 1

Example 3: Use De Morgan’s theorems to simplify the following


i) (𝐴+𝐵𝐶+𝐶𝐵)
ii) (𝐴𝐵+𝐴𝐶)

Example 4: Show that


i) 𝐴 + 𝐴𝐵 = 𝐴
ii) (𝐴+𝐵) = 𝐵(𝐴 + 𝐵) iii)
(𝐴 + 𝐵)(𝐴 + 𝐵) = 𝐴

3|Page HND1/DIGITALELECTRONICS
1.3. Constructing Truth Tables
A truth table shows the output for all possible values of the input variables. To construct a truth table, we
evaluate the Boolean expression for all possible combinations of values for the input variables. The
number of possible combinations is always equal to 2𝑛 where is the number of input variables.

Example 1: Construct a truth table for the expression 𝐴 + 𝐴𝐵

We have 2 input variables and 𝐵 ⇒ we will have 22 = 4 different combinations.

𝐴 𝐵 𝐴 𝐴 𝐴+
𝐴𝐵
0 0 1 0 0
0 1 1 1 1
1 0 0 0 1
1 1 0 0 1

Example 2: Construct a truth table for the expression 𝐵 + 𝐴𝐶


3 input variables ⇒ 23 = 8 different combinations

𝐵+
𝐴 𝐵 𝐶 𝐴𝐶
𝐴𝐶
0 0 0 0 0
0 0 1 0 0
0 1 0 0 1
0 1 1 0 1
1 0 0 0 0
1 0 1 1 1
1 1 0 0 1
1 1 1 1 1

Example 3: Construct the truth tables for the following


i) 𝐴𝐵 + 𝐴𝐵
ii) 𝐴𝐵𝐶 + 𝐴𝐵𝐶 [(𝐴x or C)]
iii) (𝐴 + 𝐶)(𝐴 + 𝐵)

|Page HND1/DIGITALELECTRONICS
1.4. Simplification using Karnaugh map

The Karnaugh Map also called as K Map is a graphical representation that provides a systematic method
for simplifying the boolean expressions. For a boolean expression consisting of n-variables, number of
cells required in K Map = 2n cells.

Two Variable K Map-

• Two variable K Map is drawn for a boolean expression consisting of two variables.

• The number of cells present in two variable K Map = 22 = 4 cells.

• So, for a boolean function consisting of two variables, we draw a 2 x 2 K Map. Two

variable K Map may be represented as-

Here, A and B are the two variables of the given boolean function.

Three Variable K Map-

• Three variable K Map is drawn for a boolean expression consisting of three variables.

• The number of cells present in three variable K Map = 23 = 8 cells.

• So, for a boolean function consisting of three variables, we draw a 2 x 4 K Map

5|Page HND1/DIGITALELECTRONICS
Three variable K Map may be represented as-

Here, A, B and C are the three variables of the given boolean function.

Four Variable K Map-

• Four variable K Map is drawn for a boolean expression consisting of four variables.

• The number of cells present in four variable K Map = 24 = 16 cells.

• So, for a boolean function consisting of four variables, we draw a 4 x 4 K Map Four

|Page HND1/DIGITALELECTRONICS
FOUR variable K Map may be represented as-

Here, A, B, C and D are the four variables of the given boolean function.

Karnaugh Map Simplification Rules-

To minimize the given boolean function,


• We draw a K Map according to the number of variables it contains.

• We fill the K Map with 0’s and 1’s according to its function.

• Then, we minimize the function in accordance with the following rules.

Rule-01:

• We can either group 0’s with 0’s or 1’s with 1’s but we can not group 0’s and 1’s

together.
• X representing don’t care can be grouped with 0’s as well as 1’s.

Rule-02:

• Groups may overlap each other.

Rule-03:

7|Page HND1/DIGITALELECTRONICS
• We can only create a group whose number of cells can be represented in the power of
2.
• In other words, a group can only contain 2n i.e. 1, 2, 4, 8, 16 and so on number of cells.

Example

|Page HND1/DIGITALELECTRONICS
Rule-04:

• Groups can be only either horizontal or vertical.


• We can not create groups of diagonal or any other shape.

Rule-05:

• Each group should be as large as possible.

Example-

Rule-06:

• Opposite grouping and corner grouping are allowed.

• The example of opposite grouping is shown illustrated in Rule-05.

• The example of corner grouping is shown below.

Example-
6|Page HND1/DIGITALELECTRONICS

Rule-07:

• There should be as few groups as possible.

Example 1: Simplify the expression 𝐴𝐵 + (𝐵 + 𝐶) + 𝐵(𝐵 + 𝐶)

2. Logic Gates and Circuits


Logic gates and circuits are simply ways of representing Boolean functions and expressions
electronically.

2.1. Logic Gates


A logic gate is an electronic device that implements a simple Boolean function. Logic gates carry out the
operations that the microprocessor performs. When a microprocessor is designed, a logic gate cell library
(collection of all low level logic functions used to implement the logic) is also deeply planned and
developed.
There are seven basic logic gates: AND, OR, NOT, NAND, NOR and XOR.

a. AND Gate
It is a logic gate whose output is “true” only when both inputs are “true”. If neither or only one of the
inputs is “false”, the output is “false”. The following illustration and table show the circuit symbol and
logic combinations for an AND gate.

A B Output
0 0 0
0 1 0
Logic AND 1 0 0
1 1 1

b. OR Gate
It is a logic gate whose output is “true” when either or both of the inputs are “true”. If both inputs are
"false," then the output is "false."

A B Output
0 0 0
0 1 1
Logic OR
1 0 1
1 1 1

10 | P a g e HND1/DIGITALELECTRONICS
c. NOT Gate
It is a logic gate whose output is “false” if its input is “true” and vice versa. It is called logical inverter,
because it reverses the state of its input. A NOT gate accepts one input and produces a single output.

A Output
0 1
1 0
Logic NOT (inverter)

d. NAND Gate
The NAND gate operates as an AND gate followed by a NOT gate. The output is "false" if both inputs are
"true." Otherwise, the output is "true.

A B Output
0 0 1
0 1 1
Logic NAND 1 0 1
1 1 0

e. NOR Gate
A NOR gate is equivalent to an OR gate followed by a NOT gate. Its output is "true" if both inputs are
"false." Otherwise, the output is "false."

A B Output
0 0 1
0 1 0
1 0 0
Logic NOR
1 1 0

f. XOR Gate
Exclusive-OR is a logic gate whose output is “true” when one but not both of its inputs is “true”. The
output is "false" if both inputs are "false" or if both inputs are "true." Another way of looking at this circuit
is to observe that the output is “true” if the inputs are different, but “false” if the inputs are the same.

A B Output
0 0 0
0 1 1
Logic XOR
1 0 1
1 1 0

In summary, the above gates can be seen on the figure below.

11 | P a g e HND1/DIGITALELECTRONICS
3. Combinational logic
A combinational circuit is the one in which the output is only dependent on the present input. For the
sake of this course, we will start by working on constructing and building logic circuits and later dwell on
the combinational logic.

Circuits are made by combining two or more logic gates. Gates are combined into circuits by using the
output of one gate as the input for another.
Examples

12 | P a g e HND1/DIGITALELECTRONICS
Exercise 1: Construct logic circuits for the following expressions
1) 𝐴𝐵 + 𝐴𝐵
2) (𝐴 + 𝐵)(𝐴+𝐵
3) 𝐴(𝐵 + 𝐴)
4) (𝐴 + 𝐵)(ABC̅̅̅̅̅̅̅̅̅̅̅̅̅̅̅ )
5) (𝐴 + 𝐵)𝐴𝐶

Exercise 2: What are the outputs for the following logic circuits

13 | P a g e HND1/DIGITALELECTRONICS
|Page HND1/DIGITALELECTRONICS

14

You might also like