0% found this document useful (0 votes)
79 views12 pages

CHAPTER - 3 - Logic - Circuits

The document discusses logic circuits and gates. It defines logic circuits as circuits whose inputs and outputs are described by logical variables of 0 and 1. There are two main types: combinational circuits whose outputs only depend on current inputs, and sequential circuits whose outputs depend on both current inputs and the network's current state. The basic logic gates are introduced as NOT, AND, OR, NAND, NOR, XOR, and XNOR. More complex gates can be created by combining simpler gates.

Uploaded by

Okwir Edmond
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
0% found this document useful (0 votes)
79 views12 pages

CHAPTER - 3 - Logic - Circuits

The document discusses logic circuits and gates. It defines logic circuits as circuits whose inputs and outputs are described by logical variables of 0 and 1. There are two main types: combinational circuits whose outputs only depend on current inputs, and sequential circuits whose outputs depend on both current inputs and the network's current state. The basic logic gates are introduced as NOT, AND, OR, NAND, NOR, XOR, and XNOR. More complex gates can be created by combining simpler gates.

Uploaded by

Okwir Edmond
Copyright
© © All Rights Reserved
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 12

CHAPTER 3

LOGIC CIRCUITS
 Digital computers are based upon electronic components
whose inputs and outputs are at anyone point in one of two
possible states; the states are mostly voltage levels;
 One voltage level can be denoted by a 1 and another by a 0.
 If the higher voltage is associated with 1, the circuit is said to
be based upon positive logic. If the lower voltage is associated
with a 1, the circuit is said to be based on negative logic.
 A variable that can take on two states e.g. (0, 1, True, false;
on/off) is called a logical variable.
 A circuit whose inputs and outputs are described by logical
variables is called a logical network.
INPUTS OUTPUTS
Logical Network

Logical Variables Logical Variables

There are two types of logical networks:


1. Combinatorial networks: Their outputs depend on the current
inputs.
2. Sequential Networks: Their outputs depend on both the current
state of the network as well as the inputs.

Logic Gates
A combinatorial circuit with only one output is called a logic gate. They
accept logical values at their inputs and they produce corresponding
logical values at their outputs.
 A table listing all the outputs for the various inputs is called a
truth table (derived from the True/ False logic in mathematics.)
 All combinatorial circuits can be constructed from the
elementary logic gates.

The most common 7 logic gates are:


1. The inverter(NOT) Gate:
When the input is 1 the output is 0 and vice versa.
_
A A INPUT OUTPUT
_
A A
0 1

1 0

2. The AND Gate:


A
A AND B
B AB

Input Output
A B AB
0 0 0
0 1 0
1 0 0
1 1 1
The output is 1 if all the inputs are 1’s
Switch A Switch B

Lamp
'AND' gates are like two or more switches in series. All the switches
have to be closed (‘ON’ or a value of '1') in order to make the lamp
(output C) turn on. If all inputs are not "ON", the output is "OFF".

.
3. The OR Gate:
A
A OR B
A+B
B

Input Output
A B A + B
0 0 0
0 1 1
1 0 1
1 1 1

The output is 0 if all the inputs are 0’s.


Switch A

Switch B
An 'OR' gate is like two or more switches in parallel. Only one switch
needs to be closed ('ON' or a value of '1') in order to make the lamp
(output C) turn 'ON' with a value of '1'.

If an inverter is combined with another logic gate, the presence of the


inverter is indicated by placing a small circle at the affected input or
output.

4. The NAND (NOT AND) Gate:


A NAND B
A __ A
B AB B

Input Output
__
A B AB
0 0 1
0 1 1
1 0 1
1 1 0

AB = A + B
The output is 0 if all the inputs are 1’s.
5. The NOR (Not OR) Gate:

A A OR B A
B _____
A+B B

_____ _ _
A+B = AB

Input Output
____
A B A+B
0 0 1
0 1 0
1 0 0
1 1 0
The output is 1 if all the inputs are 0’s.

6. The EXCLUSIVE OR Gate:


A A Excl OR B
B A + B

Input Output
A B A + B
0 0 0
0 1 1
1 0 1
1 1 0
The output is 0 if all the inputs are the same. OR
It outputs a 1 if the number of 1’s in the inputs is odd.

7. The EXCLUSIVE NOR Gate:


A Excl NOR B A
______
A + B B

Input Output
_____
A B A +B
0 0 1
0 1 0
1 0 0
1 1 1
The output is 1 if all the inputs are the same.

Complex Logic gates


