DSY1501 Study Guide Final
DSY1501 Study Guide Final
DIGITAL SYSTEMS I
(DSY1501)
P UBLISHED BY UNISA
I Introduction Unit
0.1 Prescribed Textbook 11
0.2 Recommended textbook 11
0.3 Overview of the module 13
0.4 How do I go about studying this module? 13
0.5 Tutorial matter for the module 14
0.6 What are some of the main features of this study guide? 15
0.7 List Of Terms 15
II Course Content
3 Logic gates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.1 Introduction 47
3.2 The NOT gate: Inverter 48
3.2.1 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
3.3 The AND gate 49
3.3.1 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.3.2 Example: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.3.3 Application: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.4 The OR gate 50
3.4.1 Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
3.4.2 Example: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.5 The Derived Logic Gates 51
3.5.1 The NAND gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
3.5.2 The NOR gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
3.5.3 The XOR gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
3.5.4 The XNOR gate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.6 Integrated Circuits (ICs) 54
3.6.1 The 7400 IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
3.6.2 The 7404 IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.6.3 The 7408 IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
3.6.4 The 7432 IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.6.5 The 7486 IC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
3.7 NOMENCLATURE OF ICs 57
3.8 Self-assessment Activity 58
3.9 my UNISA ACTIVITY: 59
3.10 References: 59
3.11 Experiments 59
3.11.1 Experiment 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
3.11.2 Experiment 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
learning, and the more effectively one can apply one’s knowledge and skills in real-life situations.
To help you work through this study guide actively – rather than just reading it passively – we
have included a large number of activities, examples and self-assessment questions. By completing
these, you will ensure that what you are learning is meaningful to you, and you will start to develop
the practical skills that will be required in your work situation.
0.6 What are some of the main features of this study guide?
The main features of this study guide are the following:
• LEARNING OUTCOMES
The learning outcomes and assessment criteria contained in each study unit can be regarded
as a checklist of the things you should be able to do once you have studied that particular
study unit. In other words, they tell you what the purpose of your learning in that particular
study unit is. When you are reviewing the module, you should look back at the assessment
criteria and check whether you have achieved them all. They will give you an overview of
the knowledge and skills you should have acquired in the module.
• WORKED EXAMPLES
Each study unit contains worked examples providing feedback on how a particular problem
should be attempted. These will give you an indication of how well you have grasped the
study material.
• SELF-ASSESSMENT ACTIVITY
Completing the activities will help you to acquire the knowledge and skills that are taught in
every unit, and will therefore enable you to achieve the learning outcomes. Feedback on the
activities is provided at the back of the study guide.
• FEEDBACK ON ACTIVITIES
Most activities are followed by some form of feedback (comments on or suggested answers
to) the questions in the activity. Sometimes this feedback appears as part of the study unit.
In many cases, however, we have included feedback at the end of this study guide. Please
note, however, that you should try to complete activities on your own first before checking
the feedback.
• myUnisa ACTIVITIES
At the end of each study unit you will find a myUnisa activity. Log on to myUnisa and check
the activity related to the specific study unit.
• REFERENCES
At the end of each study unit, you will find references to sources you can consult to, read
more on that particular topic.
• EXPERIMENTS
At the end of each study unit, you fill find practical experiments that you will need to do, that
will contribute to your year-end mark for the practical part of this module. If you complete
these experiments after studying the relevant study units, the experiments should not present
you with any problems.
II
4.7
4.8
Course Content
CUIT
Karnaugh Maps
Examples
4.9 Code Converters
4.10 A Simple Design Question
4.11 Summary
4.12 Self-assessment Activity
4.13 myUNISA Activity
4.14 Reference
4.15 Experiment
to be sampled and quantized to generate the discrete signal in figure 1.2. Quantization is the
process of mapping continuous infinite values to a smaller set of discrete finite values.
For a further explanation watch the video clip:
Continuous and Discrete Time Signals by Neso Academy (10:56)
https://youtu.be/H4hk6N5vC1Q
applications?
The benefit of digital signals over analogue signals is two fold:
• Firstly, digital signals can be processed and transmitted more efficiently and reliably than
analogue signals.
• Secondly, digital signals can be stored unlike analogue signals.
Watch the video clip below for a short summary of the difference between analogue and digital:
Analog vs Digital by Sunny classroom (3:52):https://youtu.be/gGxpUZ_iuYA
seen that, besides the voltage ranges for the LOW and the HIGH logic levels, there is a range of
voltage ranges of voltages considered to be unacceptable for the operation of digital circuits. In
digital systems, there are two major families of logic levels. These are the Transistor Transistor
Logic (TTL) and the Complementary Metal Oxide Semiconductor (CMOS) logic summarized
in table 1.1.
It is important to note that the digital pulses as represented in figure 1.4 are ideal. They are
represented as such for ease of analysis.
In reality, a real (non-ideal) digital pulse looks as per figure 1.5. This is the actual type of signal
you expect to measure on an oscilloscope or a logic analyzer during a laboratory measurement. A
real digital pulse has got the following main characteristics:
• The amplitude: The height from the baseline to 90% of the pulse.
• The rise time (tr ): The time it takes the pulse to go from 10% to 90% of its amplitude as it
transits from LOW state to HIGH state.
• The fall time (t f ): he time it takes the pulse to go from 90% to 10% of its amplitude as it
transits from HIGH state to LOW state.
• Pulse width: duration of the pulse as measured from 50% of the amplitude on the leading
edge to 50% of the amplitude on the trailing edge.
• Ringing: is the part of the pulse that oscillates between high and low amplitude heights
around the high or the low states of the pulse
• Droop: Is the part of the amplitude of the pulse where it starts to decay before going from
high state to low state.
• Overshoot: is the highest amplitude point of the pulse.
• Undershoot: is the lowest amplitude point of the pulse.
A series of multiple pulses that graphically represent the digital signal is called a digital waveform
(pulse train). A digital wave form is either:
• Periodic: when it repeats itself at a fixed interval of time know as period (T ). The rate
at which this signal repeats it self is known as its frequency ( f ). The unit of a the pe-
1
riod is seconds as it is a duration while the unit of frequency is known as Hz = second .
Therefore:
– The duration of the HIGH state and the one of the LOW state are not always the same
in a periodic digital waveform.
– How the duration of the HIGH state also known as the Pulse width (tW = TON ) or ON
time relates to the entire duration of a full period T , is measured by means of what is
known as the duty cycle of a the periodic waveform.
– The duration of a period during which the waveform is in LOW state is also known as
the OFF time=TOFF .
The duty cycle is calculated as percentage as follows:
• Nonperiodic: A digital waveform that does not repeat itself at a fixed interval of time.
• A special type of periodic waveform used in digital systems as the reference timing waveform
24 Chapter 1. Introduction to Digital Concepts
3. The frequency of a pulse generator circuit is 1 kHz and the pulse width is of 250 us, what is
the duty cycle percentage of the signal?
4. what is the frequency of a signal where TON = 5 ms, TOFF = 3 ms and the amplitude is of
5V?
5. In a certain digital wave form, the period is four times the pulse width. Calculate the duty
cycle of the signal.
6. A quantity having a continuous set of values is a/an ....................quantity.
7. What is the frequency of a signal where TON = 2ms, TOFF = 3 ms and the amplitude is 5V ?
8. The frequency of a pulse generator is 2 kHz and the pulse width is 125 s. What is the
percentage duty cycle of the signal?
9. The time interval on the leading edge of a pulse between .... % and ....% of the amplitude is
the rise time.
10. The pulse width (tw ) is the duration between the ......% points of the rise and fall times.
26 Chapter 1. Introduction to Digital Concepts
11. The period of a signal is 5 times the pulse width. Calculate the duty cycle percentage. What
is the OFF time if the signal has a frequency of 25 Hz?
1.5 Reference
Refer to the chapter “Introductory concepts” in the prescribed book by Thomas Floyd
2. Number Systems and Codes
2.1.2 Notations
In general, Decimal number systems are noted as: ...XYZ.FGH... or alternatively ...XY Z.FGH...10
E.g. 1456.235 or 1456.23510
2.1.3 Counting
To count in decimal number system one first goes through all the elements below the base value of
10: 0,1,2,3,4,5,6,7,8,9; then starts to combine them taking the digits from 1 to 9 and combine it
with the entire set of digits from 0 through 9 to give (10,11,12,13,....,19), then combining digits two
by two in their increasing order (e.g. 100,101,102, etc.) and then three by three in three increasing
order etc.
2.2.2 Notations
In general, Binary number systems are noted as: ...XY Z.FGH...2 Binary numbers can be expressed
as the sum of the products of each digit times the column value for that digit. Thus, the number
101.10 represents the decimal value:
(1 × 22 ) + (0 × 21 ) + (1 × 20 ) + (1 × 2−1 ) + (0 × 2−2 ) = 5.510 (2.2)
2.2 Binary Numbers 29
2.2.3 Counting
A binary counting sequence for numbers from zero to fifteen is shown in figure 2.1.
Notice the pattern of zeros and ones in each column. Application: Digital counters frequently
have this same pattern of digits.
Example: The decimal value of any binary number can be found by adding the weights of
all bits that are 1 and discarding the weights of all bits that are 0.
30 Chapter 2. Number Systems and Codes
Solution: The decimal value of any binary number can be found by adding the weights of all bits
that are 1 and discarding the weights of all bits that are 0.
Solution: The column weights double in each position to the right. Write down column weights
until the last number is larger than the one you want to convert.
Solution:
Example: Add the binary numbers 00111 and 10101 and show the equivalent decimal addition
Solution:
32 Chapter 2. Number Systems and Codes
Example: Subtract the binary number 00111 from 10101 and show the equivalent decimal subtrac-
tion.
Solution:
1’s complement
The 1’s complement of a binary number is just the inverse of the digits. To form the 1’s complement,
change all 0’s to 1’s and all 1’s to 0’s. For example, the 1’s complement of 110010102 is 001101012
In digital circuits, the 1’s complement is formed by using inverters:
2’s complement
The 2’s complement of a binary number is found by adding 1 to the LSB of the 1’s complement.
numbers in the same manner as with decimal numbers. It involves forming partial products,
shifting each successive partial product left one place, and then adding all the partial products.
Example 2.4 below illustrates the procedure; the equivalent decimal multiplications are shown for
reference. The numbers in a multiplication are the multiplicand, the multiplier, and the product.
These are illustrated in the following decimal multiplication: The multiplication operation in most
computers is accomplished using addition. As you have already seen, subtraction is done with an
adder; now let’s see how multiplication is done. Direct addition and partial products are two basic
methods for performing multiplication using addition. In the direct addition method, you add the
multiplicand a number of times equal to the multiplier. In the previous decimal example (8 × 3),
34 Chapter 2. Number Systems and Codes
three multiplicands are added: 8 + 8 + 8 = 24. The disadvantage of this approach is that it becomes
very lengthy if the multiplier is a large number. For example, to multiply 350 × 75, you must add
350 to itself 75 times. Incidentally, this is why the term times is used to mean multiply. When two
binary numbers are multiplied, both numbers must be in true (uncomplemented) form. The direct
addition method is illustrated in Example below adding two binary numbers at a time. Example:
Multiply the signed binary numbers: 01001101 (multiplicand) and 00000100 (multiplier) using the
direct addition method.
Solution:
Since both numbers are positive, they are in true form, and the product will be positive. The decimal
value of the multiplier is 4, so the multiplicand is added to itself four times as follows:
The sign of the product of a multiplication depends on the signs of the multiplicand and the
multiplier according to the following two rules:
• If the signs are the same, the product is positive.
• If the signs are different, the product is negative.
If the signs are different, the product is negative.
• Determine if the signs of the multiplicand and multiplier are the same or different. This
determines what the sign of the product will be
• Change any negative number to true (uncomplemented) form. Because most computers
store negative numbers in 2’s complement, a 2’s complement operation is required to get the
negative number into true form.
• Starting with the least significant multiplier bit, generate the partial products. When the
multiplier bit is 1, the partial product is the same as the multiplicand. When the multiplier bit
is 0, the partial product is zero. Shift each successive partial product one bit to the left.
• Add each successive partial product to the sum of the previous partial products to get the
final product.
• Add each successive partial product to the sum of the previous partial products to get the
final product.
2.3 Binary Arithmetic 35
Negative numbers are written as the 2’s complement of the corresponding positive number. The
negative number -58 is written as:
An easy way to read a signed number that uses this notation is to assign the sign bit a column weight
of -128 (for an 8-bit number). Then add the column weights for the 1’s. Example: Assuming that
the sign bit = -128, show that 11000110 = -58 as a 2’s complement signed number:
Example: Express the speed of light, c, in single precision floating point notation. (c = 0.2998 ×
109 )
36 Chapter 2. Number Systems and Codes
Solution: In binary,
c = 000100011101111010010101110000002 . In scientific notation, c = 1.001110111101001010111000000×228
S = 0 because the number is positive. E = 28 + 127 = 15510 = 100110112
F is the next 23 bits after the first 1 is dropped.
In floating point notation,
Note that if the number of bits required for the answer is exceeded, overflow will occur. This occurs
only if both numbers have the same sign. The overflow will be indicated by an incorrect sign bit.
Two examples are:
Rules for subtraction: 2’s complement the subtrahend and add the numbers. Discard any final
carries. The result is in signed form.
Repeat the examples done previously, but subtract:
2.4 Hexadecimal Numbers 37
2.4.1 Notation
In general, hexadecimal numbers are noted as: ...GHI.JKL...16 alternatively OX...GHI.JKL...
or even as: ...GHI.JKL...H .
Example: 1AC2.2A16 = 0x1AC2.2A = 1AC2.2AH
A summary conversion table from hexadecimal digits to binary and decimal numbers is
shown in the table below:
Hexadecimal is a weighted number system. The column weights are powers of 16, which
increase from right to left.
2.5.1 Notation
In general, Octal numbers are noted as: ...GHI.JKL...8 alternatively as ...GHI.JKL...O .
Example: 134.148 = 134.14O
Octal is also a weighted number system. The column weights are powers of 8, which increase from
right to left.
You can think of BCD in terms of column weights in groups of four bits. For an 8-bit BCD number,
the column weights are: 80 40 20 10 8 4 2 1.
Example: What are the column weights for the BCD number 1000 0011 0101 1001?
Solution:
8000 4000 2000 1000 800 400 200 100 80 40 20 10 8 4 2 1
Note that you could add the column weights where there is a 1 to obtain the decimal number. For
this case:
8000 + 200 + 100 + 40 + 10 + 8 + 1 = 835910
encode the position of the shaft. The encoder on the left uses binary and can have three bits change
together, creating a potential error. The encoder on the right uses gray code and only 1-bit changes,
eliminating potential errors.
The parity method is a method of error detection for simple transmission errors involving one bit
(or an odd number of bits). A parity bit is an “extra” bit attached to a group of bits to force the
number of 1’s to be either even (even parity) or odd (odd parity).
Example: The ASCII character for “a” is 1100001 and for “A” is 1000001. What is the correct bit
to append to make both of these have odd parity? Solution: The ASCII “a” has an odd number of
bits that are equal to 1; therefore the parity bit is 0. The ASCII “A” has an even number of bits that
are equal to 1; therefore the parity bit is 1.
The cyclic redundancy check (CRC) is an error detection method that can detect multiple errors
in larger blocks of data. At the sending end, a checksum is appended to a block of data. At the
receiving end, the check sum is generated and compared to the sent checksum. If the check sums
are the same, no error is detected.
2.9 Reference
Refer to the chapter 2 in the prescribed book by Thomas Floyd
3. Logic gates
3.1 Introduction
Logic devices, as the name suggests, carry out logical functions. Logic devices all have inputs
and outputs, and their output states are dependent upon the conditions applied to the inputs. The
devices that carry out basic logic functions are often referred to as “gates”. In digital systems, there
are 3 basic logic gates (NOT, AND, OR gates). They are called basic because all the other logic
gates and logic circuits can be derived from their combination.
Logic gates are used as basic building blocks of any logic circuit. They are, therefore, present in
any logic circuit.
48 Chapter 3. Logic gates
The NOT operation (complement) is shown with an overbar. Thus, the Boolean expression for an
inverter is X = Ā.
3.2.1 Symbols
The following symbols are used to represent a Inverter:
Example: Given the input signal (waveform) A to an inverter, draw the output signal X
Solution:
A group of inverters can be used to form the 1’s complement of a binary number:
3.3 The AND gate 49
The AND operation is usually shown with a dot between the variables but it may be implied (no
dot). Thus, the AND operation is written as X = A.B or X = AB
3.3.1 Symbols
The following symbols are used to represent an AND gate:
3.3.2 Example:
Given the input signals (waveforms) A and B to an AND gate, draw the output signal X
Solution:
3.3.3 Application:
The AND operation is used in computer programming as a selective mask. If you want to retain
certain bits of a binary number but reset the other bits to 0, you could set a mask with 1’s in the
position of the retained bits.
Example: If the binary number 10100011 is ANDed with the mask 000011112 , what is the result?
Solution: 000000112 .
3.4.1 Symbols
The following symbols are used to represent a two-inputs OR gate:
3.4.2 Example:
Given the input signals (waveforms) A and B to an OR gate, draw the output signal X
A NAND gate is written as follows: The truth table of a 2-inputs NAND gate can be derived as
follows:
The truth table above shows that we get a logic low output when the two inputs are the same,
and a logic high output when the inputs are different. It can therefore be used to test for equality.
The 7408 in figure 3.19. is a quad 2-input AND gate. As, the word "Quad" says, this IC has 4 gates
inside.
56 Chapter 3. Logic gates
The pins on an IC are not numbered, so we have to establish which pin is which, as in figure 3.29.
There are two common ways of identifying pin number 1. The first is a dot over pin 1, and the
second is a semicircle. When the IC is rotated so that the semicircle is on the left of the IC, the
bottom left pin under it is pin 1.
The pins are then numbered anti-clockwise.
1. For the set of input waveforms in figure 3.24 below, determine the output for the gate shown
and draw the timing diagram.
3.9 my UNISA ACTIVITY: 59
2. Assume that an enable signal has the waveform shown in figure 3.25 below; assume that
waveform b is also available. Devise a circuit that will produce an active-HIGH reset pulse
to the counter only during the time that the enable signal is LOW
3.10 References:
Refer to the chapter “Logic gates” in the prescribed book, Digital fundamentals, by Floyd.
3.11 Experiments
3.11.1 Experiment 1
Objective:
To familiarise yourself with the operation of the basic logic elements of the Or gate and the
AND gate, as well as the use of the logic probe.
Components required:
7400 quad 2-input NAND gate
7402 quad 2-input NOR gate
AD2004 analogue/digital trainer
Logic probe
Procedure:
build the circuit as shown below:
60 Chapter 3. Logic gates
Remember to identify the pin numbers on the IC as indicated below. Once you have identified
pin 1, you proceed in an anti-clockwise direction as you number the pins. Example: The pin directly
to right of pin 1 would be pin 2, then pin 3, etc.
The wiring of the two circuits is critical and any mistake will cause an error to occur. The first IC to
the left is the 7400 quad 2-input NAND gate. if you refer to data sheets on the last page of this
guide, you will see that there are four NAND gates in a 7400 and we only need to use one. It is also
very important to note that the ICs need power, that is 5V on pin 14 (Vcc), shown in red, and 0V on
pin 7 (GND). Not all ICs are the same, so it is important to check the data sheets. The inputs to the
7400 are shown in blue (pins 13 and 12) and the output in green (pin 11).
The second IC to the right is a 7402 quad 2-input NOR gate. Again we must apply power to
pins 14 and 7 before the IC will function. The inputs to the IC are shown in yellow and the output
in purple. It is now time to build the circuit as shown, and to establish whether it is working using
the truth tables associated with these gates.
3.11 Experiments 61
Results of experiment:
3.11.2 Experiment 2
Objective:
Procedure:
Build the circuit for the following expression. In order to determine the input and output pins
to the gates, refer to the data sheets.
Results of experiment
Name: ..................................
Student no: ..................................
Date: ..................................
On the breadboard below, draw a wiring diagram to show how you built the circuit. (Work in pencil
in case you make a mistake.)
4.1 Introduction
Boolean algebra is the mathematics of digital systems. By applying Boolean algebra, we can take a
function and simplify it to a much smaller function. As in maths, there are rules in Boolean algebra
that need to be applied in order to solve functions. However, functions in Boolean algebra are not
exactly the same as maths functions.
66 Chapter 4. Boolean Algebra and Logic Simplification
Rule 1: A+0 = A
A variable ORed with 0 is always equal to the variable. If the input variable A is 1, the output
variable X is 1, which is equal to A. If A is 0, the output is 0, which is also equal to A.
Rule 2: A+1 = 1
A variable ANDed with 0 is always equal to 0. Whenever one input to an AND gate is 0, the
output is 0, regardless of the value of the variable on the other input.
4.3 Rules of Boolean Algebra 67
Rule 4: A.1 = A
A variable ANDed with 1 is always equal to the variable. If A is 0, the output of the AND gate
is 0. If A is 1, the output of the AND gate is 1, because both inputs are now 1s.
Rule 5: A+A = A
A variable ORed with itself is always equal to the variable. If A is 0, then 0+0 = 0; and if A is
1, then 1+1 =1
Rule 6: A+Ā = 1
A variable ORed with its complement is always equal to 1. If A is 0, then 0+0 = 0+1 = 1. If A
is 1, then 1+1 = 1+0 = 1
Rule 7: A.A = A
A variable ANDed with itself is always equal to the variable. If A = 0, Then 0.0 = 0; and if A =
1, then 1.1 = 1.
Rule 8: A.Ā = 0
A variable ANDed with its complement is always equal to 0. Either A or will always be 0, and
when a 0 is applied to the input of an AND gate, the output will also be 0.
Rule 9:  = A
The double complement of a variable is always equal to the variable. If you start with the
variable A and complement (invert) it once, you get Ā. If you then take Ā and complement (invert)
it, you get A, which is the original variable.
This rule can be proved by applying the distributive law, rule 2 and rule 4 as follows:
Boolean Algebra 1 – The Laws of Boolean Algebra by Computer Science (14:54) https://youtu.
be/EPJf4owqwdA
A product term can be defined as a term consisting of the product (Boolean multiplication) of
literals (variables or their complements). When two or more product terms are summed by Boolean
addition, the resulting expression is a sum-of-products (SOP) form.
AB + ABC
ABC +CDE + BCD
Each product term in an SOP expression that does not contain all the variables in the domain
can be expanded to standard form to include all the variables in the domain and their complements.
As stated in the following steps, a nonstandard SOP expression is converted into standard form
4.5 STANDARD FORMS OF BOOLEAN EXPRESSIONS 69
Step 1: Multiply each nonstandard product term by a term made up of the sum of a missing
variable and its complement. This results in two product terms. As you know, you can multiply
anything by 1 without changing its value.
Step 2: Repeat step 1 until all resulting product terms contain all the variables in the domain in
either complemented or uncomplemented form. In converting a product term to standard form, the
number of product terms is doubled for each missing variable.
See the following example
A sum term is defined as a term consisting of the sum (Boolean addition) of literals (variables
or their complements). When two or more sum terms are multiplied, the resulting expression is a
product-of-sums (POS) form.
Some examples are:
In some POS expressions, the sum terms do not contain all the variables in the domain of the
expression.
For example, the expression
(A + B̄ +C)(A + B + D̄)(A + B̄ + C̄ + D)
has a domain made up of the variables A, B, C and D. Note that the complete set of variables in the
domain is not represented in the first two terms of the expression, that is, D or D̄ is missing from
the first term and C or C̄ is missing from the second term.
A standard POS expression is one in which all the variables in the domain appear in each sum term
in the expression.
For example: (Ā + B̄ + C̄ + D̄)(A + B̄ +C + D)(A + B + C̄ + D)
Converting a sum term into a standard POS form
70 Chapter 4. Boolean Algebra and Logic Simplification
The second term, B̄ + C + D̄ , is missing variable, A or Ā, so add AĀ and apply rule 12 as
follows:
B̄ +C + D̄ + AĀ = (A + B̄ +C + D̄)(Ā + B̄ +C + D̄) The third term is already in standard form.
The standard POS form of the overall original expression is as follows:
(A + B̄ +C + D)(A + B̄ +C + D̄)(A + B̄ +C + D̄)(Ā + B̄ +C + D̄)(A + B̄ + C̄ + D)
Video clips to consider adding here.
For further explanations, you can watch the video clips below:
Sum of Products (Part 1) | SOP Form by Neso Academy (12:29)
https://youtu.be/xnLBbOYYnHM
SOP and POS Form Examples by Neso Academy (12:37)
https://youtu.be/K2cpJex0o_A
Now determine when the B+CD term equals 1. The term B+CD=1 if either B=1 or CD=1 or if both
B and CD equal 1 because
B+CD=1+0=1
B+CD=0+1=1
B+CD=1+1=1
To summarize, the expression A(B+CD)=1 when A=1 and B=1 regardless of the values of C and D
or when A=1 and C=1 and D=1 regardless of the value of B. The expression A(B+CD)=0 for all
other combinations of the variables.
Putting the Results in the Truth Table Format
The first step is to list the sixteen input variable combinations of 1s and 0s in a binary sequence
as shown in the table 4.1 below. Next, place a 1 in the output column for each combination of input
variables that was determined in the evaluation. Finally, place a 0 in the output column for all other
combinations of input variables. These results are shown in the truth table below.
72 Chapter 4. Boolean Algebra and Logic Simplification
The 3-variable Karnaugh map is an array of eight cells, as shown in figure 4.2. In this case A, B
and C are used for the variables, although other letters could be used. The binary values of A and B
are along the left side (note the sequence) and the values of C are across the top.
The value of a given cell is the binary values of A and B on the left in the same row, combined
with the value of C at the top in the same column. For example, the cell in the upper left corner has
a binary value of 000, and the cell in the lower right corner has a binary value of 101.
Figure 4.2 shows the standard product terms that are represented by each cell in the Karnaugh
map. The 3-variable Karnaugh map
The binary values of A and B are along the left side, and the values of C and D are across the top.
The value of a given cell is the binary values of A and B on the left in the same row, combined with
the binary values of C and D at the top in the same column.
For example, the cell in the upper right corner has a binary value 0010, and the cell in the lower
right corner has a binary value of 1010.
4.7 Karnaugh Maps 73
Figure 4.2: The Product terms for each cell in the 3-variables K-Map
Figure 4.4 shows the standard product terms that are represented by each cell in the 4-variable
Karnaugh map.
As stated above, the Karnaugh map is used to simplify Boolean expressions to their minimum
form. A minimised SOP expression contains the fewest possible terms with the fewest possible
variables per term. Generally, a minimum SOP expression can be implemented with fewer logic
gates than a standard expression.
For an SOP expression in standard form, a 1 is placed on the Karnaugh map for each product
term in the expression. Each 1 is placed in a cell corresponding to the value of a product term. For
example, for the product term ABC, a 1 goes in the 101 cell on the 3-variable map in figure 4.5.
When an SOP expression is completely mapped, there will be a number of 1s on the Karnaugh
map equal to the number of product terms in the standard SOP expression. The cells that do not
have a 1, are the cells for which the expression is 0. Usually, when working with SOP expressions,
74 Chapter 4. Boolean Algebra and Logic Simplification
Figure 4.4: The Product terms for each cell in the 4-variables K-Map
the 0s are left off the map. The following steps and the illustration in the figure below show the
mapping process.
Step 1: Determine the binary value of each product term in the standard SOP expression. After
some practice, you will usually be able to do the evaluation of terms mentally.
Step 2: As each product term is evaluated, place a 1 on the Karnaugh map in the cell that has the
same value as the product term.
The process that results in an expression containing the fewest possible terms with the fewest
possible variables is called minimisation.
After an SOP expression has been mapped, a minimum SOP expression is obtained by grouping
the 1s and determining the minimum SOP expression from the map.
Grouping the 1s
4.8 Examples 75
You can group the 1s on the Karnaugh map according to the rules below by enclosing those
adjacent cells that contain 1s. The goal is to maximise the size of the groups and to minimise the
number of groups.
Rules:
(1) A group must contain 1, 2, 4, 8, or 16 cells, which are all powers of two. In the case of a
3-variable map, 23 =8 cells is the maximum group.
(2) Each cell in the group must be adjacent to one or more cells in that same group, but not all the
cells in the group need to be adjacent to each other.
(3) Always include the largest possible number of 1s in a group, as prescribed by rule 1.
(4) Each 1 on the map must be included in at least one group. The 1s already in a group can be
included in another group as long as the overlapping groups include non-common 1s.
Figure 4.6: Examples of groupings with more than one way to group
Examples of groupings are shown in figure 4.6. In some cases, there may be more than one way to
group the 1s into maximum groupings.
Determining the minimum SOP expression from the map
When all the 1s representing the standard product terms in an expression have been properly
mapped and grouped, the process of determining the resulting minimum SOP expression begins.
Rule:
Group the cells that have 1s. Each group of cells containing 1s creates one product term composed
of all the variables that occur in only one form (either uncomplemented or complemented) within
the group. Variables that occur both uncomplemented and complemented within the group are
eliminated. These are called contradictory variables.
Video clip to consider adding here.
Karnaugh Map (K’ Map) - Part 1 by Neso Academy (25:44)
https://youtu.be/FPrcIhqNPVo
4.8 Examples
4.8.1 Example 4.1
Use a Karnaugh map to minimise the following standard SOP expression:
AB̄C + ĀBC + ĀB̄C + ĀB̄C̄ + AB̄C̄
Solution
The binary values of the expression are:
101+011+001+000+100
76 Chapter 4. Boolean Algebra and Logic Simplification
Map the standard SOP expression and group the cells as shown in figure 4.7.
Note the “wrap-around” 4-cell group that includes the top row and the bottom row of 1s. The
remaining 1 is absorbed in an overlapping group of two cells. The group of four 1s produce a single
variable term B̄.
This is determined by observing that within the group, B̄ is the only variable that does not change
from cell to cell.
The group of two 1s produces a 2-variable term ĀC. This is determined by observing that within
the group, Ā and C do not change from one cell to the next.
The product term for each group is shown. The resulting minimum SOP expression is:
B̄ + ĀC
Note that both groups exhibit “wrap-around” adjacency. The group of eight is formed because the
4.9 Code Converters 77
cells in the outer columns are adjacent. The group of four is formed to pick up the remaining two
1s because the top and bottom cells are adjacent. The product term for each group is shown. The
resulting minimum SOp expression is D̄ + B̄C.
keep in mind that this minimum expression is equivalent to the original standard expression.
Please decide if you can use this video clip here.
Constructing Truth Tables for Combinational Logic Circuits by Engineers Academy (9:34) https:
//youtu.be/C4MdUQJIhSE
A code converter typically has four binary inputs and four binary outputs. When an input code
is entered on a circuit, it must give a corresponding output code. As in the case of all designs, we
would begin with a truth table and then enter and group the 1s on four Karnaugh maps to obtain the
minimum expression.
Based on the first principles, design a 5421 to 7421 code converter in the table below.
We start with the 5421 code (AbCD) and insert the codes for decimal numbers 0 to 9. The remaining
six unused codes are then placed in positions 10 to 15. We then place the corresponding 7421 code
in columns WXYZ. The last six codes do not exist, so we can insert “don’t-care” terms.
We then look at each column in the 7421 code individually, starting with column W. We insert
the “don’t-care” terms and the 1s, and group and obtain the expression. We repeat this for x, y and
Z in the K-maps in figure 4.9.
78 Chapter 4. Boolean Algebra and Logic Simplification
After obtaining the minimised outputs on the Karnaugh map, the logic diagrams are drawn in figure
4.10.
A red LED display turns on if any of the gears fail to extend properly prior to landing. When a
landing gear is extended, its sensors produce a LOW voltage. When a landing gear is retracted, its
sensor produces a HIGH voltage. Implement a circuit to meet this requirement.
First do a truth Table for this word example:
The truth table will look like this, remember that when the all gears are zero and extended
because we are working active LOW then the Green gear lights with a “1”.
When any of the gears fail to extend represented by HIGH voltage then the red LED lights in all
cases and we have a “1”.
Gren LED=ĀB̄C̄
Red LED=ĀB̄C + ĀBC̄ + ĀBC + AB̄C̄ + AB̄C + ABC̄ + ABC̄ + ABC
For the Red LED we will have to simplify the expression suing a Karnaugh map.
4.11 Summary
There is more than one way to realize a logical expression by means of a logic circuit. However,
there is cost associated with each realization in terms of space, price, power consumption etc.
Therefore, it is very important to simplify a logic expression to come up with its simplest possible
implementation circuit in order to optimize on the above-mentioned resources. This study unit
introduced you to the rules and theorems of Boolean logic simplification that are normally used to
achieve the simplest form possible of the logic circuit.
2. Use a Karnaugh map to find the minimum Sop form for the following expression:
ĀB̄C̄ + AB̄C̄ + ĀBC̄ + ABC̄
4.14 Reference
Refer to the chapter “Boolean algebra and logic simplification” in the prescribed book, Digital
fundamentals, by Floyd.
4.15 Experiment
Objective:
To take a practical problem and solve it logically, and to build a functional circuit to solve the
problem.
Task:
You are given the task of designing a circuit that will allow pilots to land their aircraft in bad
weather. The aircraft is fitted with a radio receiver that gives a 4-bit binary output code. When
the aircraft is very low, the code will be 00002 to 00102 ; when the aircraft is low, the code will be
00112 to 01012 ; when the aircraft is at the correct height, the code will be 01102 to 10012 ; when
the aircraft is high, the code will be 10102 to 11002 ; and when the aircraft is very high, the code
will be 11012 to 11112 . in the cockpit are four LEDs. When the aircraft is very low, LED a should
light up; when the aircraft is low, LEDs a and B should light up; at the correct height, all the LEDs
should light up; when the aircraft is high, LEDs C and D should light up; and when the aircraft is
very high, LED D should light up. Show all steps and give the logic diagrams.
Results of experiment
Name: ...................................
Date: ...................................
Complete and simplify the truth table using the karnaugh map.
4.15 Experiment 83
Results of experiment
Name: ...................................
Date: ...................................
1. The NAND gate in figure 5.1 is wired in a particular manner that causes it to behave like a
NOT gate.
A.A = A
A.B = A.B
ĀB̄ = A + B
A + A = Ā
2. Figure 5.6 behaves like an OR gate.
A + B = (A + B)
5.3 Examples
5.3.1 Example 5.1
Convert the following expression to NAND gates only:
F = A.B̄ + C̄D
5.3 Examples 89
A.B̄ + C̄D
Applying De Morgan’s theorem:
A.B.C.D
This can be implemented in figure 5.9 with NAND gates only.
Design a logic circuit to implement the operation specified in the truth table of Table 5.3.2.
Solution:
Notice that X = 1 for only three of the input conditions. Therefore, the logic expression is
X = ĀBC + AB̄C + ABC̄
The logic gates required are three inverters, three 3-input AND gates and one 3-input OR gate. The
logic circuit is shown in Figure 5.3.2
90 Chapter 5. Combinational logic circuits
This short video clip provides a summary explanation ofthe basic concepts of combinational logic.
5.4 Summary
In the previous two study units (3 and 4), logic gates are discussed on an individual basis and in
simple combinations. You were introduced to SOP and POS implementations, which are basic
forms of combinational logic. When logic gates are connected together to produce a specified
output for certain specified combinations of input variables, with no storage involved, the resulting
circuit is in the category of combinational logic. In combinational logic, the output level is at all
times dependent on the combination of input levels.
5.5 Activities
Write the output expression for the circuit in figure 5.10 below:
5.6 myUNISA ACTIVITY 91
5.7 Reference
Refer to the chapter “Combinational logic analysis” in the prescribed book, Digital fundamentals,
by Floyd.
5.8 Experiment
Objective:
To demonstrate how basic gates can be used to implement any logic function, and to show
how Boolean algebra and Karnaugh maps can be used to reduce logic circuits to their minimum
configuration.
Procedure:
Show how the expression below can be constructed using NAND gates only.
F = ............................
Results of experiment
On the breadboard below, draw a wiring diagram to show how you built the circuit. (Work in
pencil in case you make a mistake.) F = ............................
92 Chapter 5. Combinational logic circuits
this video is that, the explanation links the construction of the two adder circuits to the theoretical
knowledge of binary addition.
What is Full Adder ?| Learn under 5 min | Adder circuit | Digital Circuit | DE.19 by Practical
Ninjas (3:46) https://youtu.be/m0C3-JWWvcc
Video Explanation: In this video, the Karnaugh map is used to design the logic circuits for the
half-adder as well as for the full-adder going from the truth table of each one respectively. The
half-adder and the full-adder’s truth table are derived from the basic knowledge of binary addition.
In the video, basic practical consideration on how to go about using adders is provided.
6.1.1 Half-adder
The basic rules for addition are:
0+0=0
0+1=1
1+0=1
1 + 1 = 0 (carry 1)
Adders are very important in many types of digital systems in which numerical data are pro-
cessed.
Logic symbol for a half-adder in figure 6.1
From the truth table above you will need an exclusive-OR gate for the sum and an AND gate
for the carry-out. Half-adder logic diagram in figure 6.2
6.1 Basic Adders 95
6.1.2 Full-Adder
Logic symbol for a full-adder in figure 6.3
Where
=
∑ SUM
Cout = Out put Carry
CIN = Input Carry
A and B = input variables
Full-adder truth table
In order to add three bits, we combine two XOR gates as in figure 6.4.
The sum part will be equal to ∑ = (AXORB)XORCin
96 Chapter 6. Functions of combinational logic
Example 6.1
STEP 2:
STEP 3:
Result of minimisation =
∑ = P̄Q̄CIN + P̄QCIN + PQ̄CIN + PQCIN
98 Chapter 6. Functions of combinational logic
The 4-bit parallel adder can be expanded to handle the addition of two 8-bit numbers by using
two 4-bit adders in parallel, as is shown in figure 6.7. The carry input of the low-order adder (C0 ) is
connected to ground, because there is no carry into the least significant bit position, and the carry
output of the low-order adder is connected to the carry input of the high-order adder, as is shown in
figure 6.7. The process is known as cascading.
Note that in this case, the output carry is designated C8 , because it is generated from the 8-
bit position. The low-order adder is the one that adds the lower or less significant four bits to the
numbers, and the high-order adder is the one that adds the higher or more significant four bits to
the 8-bit numbers.
100 Chapter 6. Functions of combinational logic
Figure 6.7: Cascading of two-bit adders to form an 8-bit adder (Floyd, 2015)
Similarly, four 4-bit adders can be cascaded to handle two 16-bit numbers, as shown in figure
6.8. Note that the output carry is designated C16 because it is generated from the 16th bit position.
Figure 6.8: Cascading of four 4-bit adders to form a 16-bit adder (Floyd, 2015)
6.2.1 Examples
Example 6.2
Show how two 74LS283 adders can be connected to form an 8-bit parallel adder.
Show output bits for the following 8-bit numbers:
Solution in figure 6.9
6.3 COMPARATORS 101
Figure 6.9: Cascading of 2 of 74LS283 to form an 8-bit parallel adder (Floyd, 2015)
6.3 COMPARATORS
The basic function of a comparator is to compare the magnitudes of two binary quantities to
determine the relationship between those quantities. In its simplest form, a comparator circuit
determines whether two numbers are equal.
Equality
The exclusive-NOR gate can be used as a basic comparator because its output is a 0 if the two input
bits are not equal and a 1 if the input bits are equal. The figure 6.10 below shows the exclusive-NOR
gate as a 2-bit comparator.
In order to compare binary numbers containing two bits each, an additional exclusive-NOR gate is
necessary. The two least significant bits (LSBs) of the two numbers are compared by gate G1 and
the two most significant bits (MSBs) are compared by gate G2 as shown in figure 6.11 below. If the
two numbers are equal, their corresponding bits are the same, and the output of each exclusive-NOR
gate is a 1. If the corresponding sets of bits are not equal, a 0 occurs on that exclusive-NOR gate
output.
102 Chapter 6. Functions of combinational logic
In order to produce a single output indicating an equality or inequality of two numbers, an AND gate
can be combined with XNOR gates, as shown in figure 6.11. The output of each exclusive-NOR
gate is applied to the AND gate input. When the two input bits for each exclusive-NOR gate are
equal, the corresponding bits of the numbers are equal, producing a 1 on both inputs to the AND
gate and thus a 1 on the output. Thus, the output of the AND gate indicates equality (1) or inequality
(0) of the two numbers.
Inequality
In addition to the equality output, many IC comparators provide additional outputs that indicate
which of the two binary numbers being compared is the larger. That is, there is an output that
indicates when number A is greater than number B (A > B), and an output that indicates when
number A is less than number B (A < B), as shown in the logic symbol for a 4-bit comparator in
figure 6.12 below.
To determine an inequality of binary numbers A and B, you first examine the highest-order bit in
each number. The following conditions are possible:
(1) If A3 = 1 and B3 = 0, number A is greater than number B.
(2) If A3 = 0 and B3 = 1, number A is less than number B.
(3) If A3 = B3, then you must examine the next lower bit position for an inequality.
These three operations are valid for each bit position in the numbers. The general procedure
used in a comparator is to check for an inequality in a bit position, starting with the highest-order
bits (MSBs). When such an inequality is found, the relationship between the two numbers is
established, and any other inequalities in lower-order bit positions must be ignored; the highest-
6.3 COMPARATORS 103
Example 6.3
Determine the A = B, A > B and A < B outputs for the input numbers shown on the comparator in
figure 6.13 below.
The number on the A inputs is 0110 and the number on the B inputs is 0011. The A > B output is
high and the other outputs are low.
The 74LS85 4-bit magnitude comparator
The 74LS85 is a comparator that is also available in other IC families. The pin diagram and logic
symbol are shown in figure 6.14 below. Note that this device has all the inputs and outputs of
the generalised comparator previously discussed and, in addition, has three cascading inputs: A <
B, A = B, A > B. These inputs allow several comparators to be cascaded for comparison of any
number of bits greater than four. To expand the comparator, the A < B, A = B, and A> B outputs
of the lower-order comparator are connected to the corresponding cascading inputs of the next
higher-order comparator. The lowest-order comparator must have a HIGH on the A=B input and
LOWs on the A < B and A < B and A > B inputs.
104 Chapter 6. Functions of combinational logic
6.4 DECODERS
Please visit the following video clip for more information:
Decoder Basics and 2 to 4 Decoder, Combinational circuit in Digital Electronics, Decoder by
Engineering Funda (11:10) https://youtu.be/TJ0EG5fmTWM
A decoder is a digital circuit that detects the presence of a specified combination of bits (code)
on its inputs and indicates the presence of that code by a specified output level. In its general form,
a decoder has n input lines to handle n bits, and from one to 2n output lines to indicate the presence
of one or more n-bit combinations. In this section, several decoders are introduced.
The basic binary decoder
Suppose you need to determine when a binary 1001 occurs on the inputs of a digital circuit. An
AND gate can be used as the basic decoding element because it produces a HIGH output only when
all of its inputs are HIGH. Therefore, you must make sure that all the inputs to the AND gate are all
HIGH when the binary number 1001 occurs; this can be done by inverting the two middle bits (the
0s) as shown in figure 6.15 below.
You should verify that the output is 0 except when A0 = 1, A1 = 0 and A3 = 1 are applied to
the inputs. A0 is the LSB and A3 is the MSB. When a binary number or other weighted code is
6.4 DECODERS 105
represented in this study guide, the LSB is the right-most bit in a horizontal arrangement and the
topmost bit in a vertical arrangement, unless otherwise specified.
If a NAND gate is used in place of the AND gate in the figure above, a low output will indicate the
presence of the proper binary code, which in this case is 1001.
6.4.1 Examples
Example 6.4
Determine the logic required to decode the binary number 1011 by producing a HIGH level on the
output.
Solution
The decoding function can be formed by complementing only the variables that appear as 0 in the
desired binary number, as follows:
X = A3 .A2 .A1 .A0 (1011)
If an active-LOW output is required for each decoded number, the entire decoder can be im-
plemented with NAND gates and inverters. In order to decode each of the sixteen binary codes,
sixteen NAND gates are required (AND gates can be used to produce active-HIGH outputs).
In figure 6.17 below, a logic symbol for a 4-to-16-line (1-of-16) decoder with active-LOW outputs
is shown. The BIN/DEC label indicates that a binary input makes the corresponding decimal output
active. The input labels 8, 4, 2 and 1 represent the binary weights of the input bits (23 , 22 , 21 , 20 )
6.4 DECODERS 107
Figure 6.18: Pin diagram and logic symbol for the 74HC154 1-of-16 decoder (Floyd, 2015)
Example 6.5
A certain application requires that a 5-bit number be decoded. Use 74HC154 decoders to implement
the logic. The binary number is represented by the format A4 , A3 , A2 , A1 , A0 .
Solution
Since the 74HC154 can handle only four bits, two decoders must be used to decode five bits. The
fifth bit, A4 is connected to the chip select inputs CS1 and CS2 inputs of the other decoder, as shown
in figure 6.19 below. When the decimal number is 15 or less, A4 = 0 , the low-order decoder is
enabled, and the high-order decoder is disabled. When the decimal number is greater than 15,
A4 = 1 so A4 = 0, the high-order decoder is enabled, and the low-order decoder is disabled.
6.5 Encoders 109
6.5 Encoders
The following video clip provides some more information about this section:
Combinational Logic - Encoders by David Williams (12:40) https://youtu.be/iYrVc1Y3dO8
decimal or octal digit, and converts it to a coded output, such as BCD or binary. Encoders can also
be devised to encode various symbols and alphabetic characters. The process of converting from
familiar symbols or numbers to a coded format is called encoding.
The BCD (8421) code is listed in the table below. From this table you can determine the
relationship between each BCD bit and the decimal digits in order to analyse the logic. For instance,
the most significant bit of the BCD code, A3 is always a 1 for decimal digits 8 or 9. An OR
expression for bit A3 in terms of the decimal digits can therefore be written as
A3 = 8 + 9
The basic operation of the circuit in the figure above is as follows: When a HIGH appears on one
of the decimal digit input lines, the appropriate levels occur on the four BCD output lines. For
instance, if the input line 9 is HIGH (assuming all other input lines are LOW), this condition will
produce a HIGH on outputs A0 and A3 and LOW’s on outputs A1 and A2 , which is the BCD code
(1001) for decimal 9.
The 74HC147 is a priority encoder with active-low inputs (0)m for decimal digits 1 to 9 and
active-low BCD outputs, as indicated in the logic symbol in figure 6.23. A BCD zero output is
represented when none of the inputs is active. The device pin numbers are in parentheses.
112 Chapter 6. Functions of combinational logic
6.6 MULTIPLEXERS
A multiplexer (MUX) is a device that allows digital information from several sources to be
routed onto a single line for transmission over that line to a common destination. The basic multi-
plexer has several data-input lines and a single output line. It also has data-select inputs, which
permit digital data on any one of the inputs to be switched to the output line. Multiplexers are also
known as data selectors.
In figure 6.24, a 2-bit code on the data-select (S) inputs will allow the data on the selected data input
to pass through to the data output. If a binary 0 (S1 = 0 and S0 = 0) is applied to the data-select
lines, the data on input D0 appear on the data-output line. If a binary 1 (S1 = 0 and S0 = 1) is
applied to the data-select lines, the data on input D1 appear on the data output. If a binary 2 (S1 = 1
and S0 = 0) is applied, the data on D2 appear on the output. If a binary 3 (S1 = 1 and S0 = 1) is
applied, the data on D3 are switched to the output line. A summary on this operation is given in the
table below.
Now let’s look at the logic circuitry required to perform this multiplexing operation. The data
output is equal to the state of the selected data input. We can therefore derive a logic expression for
the output in terms of the data input and the select inputs.
The implementation of this equation requires four 3-input AND gates, a 4-input OR gate and two
inverters to generate the complements of S1 and S0 , as shown in figure 6.25. Because data can be
selected from any of the input lines, this circuit is also referred to as a data selector.
114 Chapter 6. Functions of combinational logic
6.6.1 Examples
Example 6.6
The data-input and data-select waveforms in figure 6.26 are applied to the multiplexer in figure
6.25. Determine the output waveform in relation to the inputs.
Solution
The binary state of the data-select inputs during each interval determines which data input is
selected. Note that the data-select inputs undergo a repetitive binary sequence 00, 01, 10, 11, 00,
01, 10, 11 and so on. The resulting output waveform is shown in figure 6.26.
6.6 MULTIPLEXERS 115
Figure 6.27: Pin diagram and logic symbol for the 74HC157 quadruple 2-input data selec-
tor/multiplexer (Floyd, 2015)
Demultiplexers
for extra information on this section, kindly watch the following video clip
Combinational Logic - Demultiplexers by David Williams (8:19)
https://youtu.be/OEAOgDIgPbM
A demultiplexer (DEMUX) basically reverses the multiplexing function. It takes digital information
from one line and distributes it to a given number of output lines. For this reason, the demultiplexer
is also known as a data distributor. As you will learn, decoders can also be used as demultiplexers.
Figure 6.28 shows a 1-line-to-4-line demultiplexer (DEMUX) circuit. The data-input line goes to
all the AND gates. The two data-select lines enable only one gate at a time, and the data appearing
on the data-input line pass through the selected gate to the associated data-output line.
116 Chapter 6. Functions of combinational logic
6.7 Examples
6.7.1 Example 6.7
The serial data-input waveform (data in) and data select inputs (S0 and S1) are shown in figure 6.29.
Determine the data-output waveforms on D0 through D3 for the demultiplexer in figure 6.28.
Solution
Note that the select lines go through a binary sequence so that each successive input bit is routed to
D0 , D1 , D2 , D3 in sequence, as shown by the output waveforms in figure 6.29.
The 74HC154 demultiplexer
We have already discussed the 74HC154 decoder in its application as a 4-line-to-16-line decoder.
This device and other decoders can also be used in demultiplexing applications. The logic symbol
for this device when used as a demultiplexer is shown in figure 30. In demultiplexer applications,
the input lines are used as the data-select lines. One of the chip select inputs is used as the data-input
line, with the other chip select input held LOW to enable the internal negative-AND gate at the
bottom of the diagram.
6.8 Summary
In this study unit, various types of common logic components that purely consist of a combina-
tion of logic gates were studied one by one. These logic circuits included adders, comparators,
decoders, encoders, code converters, multiplexers (data selectors), demultiplexers, and parity gener-
ators/checkers. This study unit studies each of these logic circuit from its truth table, deducts its
boolean logic expression, applies the rules and theorems of Boolean logic simplification as studied
in study unit 5 to obtain the simplest SOP or POS form of the logic circuit’s boolean expression,
and realises the logic circuit itself.
118 Chapter 6. Functions of combinational logic
6.11 REFERENCE
Refer to the chapter “Functions of combinational logic” in the prescribed book by Floyd.
7. And-or-invert (AOI) ICs for implementing SOP ex
7.1 Introduction
As you can recall from SOP expressions, their logic circuit consists of AND gates feeding into a
single OR gate, for example This is then referred to as AND-OR logic. Sometimes when applying
AOI (and-or-invert) gates, the SOP expressions are not in the standard form.
Because the SOP expressions are used so often, they have manufactured ICs that perform this
operation for us. This means that fewer ICs need to be used in logic circuits.
are introduced briefly, since the ICs use the old gate nomenclature.
Briefly, the AND gate is represented in figure 7.1 as follows:
The logic expression for the 74LS51 is given in the following two equations:
1Y = 1A.1B.1C + 1D.1E.1F
2Y = 2A.2B + 2C.2D
There are two outputs, which is why there are two expressions, 1Y and 2Y. The 1 or the 2 in front
of the variables give an indication of which output it is connected to. The expression clearly shows
you the layout of the gates inside the 74LS51 IC, as can be seen in figure 7.10, in the internal circuit
in figure 7.11, and the pin layout in figure 7.12.
Figure 7.11 shows the internal circuit diagram of the and-or-invert (AOI) 74LS51 ICs. Note
that they use a NOR gate for the outputs. This leads to the IC having an active LOW output. If we
want to affect an active high output, we must invert the output of the AOI. The 74LS51 can be used
to implement two SOP expressions.
7.5 Summary 127
As you will see, these AOI devices have a limited application, but they are nevertheless useful for
small circuits.
7.5 Summary
AND-OR-Invert (AOI) logic and AOI gates are two-level compound (or complex) logic functions
constructed from the combination of one or more AND gates followed by a NOR gate. Construction
of AOI cells is particularly efficient using CMOS technology where the total number of transistor
gates can be compared to the same construction using NAND logic or NOR logic. The complement
of AOI Logic is OR-AND-Invert (OAI) logic where the OR gates precede a NAND gate.This study
unit studies the various common AOI Integrated ICs for logic gates and devices as studies in this
128 Chapter 7. And-or-invert (AOI) ICs for implementing SOP expressions
module. Each time, the pinout of the considered IC is studied and you learn how to identify the
various pins of an IC.
tW = 2 ms, T = 4 ms
%duty cycle = ( tTW ) × 100 = ( 24 ms
ms ) × 100 = 50%
As we can see, there are four product terms in the expression, therefore we can use all four AND
gates in the 74LS64 AOI IC. The first and third terms have one variable fewer than the number of
inputs that are available on the gates. This causes no problem; we simply need to reduce the inputs
on these particular gates. To reduce the inputs on an AND gate, the unused inputs can be connected
to the supply voltage.
8.11 ACTIVITY 7.1 133
Datasheet