DigitalLogicDesignLab LabManual DigitallogicdesignfeaturingEWB PDF
DigitalLogicDesignLab LabManual DigitallogicdesignfeaturingEWB PDF
net/publication/273892459
CITATIONS READS
0 15,738
1 author:
Sulieman Bani-Ahmad
Al-Balqa' Applied University
55 PUBLICATIONS 458 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Automatic Detection and Classification of the Ghor-area Plant Diseases View project
All content following this page was uploaded by Sulieman Bani-Ahmad on 23 March 2015.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 2 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Table of Contents
Table of Contents .......................................................................................................................................................... 3
[Lab 1]. Familiarization; Playing with EWB 5.12......................................................................................................... 7
Introduction to Electronics Workbench ........................................................................................................................ 7
Using Electronics Workbench for Design .................................................................................................................. 7
General EWB Functions............................................................................................................................................. 8
Lab Tasks ..................................................................................................................................................................... 10
Task 1: Name the basic toolboxes of EWB .............................................................................................................. 10
Task 2: Basic buttons in EWB toolboxes ................................................................................................................. 11
Task 3 EWB Toolbar ................................................................................................................................................ 11
Task 4: Simple circuit; playing with EWB ................................................................................................................ 11
Task 5: Simple circuit; two inverters connected serially ......................................................................................... 13
Task 6: Simple circuit; a clock source with a red probe .......................................................................................... 13
Task 7: Simple circuit; a clock source with two red probes .................................................................................... 14
Task 8: EWB Menu .................................................................................................................................................. 14
[Lab 2]. Basic logic Gates (AND, OR, and NOT gates) ............................................................................................... 15
Objectives.................................................................................................................................................................... 15
AND and NAND gates .............................................................................................................................................. 15
OR and NOR gates ................................................................................................................................................... 15
NOT gate ................................................................................................................................................................. 16
Lab Tasks ..................................................................................................................................................................... 16
Task 1: The AND and NAND gates ........................................................................................................................... 16
Task 2: The AND-NOT combination ........................................................................................................................ 17
Task 3: The OR and NOR gates ................................................................................................................................ 18
Task 4: The NOR-NOT combination ........................................................................................................................ 19
Task 5: Finding the truth table of a gate using the logic converter ........................................................................ 19
Task 6: Finding the truth table of a gate using the logic converter ........................................................................ 20
Task 7: Finding the truth table of a three input gate using the logic converter ..................................................... 21
Task 8: Finding the truth table of a given circuit using the logic converter ............................................................ 22
[Lab 3]. Digital logic circuits analysis and converting Boolean expressions to digital circuits ................................. 24
Objectives.................................................................................................................................................................... 24
Lab Tasks ..................................................................................................................................................................... 25
Task 1: Converting Boolean expressions into circuits ............................................................................................. 25
Task 2: Converting Boolean expressions into circuits ............................................................................................. 25
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 3 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Task 3: Digital logic circuit analysis – Finding the Boolean expression of a given circuit ....................................... 26
Task 4: Digital logic circuit analysis – Finding the Boolean expression of a given circuit ....................................... 27
Task 5: Logic circuits with multiple outputs ............................................................................................................ 28
Task 6*: Finding the Boolean expression of a given circuit using the logic converter ........................................... 29
Task 7*: Converting Boolean expressions to circuits using the logic converter ..................................................... 29
[Lab 4]. Boolean algebra and Simplification of Boolean expressions - I .................................................................. 30
Objectives.................................................................................................................................................................... 30
DeMorgan’s Theory – Background ............................................................................................................................. 30
Basics of Boolean algebra ....................................................................................................................................... 30
Boolean Laws .......................................................................................................................................................... 30
Simplifying Boolean logic functions ........................................................................................................................ 32
Lab Tasks ..................................................................................................................................................................... 33
Task 1: Circuit analysis ............................................................................................................................................ 33
Task 2: Circuit analysis ............................................................................................................................................ 34
Task 3: Simplifying Boolean functions .................................................................................................................... 35
Task 4: Simplifying Boolean functions .................................................................................................................... 36
Task 5: Simplifying Boolean functions in EWB using the logic converter ............................................................... 37
Task 6: Simplifying Boolean functions in EWB using the logic converter ............................................................... 38
[Lab 5]. DeMorgan’s Theory and the Universal Gates ............................................................................................. 39
Objectives.................................................................................................................................................................... 39
Background ................................................................................................................................................................. 39
Implement any gate with NAND gates only ............................................................................................................ 39
Implement any gate with NOR gates only .............................................................................................................. 40
Equivalent Gates ......................................................................................................................................................... 40
Building Circuits using NAND and NOR gates only...................................................................................................... 41
Example: Building Circuits using NAND gates only ................................................................................................. 41
Example: Building Circuits using NOR gates only .................................................................................................... 42
Lab Tasks ..................................................................................................................................................................... 42
Task 1: The Universal NAND gate............................................................................................................................ 42
Task 2: The Universal NOR gate .............................................................................................................................. 43
Task 3: Implementing circuits using NAND gates only ............................................................................................ 44
Task 3: Implementing circuits using NOR gates only .............................................................................................. 45
Task 4: Implementing circuits using NAND gates only ............................................................................................ 46
Task 5: Implementing circuits using NAND gates only ............................................................................................ 47
[Lab 6]. Simplification of Boolean expressions - II ................................................................................................... 48
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 4 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives.................................................................................................................................................................... 48
Background ................................................................................................................................................................. 48
Lab Tasks ..................................................................................................................................................................... 48
Task 1: Simplifying two-input Boolean functions.................................................................................................... 48
Task 2: Simplifying three-input Boolean functions ................................................................................................. 49
Task 3: Simplifying four-input Boolean functions ................................................................................................... 50
[Lab 7]. The Story of Minterms and Maxterms ........................................................................................................ 53
Objectives.................................................................................................................................................................... 53
Background ................................................................................................................................................................. 53
Lab Tasks ..................................................................................................................................................................... 55
Task 1: Three-input Boolean functions ................................................................................................................... 55
Task 2: Three-input Boolean functions ................................................................................................................... 56
Task 3: Four-input Boolean functions ..................................................................................................................... 57
Task 4: Four-input Boolean functions ..................................................................................................................... 57
Task 5: Simplifying 4-variable functions.................................................................................................................. 58
Task 6: Simplifying 4-variable functions: SOP ......................................................................................................... 59
Task 7: Simplifying 4-variable functions: POS ......................................................................................................... 60
[Lab 8]. XOR and XNOR gates: Basics and Applications ........................................................................................... 61
Objectives.................................................................................................................................................................... 61
Background ................................................................................................................................................................. 61
Lab Tasks ..................................................................................................................................................................... 62
Task 1: XOR built from basic gates .......................................................................................................................... 62
Task 2: XNOR Gate .................................................................................................................................................. 63
Task 3: 3-input XOR Gate ....................................................................................................................................... 64
Task 4: Half adder circuit......................................................................................................................................... 64
Task 5: Implementing HA circuit using EWB ........................................................................................................... 65
Task 6: Implementing FA circuit using EWB ............................................................................................................ 65
Task 7: Implementing a 4-bit parallel adder using 4 FA’s ....................................................................................... 66
Task 8: Implementing a 4-bit parallel subtracter using 4 FA’s ................................................................................ 67
Task 9: Implementing a 4-bit incrementer using 4 FA’s.......................................................................................... 67
Task 10: Implementing a 4-bit decrementer using 4 FA’s ...................................................................................... 68
[Lab 9]. Building logic circuits using Multiplexers .................................................................................................... 69
Objectives.................................................................................................................................................................... 69
Background ................................................................................................................................................................. 69
4 Channel Multiplexer using Logic Gates ................................................................................................................ 69
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 5 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 6 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Electronics Workbench is an electronics and digital logic lab inside a computer, modeled after a real
electronics workbench. It is a design tool that provides you with components & instruments to create
“virtual” board-level designs:
– No actual breadboards, components, or instruments needed.
– Click-and-drag schematic editing.
– It offers mixed analog & digital simulation and graphical waveform analysis.
– Circuit behavior simulated realistically.
– Results displayed on multimeter, oscilloscope, bode plotter, logic analyzer, etc.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 7 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Selecting
– To move a component or instrument need to select it selected item highlights: components red, wires
thicken
– Clicking to Select
To select single item, click on it.
To select additional items, press CTRL+ click.
– Selecting All
Choose Edit/Select All.
– Dragging to Select
Place pointer above & to side of group of items. Press & hold mouse button & drag downward diagonally.
Release mouse button when rectangle encloses everything desired.
– Deselecting
To deselect single item, press CTRL+click.
To deselect all selected items, click on empty spot in window.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 8 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
– If drag a wire from a component’s terminal to another wire, a connector is automatically created when
you release mouse button.
– Note: a connector button also appears in the Basic toolbar (to insert connectors into an existing circuit).
Deleting Wires
– To delete a wire, select it & choose Edit/Delete
– Alternatively, disconnect wire by selecting one end of it & moving it to an open spot on circuit window.
Changing Wire Color
– To change a wire’s color, double-click it & choose Schematic Options tab; click the Color button &
choose a new color.
Straightening a Wire
– move wire itself.
– move component to which wire is attached.
– press ALT and move component to which wire is attached.
– select component and press appropriate arrow key to align it.
– If two wires cross in a way that makes them hard to follow, select one & drag it to new location
*Note:
– the way a wire is routed sometimes depends on terminal from which wire was dragged; try
disconnecting routed wire & then rewire from the opposite terminal.
Instruments
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 9 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Simulation
– Turning on Power
Click the power switch to turn power on. Click switch again to turn power off. (Note: Turning off power
erases data & instrument traces.
Lab Tasks
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 10 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 11 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Draw the following circuit. After that make the following changes
- Connect the output of the converter to the red probe
- Connect the Vcc line to the input of the inverter
- Start simulating the circuit
State your observation down:
Observation:
- In the same circuit above, stop the simulation and connect the ground to the input of the inverter.
State your observation down:
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 12 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Observation:
Note: You can change the default values of the clock by doing mouse right clicking on the clock and click
on the “Component Properties ...” as shown below:
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 13 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 14 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
[Lab 2]. Basic logic Gates (AND, OR, and NOT gates)
Objectives
1- To study and understand the 3 basic gates.
2- Implement the basic gate in EWB.
3- The study the specifications of every gate when connected it with one input constant and the other is
variable.
This gate gives high output (1) if all the inputs are 1’s. otherwise the output will be low (0).
A B C
0 0 0
0 1 0
1 0 0
1 1 1
The NAND gate works opposite to the AND gate. Its Boolean algebra representation is: C=(A.B)’
And it’s truth table and schema as following:
A B C
0 0 1
0 1 1
1 0 1
1 1 0
This circuit will give high output (1) if any input is high (1).
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 15 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A B C
0 0 0
0 1 1
1 0 1
1 1 1
The NOR gate works opposite to the OR gate. Its Boolean algebra representation is: C=(A+B)’
And it’s truth table and schema as following:
A B C
0 0 1
0 1 0
1 0 0
1 1 0
NOT gate
This is the simplest gate it just inverts the input, if the input is high the output will be low and conversely.
So B=A’
A B
0 1
1 0
Lab Tasks
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 16 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A B A.B (A.B)’
0 0
0 1
1 0
1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 17 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A B (A.B)’
0 0
0 1
1 0
1 1
A B A+B (A+B)’
0 0
0 1
1 0
1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 18 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A B ((A+B)’)’
0 0
0 1
1 0
1 1
Task 5: Finding the truth table of a gate using the logic converter
The logic converter can be found in the Instruments toolbox. It can be used to derive a truth table from a
circuit schematic:
1. Attach the input terminals of the logic converter to up to eight input points in the circuit.
2. Connect the single output of the circuit to the output terminal on the logic converter icon.
3. Click the Circuit to Truth Table button.
The truth table for the circuit appears in the logic converter's display.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 19 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
In the following circuit, we will be examining the AND gate. The two inputs of the gate are attached the A
and B inputs of the logic converter. The circuit output C is connected to Out line of the logic converter.
After clicking on the Truth Table button of the logic converter, the logic converter tries
all possible combinations of the circuit input and derives its truth table.
Task 6: Finding the truth table of a gate using the logic converter
Repeat what you did in task 5 for the NOR gate. Show your connections in the circuit below.
A B A+B (A+B)’
0 0
0 1
1 0
1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 20 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Task 7: Finding the truth table of a three input gate using the logic converter
Repeat what you did in task 5 for a three-input AND gate. Show your connections in the circuit below.
Note: you can obtain a three-input AND gate by drawing a regular two-input AND gate and then changing
its Number of Inputs property as shown next.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 21 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A B C D
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Task 8: Finding the truth table of a given circuit using the logic converter
Find the truth table of the following circuit:
A B C D F
0 0 0 0
0 0 0 1
0 0 1 0
0 0 1 1
0 1 0 0
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 22 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
0 1 0 1
0 1 1 0
0 1 1 1
1 0 0 0
1 0 0 1
1 0 1 0
1 0 1 1
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 23 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives
To learn how to directly convert a Boolean expression to circuit.
To learn how to analyze a given digital logic circuit by finding the Boolean expression that
represents the circuit
To learn how to analyze a given digital logic circuit by finding the truth table that represents the
circuit.
Example:
Z = A + B . C’
The above function is implemented in the following digital logic Circuit
Now after drawing the circuit above using EWB we find that its truth table is as shown below ( notice that
logic 1 means connect the input to the Vcc line, and logic 0 means connecting the input to the ground)
A B C Z
0 0 0 0
0 0 1 0
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 24 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Lab Tasks
Y Z X
0 0
0 1
1 0
1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 25 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A B C D
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Task 3: Digital logic circuit analysis – Finding the Boolean expression of a given circuit
Find the Boolean expression of the following circuit, draw the circuit on EWB and simulate it to fill-in its
truth table shown below.
W=
Note: the logic converter tool from EWB to fill-in the following table. For that, you need to connect the A,
B and C inputs of the logic converter to X, Y and Z lines, respectively. Further, you need to connect the
‘out’ line of the logic converter to W. As shown in the following diagram
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 26 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
X Y Z W
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Task 4: Digital logic circuit analysis – Finding the Boolean expression of a given circuit
Find the Boolean expression of the following circuit,
D=
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 27 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Draw the circuit on EWB and simulate it to fill-in its truth table shown below (use logic converter please).
A B C D
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
D=
E=
Draw the circuit on EWB and simulate it to fill-in its truth table shown below (use logic converter please).
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 28 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Note: You need to use the logic converter two times, once for the output D, and another time for the second
output E.
A B C D E
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Task 6*: Finding the Boolean expression of a given circuit using the logic converter
Draw the following circuit on EWB and then find its Boolean expression using the logic converter.
Task 7*: Converting Boolean expressions to circuits using the logic converter
Use the logic converter to realize the following circuit using suitable logic gates:
AB'C (BD + CDE) + AC'
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 29 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives
Object
1- To study DeMorgan’s theory and implemented it.
2- Learn how to simplify Boolean logic equations using DeMorgan’s theory.
Boolean Laws
T1 : Commutative Law
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 30 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
(a) A + B = B + A
(b) A B = B A
T2 : Associate Law
(a) (A + B) + C = A + (B + C)
(b) (A B) C = A (B C)
T3 : Distributive Law
(a) A (B + C) = A B + A C
(b) A + (B C) = (A + B) (A + C)
T4 : Identity Law
(a) A + A = A
(b) A A = A
T5 :
(a)
(b)
T6 : Redundance Law
(a) A + A B = A
(b) A (A + B) = A
T7 :
(a) 0 + A = A
(b) 0 A = 0
T8 :
(a) 1 + A = 1
(b) 1 A = A
T9 :
(a)
(b)
T10 :
(a)
(b)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 31 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 32 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
This means that the above circuit can be replaced by the following one
Lab Tasks
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 33 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
According to the circuit above find the equation of X and Y, then fill the truth table.
X=
Y=
A B X Y
0 0
0 1
1 0
1 1
What do you notice?
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 34 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
According to the circuit above find the equation for X and Y, then fill the truth table.
X=
Y=
A B X Y
0 0
0 1
1 0
1 1
What do you notice?
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 35 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Draw the simplified and the original Boolean expression using EWB and make sure that they
are booth equivalent by filling-in the following truth table.
A B F (A, B) (original) Y (Simplified)
0 0
0 1
1 0
1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 36 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Draw the simplified Boolean expression using EWB. Find out the truth table of the circuit.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 37 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 38 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives
1- Practically show the correctness of DeMorgan’s Theory.
2- Show how to represent any gate using NAND gates only or NOR gates only.
3- Universal gates - NAND and NOR.
4- How to implement NOT, AND, and OR gate using NAND gates only.
5- How to implement NOT, AND, and OR gate using NOR gates only.
6- Equivalent gates.
7- Two-level digital circuit implementations using universal gates only.
8- Two-level digital circuit implementations using other gates.
Background
The NAND gate represents the complement of the AND operation. Its name is an abbreviation of NOT
AND. The graphic symbol for the NAND gate consists of an AND symbol with a bubble on the output,
denoting that a complement operation is performed on the output of the AND gate.
The NOR gate represents the complement of the OR operation. Its name is an abbreviation of NOT OR.
The graphic symbol for the NOR gate consists of an OR symbol with a bubble on the output, denoting that a
complement operation is performed on the output of the OR gate.
A universal gate is a gate which can implement any Boolean function without need to use any other gate
type. The NAND and NOR gates are universal gates.
In practice, this is advantageous since NAND and NOR gates are economical and easier to fabricate and are
the basic gates used in all IC digital logic families.
In fact, an AND gate is typically implemented as a NAND gate followed by an inverter not the other way
around!! Likewise, an OR gate is typically implemented as a NOR gate followed by an inverter not the
other way around!!
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 39 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Equivalent Gates
A NAND gate is equivalent to an inverted-input OR gate.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 40 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
F = XZ + Y’Z + X’YZ
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 41 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Lab Tasks
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 42 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 43 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 44 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 45 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 46 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 47 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives
1- Study K-maps with 2, 3 and 4 inputs.
2- Simplify Boolean logic equations by using K-maps.
Background
Check appendix #1 for details about k-maps.
Lab Tasks
Draw the simplified and the original Boolean expression using EWB and make sure that they
are booth equivalent by filling-in the following truth table.
A B F (A, B) (original) Y (Simplified)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 48 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
0 0
0 1
1 0
1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 49 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Draw the simplified Boolean expression using EWB. Find out the truth table of the circuit.
A B C F
1 0 0 0
2 0 0 1
3 0 1 0
4 0 1 1
5 1 0 0
6 1 0 1
7 1 1 0
8 1 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 50 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 51 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 52 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives
Learn how implement logic functions using the standard forms: Sum of Products and Product of Sums.
Background
We can write expressions in many ways, but some ways are more useful than others
A sum of products (SOP) expression contains: Only OR (sum) operations at the “outermost” level and each
term that is summed must be a product of literals
The advantage is that any sum of products expression can be implemented using a three-level circuit
– literals and their complements at the first level
– AND gates at the second level
– a single OR gate at the third level
Example:
f(x,y,z) = y’ + x’yz’ + xz
Notice that the NOT gates are implicit and that literals are reused.
A minterm is a special product of literals, in which each input variable appears exactly once.
A function with n variables has 2n minterms (since each variable can appear complemented or not)
Example:
A three-variable function, such as f(x,y,z), has 23 = 8 minterms:
Each minterm is true for exactly one combination of inputs:
Those minterms are: x’y’z’ x’y’z x’yz’ x’yz xy’z’ xy’z xyz’ xyz
A Minterm is true when:
Minterm When the minterm is True Minterm ID
x’y’z’ x=0, y=0, z=0 m0
x’y’z x=0, y=0, z=1 m1
x’yz’ x=0, y=1, z=0 m2
x’yz x=0, y=1, z=1 m3
xy’z’ x=1, y=0, z=0 m4
xy’z x=1, y=0, z=1 m5
xyz’ x=1, y=1, z=0 m6
xyz x=1, y=1, z=1 m7
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 53 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
If you have a truth table for a function, you can write a sum of minterms expression just by picking out the
rows of the table where the function output is 1.
Example
f = x’y’z’ + x’y’z + x’yz’ + x’yz + xyz’
= m0 + m1 + m2 + m3 + m6
= Σm(0,1,2,3,6)
Example
f(x, y, z) = y’ . (x’+y+z’) . (x+z)
A maxterm is a sum of literals, in which each input variable appears exactly once.
A function with n variables has 2n maxterms
Example
A three-variable function f(x,y,z) has 8 maxterms
Each maxterm is false for exactly one combination of inputs:
Those materms are: x’+y’+z’ x’+y’+z x’+ y+z’ x’+ y+z x+y’+z’ x+y’+z x+y+z’ x+y+z
Maxterm Is false when:
Maxterm When the maxterm is false Maxterm ID
x+y+z x=0, y=0, z=0 M0
x + y + z’ x=0, y=0, z=1 M1
x + y’ + z x=0, y=1, z=0 M2
x + y’ + z’ x=0, y=1, z=1 M3
x’ + y + z x=1, y=0, z=0 M4
x’ + y + z’ x=1, y=0, z=1 M5
x’ + y’ + z x=1, y=1, z=0 M6
x’ + y’ + z’ x=1, y=1, z=1 M7
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 54 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
x’y’z’ m0 x+y+z M0
x’y’z m1 x + y + z’ M1
x’yz’ m2 x + y’ + z M2
x’yz m3 x + y’ + z’ M3
xy’z’ m4 x’ + y + z M4
xy’z m5 x’ + y + z’ M5
xyz’ m6 x’ + y’ + z M6
xyz m7 x’ + y’ + z’ M7
Example
From before
f = Σm(0,1,2,3,6)
and f’ = Σm(4,5,7)
= m4 + m5 + m7
complementing (f’)’ = (m4 + m5 + m7)’
so f = m4’ . m5’ . m7’ [ DeMorgan’s law ]
= M4 . M5 . M7
= ΠM(4,5,7)
Lab Tasks
A B C F
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 0
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 55 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
1 1 0 0
1 1 1 1
Write the above function in the two standard forms
F(A, B, C)= Σ ( )
F(A, B, C) = Π( )
Draw a circuit that implements the above logic function (use minterms only)
Draw a circuit that implements the above logic function (use maxterms only)
A B C F (simplified)
0 0 0
0 0 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 56 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
A B C D F
0 0 0 0 0
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 57 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 58 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 59 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 60 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives
To learn how to build XOR gates from basic gates
To learn how to build a Half Adder and a Full Adder using XOR gates.
To learn how to build a parallel adder, subtracter, incrementer and decrementer using full adders.
Background
The XOR gate (sometimes EOR gate, or EXOR gate) is a digital logic gate that implements an exclusive or;
that is, a true output (1) results if one, and only one, of the inputs to the gate is true (1). If both inputs are
false (0) or both are true (1), a false output (0) results. Next is the circuit representation of the XOR gate and
its truth table.
A B F1
0 0 0
0 1 1
1 0 1
1 1 0
Next is one way to build an XOR gate using NAND gates only
The XOR logic gate can be used as a one-bit adder (or a Half-Adder; HA)that adds any two bits together to
output one bit (the sum) and another bit that represents the carry out. As shown below
The XOR logic gate can be used as a one-bit full adder that adds any three bits together to output one bit (the
sum) and another bit that represents the carry out. As shown below
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 61 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Inputs Outputs
A B Cin Cout S
0 0 0 0 0
1 0 0 0 1
0 1 0 0 1
1 1 0 1 0
0 0 1 0 1
1 0 1 1 0
0 1 1 1 0
1 1 1 1
Lab Tasks
A B F1
0 0
0 1
1 0
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 62 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
1 1
What do you notice?
Each one of the above circuits can be replaced with one single logic gate that gives the same truth table,
that’s the Exclusive OR Gate or XOR.
A B F No. of 1's
0 0 0 Even
0 1 1 Odd
1 0 1 Odd
1 1 0 Even
A B F
0 0
0 1
1 0
1 1
The above circuit can be replaced with one single logic gate that gives the same truth table, that’s the
Exclusive NOR Gate or XNOR.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 63 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A B F No. of 1's
0 0 1 Odd
0 1 0 Even
1 0 0 Even
1 1 1 Odd
A B C A B C
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
(b) Draw using EWB the HA circuit then find its truth table by using the logic converter.
S=
C=
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 64 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
P Q S C
0 0
0 1
1 0
1 1
P Q S C
0 0
0 1
1 0
1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 65 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 66 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 67 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 68 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives
To learn how to build combinational logic circuits using multiplexers.
Background
In a Combinational Logic Circuit, the output is dependant at all times on the combination of its
inputs. Some examples of a combinational circuit include Multiplexers, De-multiplexers, Encoders,
Decoders, Full and Half Adders etc.
A Multiplexer is a combination of logic gates resulting into circuits with two or more inputs (data inputs)
and one output.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 69 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
a b Q
0 0 A
0 1 B
1 0 C
1 1 D
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 70 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
NOTE: the “A” line in the multiplexer is the least significant bit, while “C” is the most significant bit.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 71 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Truth table:
A B C D F
0 0 0 0 0 1
F=1
1 0 0 0 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 72 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
2 0 0 1 0 0
F=D
3 0 0 1 1 1
4 0 1 0 0 1
F=D’
5 0 1 0 1 0
6 0 1 1 0 0
F=0
7 0 1 1 1 0
8 1 0 0 0 1
F=D’
9 1 0 0 1 0
10 1 0 1 0 0
F=0
11 1 0 1 1 0
12 1 1 0 0 1
F=1
13 1 1 0 1 1
14 1 1 1 0 0
F=D
15 1 1 1 1 1
To implement this function using EWB, you draw the following circuit:
Note: this example has already been solved above. Just draw the circuit using EWB.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 73 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 74 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A B C D F
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1
8 1 0 0 0
9 1 0 0 1
10 1 0 1 0
11 1 0 1 1
12 1 1 0 0
13 1 1 0 1
14 1 1 1 0
15 1 1 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 75 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A B C D F
0 0 0 0 0 0
1 0 0 0 1 1
2 0 0 1 0 0
3 0 0 1 1 1
4 0 1 0 0 0
5 0 1 0 1 0
6 0 1 1 0 1
7 0 1 1 1 1
8 1 0 0 0 1
9 1 0 0 1 0
10 1 0 1 0 1
11 1 0 1 1 0
12 1 1 0 0 1
13 1 1 0 1 0
14 1 1 1 0 0
15 1 1 1 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 76 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 77 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives
To learn how to build combinational logic circuits using decoders.
Background
In a Combinational Logic Circuit, the output is dependant at all times on the combination of its inputs.
Some examples of a combinational circuit include Multiplexers, De-multiplexers, Encoders, Decoders,
Full and Half Adders etc.
A Decoder is a circuit with two or more inputs and one or more outputs. Its basic function is to accept a
binary word (code) as an input and create a different binary word as an output.
A B D1 D2 D3 D4
0 0 1 0 0 0
0 1 0 1 0 0
1 0 0 0 1 0
1 1 0 0 0 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 78 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Click on the button on the toolbar, then drag a 741xx digital IC into your workspace. From the list,
select either 74138 (3-8 decoder) or 74154 (4-16 decoder) as shown next.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 79 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 80 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 81 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Lab Tasks
The above function can be implemented as shown next. Redraw this circuit using EWB.
A B C F1 F2 F3
0 0 0 0 0 1 1
1 0 0 1 1 1 0
2 0 1 0 0 0 1
3 0 1 1 1 1 0
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 82 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
4 1 0 0 0 1 1
5 1 0 1 1 0 0
6 1 1 0 1 0 0
7 1 1 1 0 0 1
A B C D F
0 0 0 0 0 0
1 0 0 0 1 1
2 0 0 1 0 0
3 0 0 1 1 1
4 0 1 0 0 0
5 0 1 0 1 0
6 0 1 1 0 1
7 0 1 1 1 1
8 1 0 0 0 1
9 1 0 0 1 0
10 1 0 1 0 1
11 1 0 1 1 0
12 1 1 0 0 1
13 1 1 0 1 0
14 1 1 1 0 0
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 83 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
15 1 1 1 1 1
A B C D F
0 0 0 0 0 0
1 0 0 0 1 1
2 0 0 1 0 0
3 0 0 1 1 1
4 0 1 0 0 0
5 0 1 0 1 0
6 0 1 1 0 1
7 0 1 1 1 1
8 1 0 0 0 1
9 1 0 0 1 0
10 1 0 1 0 1
11 1 0 1 1 0
12 1 1 0 0 1
13 1 1 0 1 0
14 1 1 1 0 0
15 1 1 1 1 1
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 84 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 85 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Objectives
To learn how to build combinational logic circuits using decoders.
Background
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 86 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 87 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
A 4x4 k-map
Gray code
by bit width
The table appearing at the right side of this page shows the gray codes that we need for 00 0000
the K-maps of 2x2, 2x4, 4x2 and 4x4 sizes.
01 0001
11 0011
10 0010
0110
Example (two-input circuites):
Simplify the logic diagram below. 0111
3-bit
0101
000 0100
001 1100
011 1101
010 1111
110 1110
Solution: (Figure below) 111 1010
Write the Boolean expression for the original logic diagram as shown below 1011
101
Transfer the product terms to the Karnaugh map
100 1001
Form groups of cells
Write Boolean expression for groups 1000
Draw simplified logic diagram
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 88 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Above we, place the 1's in the K-map for each of the product terms, identify a group of two, then write a p-
term (product term) for the sole group as our simplified result.
Mapping the four product terms above yields a group of four covered by Boolean A'
Mapping the four p-terms yields a group of four, which is covered by one variable C.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 89 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
After mapping the six p-terms above, identify the upper group of four, pick up the lower two cells as a group
of four by sharing the two with two more from the other group. Covering these two with a group of four
gives a simpler result. Since there are two groups, there will be two p-terms in the Sum-of-Products
result A'+B
The two product terms above form one group of two and simplifies to BC
Example (three-input circuits):
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 90 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Mapping the four p-terms above yields a group of four. Visualize the group of four by rolling up the ends of
the map to form a cylinder, then the cells are adjacent. We normally mark the group of four as above left.
Out of the variables A, B, C, there is a common variable: C'. C' is a 0 over all four cells. Final result is C'.
The above Boolean expression has seven product terms. They are mapped top to bottom and left to right on
the K-map above. For example, the first P-term A'B'CD is first row 3rd cell, corresponding to map
location A=0, B=0, C=1, D=1. The other product terms are placed in a similar manner. Encircling the largest
groups possible, two groups of four are shown above. The dashed horizontal group corresponds the the
simplified product term AB. The vertical group corresponds to Boolean CD. Since there are two groups,
there will be two product terms in the Sum-Of-Products result of Out=AB+CD.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 91 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
The four cells above are a group of four because they all have the Boolean variables B' and D' in common.
In other words, B=0 for the four cells, and D=0 for the four cells. The other variables (A, B) are 0 in some
cases, 1 in other cases with respect to the four corner cells. Thus, these variables (A, B) are not involved
with this group of four. This single group comes out of the map as one product term for the simplified
result: Out=B'C'
The above group of eight has one Boolean variable in common: B=0. Therefore, the one group of eight is
covered by one p-term: B'. The original eight term Boolean expression simplifies to Out=B'
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 92 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
The six product terms of four Boolean variables map in the usual manner above as single cells. The three
Boolean variable terms (three each) map as cell pairs, which is shown above. Note that we are mapping p-
terms into the K-map, not pulling them out at this point.
For the simplification, we form two groups of eight. Cells in the corners are shared with both groups. This is
fine. In fact, this leads to a better solution than forming a group of eight and a group of four without sharing
any cells. Final Solution is Out=B'+D'
Above, three of the cells form into a groups of two cells. A fourth cell cannot be combined with anything,
which often happens in "real world" problems. In this case, the Boolean p-term ABCD is unchanged in the
simplification process. Result: Out= B'C'D'+A'B'D'+ABCD
Often times there is more than one minimum cost solution to a simplification problem. Such is the case
illustrated below.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 93 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Both results above have four product terms of three Boolean variable each. Both are equally valid minimal
cost solutions. The difference in the final solution is due to how the cells are grouped as shown above. A
minimal cost solution is a valid logic design with the minimum number of gates with the minimum number
of inputs.
Pick up three more cells in a group of four, center above. There are still two cells remaining. the minimal
cost method to pick up those is to group them with neighboring cells as groups of four as at above right.
On a cautionary note, do not attempt to form groups of three. Groupings must be powers of 2, that is, 1, 2, 4,
8 ...
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 94 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Below we have another example of two possible minimal cost solutions. Start by forming a couple of groups
of four after mapping the cells.
The two solutions depend on whether the single remaining cell is grouped with the first or the second group
of four as a group of two cells. That cell either comes out as either ABC' or ABD, your choice. Either way,
this cell is covered by either Boolean product term. Final results are shown above.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 95 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Then fill in the implied 1s in the remaining cells of the map above right.
Let us revisit a previous problem involving an SOP minimization. Produce a Product-Of-Sums solution.
Compare the POS solution to the previous SOP.
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 96 of 99
Digital logic design lab Digital Logic Design Featuring EWB (Electronics Workbench V 5.12)
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 97 of 99
Digital Logic Design
Featuring EWB 5.12
Last updated on Monday, March 23, 2015 By Dr. Sulieman Bani-Ahmad Page 99 of 99