Complex logic circuits can be built by combining several of the
elementary logic gates.
A graphical illustration of a logic circuit is called a logical diagram.
Two logic circuits are said to be equivalent if they have exactly the same
input /output relationship.
One way to prove equivalence is to compare the truth table outputs of the
two circuits.

C _
AC + BC

_
(A + B) C
C

_ _ _ _ _
A B C B AC BC AC + BC A+B (A + B)C
0 0 0 1 0 0 0 1 0
0 0 1 1 0 1 1 1 1
0 1 0 0 0 0 0 0 0
0 1 1 0 0 0 0 0 0
1 0 0 1 0 0 0 1 0
1 0 1 1 1 1 1 1 1
1 1 0 0 0 0 0 1 0
1 1 1 0 1 0 1 1 1

To try Circuits for AB(C+D) and (ABC + ABD) and their Truth Tables.
X = AB + ACD + ACEF + ACEG
A A B C D E F G
B
C
D
E
F
G

X
(Causes minimum delay)

Causes maximum delay


X minimum number of inputs
BOOLEAN ALGEBRA
It is a mathematical structure that consists of a set containing only a 0
and 1, the unary operator (complementation) and the binary operation of
addition and multiplication. Subtraction and Division are not defined in
Boolean algebra. This branch of mathematics was developed by George
Boole in 1847.
Some of the equivalencies mostly frequently used in reducing Boolean Expressions
A = A
AA = A
A+A = A
A.0 = 0
A+0 = A
A.1 = A
A+1 = 1
_
A.A = 0
_
A+A = 1
AB = BA
A+B = B+A
(AB)C = A(BC)
A + (B + C) = (A + B) + C
A(B + C) = AB + AC
(B + C)A = BA + CA
____ _ _
A+B = AB
___ _ _
AB = A+B
_
AB + AB = A
A + AB = A
_
(A + B)B = AB
_
(A + B) (A + B) = A
(A + B) (A + C) = A + BC
A(A + B)= A
_
AB + B = A+B
_ _
AB + AB = A + B
__
AB(A + B) = A + B

e.g.
__
ABC + BC + AB
__
 C(AB + B) + AB
 _
 C(A + B) + AB (third equivalence from the bottom)
 _
 AC + BC + AB
 _ _
 AC + (A + A)BC + AB
 _ _
 AC + ABC + ABC + AB

 _
 AC(1 + B) + AB(C + 1)
 _
 AC + AB

_ _ _
ABC + ABC + ABC + ABC
_ _ _
 ABC + ABC + ABC + ABC + ABC + ABC
 _ _ _
 (A + A)BC + (B + B)AC + (C + C)AB
 BC + AC + AB
Digital Design Process
1. Determine all the input/output relationships that must be true for
the network being designed and put them in convenient tabular
form.
2. Use the drawn up table to find Boolean expressions for each
output.
3. Simplify the expressions from 2 above
4. Use the expressions resulting from step 3 to develop the desired
logical diagram.

Three design tools have been introduced:


1. Truth Table (To define a logical network)
2. Boolean Expression (for minimization)
3. Logic diagram (For the actual design)
A designer must be able to convert from one form of a network’s
description to another.

Truth Table Boolean Logic


Expression Diagram

Example
Suppose that a three input network is needed that will output a 1 if the majority of the
inputs are 1’s otherwise the output is zero.

Step 1 (Draw a truth Table)

A B C X
0 0 0 0 X0
0 0 1 0 X1
0 1 0 0 X2
0 1 1 1 X3
1 0 0 0 X4
1 0 1 1 X5
1 1 0 1 X6
1 1 1 1 X7

Step 2 (Find the Boolean expression.)


There are two types of Boolean Expressions
(i) SUM OF PRODUCTS (SOP’s)
A product is 1 if and only if all of its factors are 1
A sum is 1 if at least one of its terms is a 1.
_ _ _
X3 = ABC; X5 = ABC; X6 = ABC; X7 = ABC
X = X3 + X 5 + X 6 + X 7
_ _ _
=> ABC + ABC + ABC + ABC

(ii) PRODUCT OF SUMS (POS)


A product is 0 if at least one of its factors is 0
A sum is 0 if all its terms are 0’s.
_ _ _
X0 = A + B + C X1 = A + B + C X2 = A + B + C X4 = A + B + C
_ _ _
X = X0X1X2X4 =>(A + B +C)(A + B + C)(A + B + C)(A + B + C)

Step 3 Simplify the expression


_ _ _
=> ABC + ABC + ABC + ABC = BC + AC + AB

Step 4 Draw the logic diagram.


A B C

BC

AC BC + AC + AB

AB

Minimisation of expressions using Karnaugh Maps


 A literal is a single variable within a term which may or may
not be complemented.
 A term in the SUM OF PRODUCTS that includes a literal for
every input is called a miniterm. (It is the product of N distinct
literals where each literal occurs exactly once.)
 A term in the PRODUCT OF SUMS that includes a literal for
every input is called a maxiterm. (It is the sum of N distinct literals
where each literal occurs exactly once.)
_ _ _ _ _ _
e.g. in ABC + ABC + AC; ABC and ABC are miniterms, AC is not a
miniterm.
_ _ _ _ _ _ _ _ _
Similarly in (A +B+C)(A+B+C)(A+C), (A +B+C) and (A+B+C) are
_
maxiterms, (A+C) is not.

A Karnaugh map is a truth table for a single output consisting of arrays of squares
where each square corresponds to a row of a truth table.
The symbols at the top represent the variables associated with the
columns and the symbols on the left represent the variables associated
with the rows.
The value of each output for each input is put in the corresponding
square.
For each 1 in the Karnaugh map there is a corresponding miniterm in the
output’s Sum of product expression and each 0 represents a maxiterm in
the Product of Sums expression.
Two inputs Three inputs Four inputs
A AB AB
0 1 00 01 11 10 00 01 11 10
0 0 2 0 0 2 6 4 00 0 4 12 8
B C 01 1 5 13 9
1 1 3 1 1 3 7 5 CD
11 3 7 15 11

10 2 6 14 10
Example 1
A B C X Using Boolean simplification:
0 0 0 0 _ _
0 0 1 0 ABC +ABC + ABC
0 1 0 0 _ _
0 1 1 1 ABC +ABC + ABC + ABC
1 0 0 0
1 0 1 0 = AB + BC AB
1 1 0 1 00 01 11 10
1 1 1 1 0 0 0 1 0
C 1 0 1 1 0
Look for adjacent groups that include 2n miniterms where n is an integer.
The larger the group the greater is the reduction.

Example 2
A B C X Using Boolean simplification:
0 0 0 0 _ _ _
0 0 1 0 ABC +ABC + ABC + ABC
0 1 0 0 _ _ _
0 1 1 1 ABC +ABC + ABC + ABC + ABC + ABC
1 0 0 0
1 0 1 1 = BC + AC + AB
1 1 0 1
1 1 1 1
AB
00 01 11 10
0 0 0 1 0
C
1 0 1 1 1

A function may be used to state where the output is 1 instead of drawing


a Karnaugh map. e.g. for the above example F(A,B,C) = (3,5,6,7)

Example 3
F(A,B,C) = (0,1,2,3,7) AB
_ 00 01 11 10
A 0 1 1 0 0 _
C A + BC
BC 1 1 1 1 0
AB AB
00 01 11 10 00 01 11 10
0 1 0 1 1 _ 0 1 0 0 1
C AC C
1 1 0 0 1 1 0 1 0 0

_ _ _ __
B + AC ABC + BC
AB AB
00 01 11 10 00 01 11 10
00 0 1 1 1 00
1 0 0 1
01 0 1 0 1 01
CD CD 1 0 0 0
11 0 0 0 1 11
1 0 0 1
10 0 0 0 1 10
1 0 0 1
_ _ __ _ __ _ _ _
ABC + ACD + AB AB + BC + BD
For some designs some input combinations cannot occur. Outputs
corresponding to these combinations are optional. These combinations
may be chosen to be either 0 or 1 as is convenient in the maximization
process.
These outputs are represented by X’s in the Karnaugh Map and they
may or may not be included in the prime implicants.
They are called Don’t Care Cases denoted by the function d(A,B,C) =
(….) AB

00 01 11 10
00 X

01 1
CD _
11 1 AB + AC

10 X 1 1

___ _ _
It is important to include the miniterm ABCD in C but not ABCD

Example
A network is needed that will output a 1 if the binary A 3A2A1A0 is greater
than 0 and less than 4.
Assume also the inputs are controlled by a rotary switch such that only
one input can be a 1 at any given time except when the switch position
will also allow all inputs to be 1.
A3 A2 A1 A0 X A3A2
0 0 0 0 0 00 01 11 10
0 0 0 1 1 00 0 0 X X
0 0 1 0 1
0 0 1 1 X 01 1 X X X
0 1 0 0 0 A1A0
0 1 0 1 X 11 X X 0 X
0 1 1 0 X
0 1 1 1 X 10 1 X X X
1 0 0 0 0
1 0 0 1 X
1 0 1 0 X _ _
1 0 1 1 X = A 1A 0 + A0A3
1 1 0 0 X
1 1 0 1 X
1 1 1 0 X
1 1 1 1 0

You might also like