MLPL171-01 Processing and Logic Concepts Study Guide - V1.0 Nov 2016
MLPL171-01 Processing and Logic Concepts Study Guide - V1.0 Nov 2016
Compiled by: Marie Murphy, Ana Ribiero, Warwick Ashford, Louise Lok,
Stephen van Rensburg
Version 1.0
This module lays the foundation for understanding the logic concepts on which
computer programming is based. The module concentrates on three key areas
in particular, namely: number systems, logic concepts and algorithm design.
The first section introduces students to different number systems where they
apply their knowledge to convert from one number system to another and
perform basic addition and subtraction in different number systems. The
execution of arithmetic operations in a computer is discussed.
Logic concepts covers logic symbols AND, OR and NOT. It covers electronic
circuits containing logic gates and the representation of logical equations as
truth tables. Boolean algebra and Karnaugh maps are used for proving and
simplifying Boolean expressions. The student is taught to apply decision tables
as a tool to model and test complex logic.
The third section covers system and program flowcharts and the application of
trace tables to discover logical errors in program flowcharts. The standard
symbols used for flowcharting will be illustrated and students will write their
first algorithms and test the validity of their designs.
Prerequisites
The Processing and Logic Concepts module requires basic mathematics-
arithmetic and algebra to Grade 9 level.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 1 of 170
2.4 Determine the result of a Boolean
expression for a set of variable
values.
2.5 Determine conditions, actions and
impossible condition states for a
given scenario.
2.6 Determine the actions to take
place for a particular set of conditions
within a given scenario.
3.1 Use appropriate symbols for the
components of the construct.
3.2 Plot the direction of information
flow for a given scenario.
3.3 Interpret a given system
flowchart.
3. Represent logic high-level and low- 3.4 Use Boolean logic to control flow.
level procedural constructs. 3.5 Apply iteration
3.6 Perform increments to count
inputs (counting).
3.7 Perform accumulation on inputs
(summing).
3.8 Validate input and display error
messages.
4.1 Draw a trace table for a program
flowchart.
4.2 Use sample input to trace
through the logic of a program
4. Evaluate a program to determine flowchart.
correctness. 4.3 Determine errors in initialisation,
accumulation, increment and
validation.
4.4 Determine semantic errors in an
algorithm.
Reference books
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 2 of 170
How to approach this module
Ensure that you know and understand the unit before continuing with an
exercise. Work through the examples and complete all the exercises before
attempting the examination.
You will not pass the examination if you rush through the material without
completing the exercises and revision questions and checking them with
your lecturer. The examinations are designed to test theory, insight and
practical skills. The examination will consist of multiple choice questions and
written questions.
It is very important that you use all of the study aids available to you. Some of
the questions in the examinations will test your general knowledge on
advanced subjects that may not have been covered in the study guide,
although the content in the study guide will be sufficient to ensure that you
pass.
Take note that each module builds on previous modules. Examinations will
cover all the material with which you should be familiar. You may be asked to
apply the skills you learn in this module (and the other fundamental modules)
to questions in your programming language examinations, so mastery of this
material is essential.
You have a certain number of days to complete the module, including the
examination.
Software requirements
The Raptor flowcharting program available from
http://raptor.martincarlisle.com/
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 3 of 170
Other requirements
A flowchart stencil.
Denotes the outcomes of the unit, i.e. the knowledge and skills
that you should have acquired after each section.
Points out the keywords of each section. Ensure that you can
name and explain all the keywords before proceeding to the
next section.
Denotes a bibliography
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 4 of 170
Unit 1 - Number Systems
When visiting foreign countries, most travellers must convert the prices of
goods and services from the foreign currency to their own currency before they
can judge the cost of the goods or services. A similar situation exists for
programmers because most input and final output values will be in decimal,
but computers work with only binary, octal and hexadecimal values. Therefore,
decimals are constantly converted to numbers expressed in these number
systems and vice versa.
There are also conditions that make it convenient to convert from a decimal
system to some other number system. There are many methods or techniques
that can be used to convert numbers from one base to another. This unit
illustrates one technique used in converting from any base to base 10 and a
second technique to be used in converting from base 10 to any other base.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 5 of 170
NOTE Steps 3 and 4 must be repeated, recording remainders from right to
left, until getting an answer of zero in Step 3. Do not forget to record
the remainder when the division answer is equal to zero.
2610 = ?2
2610=110102
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 6 of 170
1.1.2.2 Decimal to octal
41610 = ?8
41610 = 6408
Figure 1.2 shows the steps required to convert decimal 416 to its octal
equivalent of 640. The example requires repetition of Step 3 and 4 to
determine that decimal 416 is equivalent to octal 640.
41610 = ?8
41610 = 6408
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 7 of 170
Figure 1.2 – Decimal-to-octal conversion
94110 = ?16
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 8 of 170
0 r 3 3/16=0 remainder is 3
The answer to the division is zero, so stop. Read the
converted number upwards.
94110 = 3AD16
The general rule for determining column values is that the first (or right-hand)
whole number column value is equal to the value of the base to the zero
power. Any number to the power of zero is equal to one. Therefore, all bases
have a column value of one for the first column.
The second column is equal to the value of the base to the first power. The
value of any number to the first power is equal to that same number.
Therefore, the second column value in all number systems is equal to the value
of the base.
The third column value is equal to the base to the second power, or the base
value times itself. The values of the columns continue to increase in value by
one more power for each column from right to left. For example, the fourth
column value is the base to the third power; the fifth column value is the base
to the fourth power, and so on.
The equivalent decimal value for bases 16, 10, 8, and 2 is shown in the
following table.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 9 of 170
The easiest way to understand how column values are determined is to look at
the familiar base of 10. The first column value is equal to 10 to the zero power,
which is one. The second column value is 10 to the first power, which is 10.
The third column value is 10 to the second power, which is 100 (10 x 10). The
fourth column value is 10 to the third power, which is 1 000 (10 x 10 x 10).
The fifth column value is 10 to the fourth power, which is 10 000 (10 x 10 x 10
x 10). This same process can be used for determining the column value for
base 2, base 8, base 16, or any other base.
NOTE When applying the method above, the resulting column values are
decimal, and not in the original base.
A short method of determining the column values is to remember that the first
or right-hand column value is always going to be 1. The second column value
is always equal to the base. From the third column onwards, the column value
is equal to the base multiplied by the column value to its right. For example,
the fourth column value in base 16 is equal to the base multiplied by the
column value to its right. In other words: 16 x 256 = 4 096.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 10 of 170
There are three steps in converting a number in any number system to its
decimal equivalent:
101102 = ?10
24 23 22 21 20
16s 8s 4s 2s 1s
1 0 1 1 0
16s 8s 4s 2s 1s
x1 x0 x1 x1 x0
16 0 4 2 0
16 + 0 + 4 + 2 + 0 = 22
101102 = 2210
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 11 of 170
1.1.3.2 Octal to decimal
Figure 1.5 illustrates the steps required to convert octal 257 to its equivalent
decimal value. The total in this example is equal to 175. Therefore, octal 257 is
equal to decimal 175.
2578 = ?10
82 81 80
64s 8s 1s
2 5 7
64s 8s 1s
x2 x5 x7
128 40 7
128 + 40 + 7 = 175
2578 = 17510
Figure 1.6 shows the steps required to convert hexadecimal 2B3C to its
equivalent decimal value. Notice that the hexadecimal digits of A to F must be
converted to their equivalent decimal value of 10 to 15 before multiplying.
In this case, B is equal to 11 and C is equal to 12. The sum of the products in
this example is 11068. Therefore, 11068 is the decimal equivalent of
hexadecimal 2B3C.
2B3C16 = ?10
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 12 of 170
Step 2: Multiply column values by column digits
B=11
C=12
8192
2816
48
+ 12
11068
2B3C16 = 1106810
To reduce the volume and print time of the memory dump and to show
memory content with a greater variety of symbols, either the octal or
hexadecimal number system is used as a shortcut notation. All computers use
either octal or hexadecimal as their shortcut notation, depending on the
memory organisation of the machine. If the basic unit of storage (such as a
byte) is a multiple of three bits, octal is used as the shortcut. If the basic unit
of storage is a multiple of four bits, hexadecimal is used as the shortcut
notation. Because the selection of the shortcut notation is determined by the
memory organisation of the machine, any particular computer will always use
either octal or hexadecimal, but not both. Therefore, programmers are not
required to convert between octal and hexadecimal.
Table 5 shows the relationship of octal and hexadecimal to binary. First, note
that the maximum value for a single digit of octal (octal 7) is equal to the
maximum value of three digits of binary.
The value range of one digit of octal duplicates the value range of three digits
of binary. If octal digits are substituted for binary digits, the substitution is on
a one-to-three basis. Computers using octal as the shortcut notation can
represent the binary contents of memory in one third of the space and time
required when using binary.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 13 of 170
Second, note that the maximum value of one digit in hexadecimal is equal to
the maximum value of four digits in binary. Thus, the value range of one digit
of hexadecimal is equivalent to the value range of four digits of binary.
Therefore, hexadecimal shortcut notation is a one-to-four reduction in the
volume of a memory dump.
To convert binary to octal: Divide the binary digits into groups of three,
starting from the right. If the number of binary digits is not equal to a multiple
of three, zeros may be added to the left-hand side. Next, convert each group
of three binary digits into one octal digit. Use the binary-to-decimal conversion
method. Decimal digits 0 to 7 correspond with octal digits 0 to 7. Each group is
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 14 of 170
converted as if it were a separate entity. The rightmost bit of the group has a
column value of one; the second column has a value of two, and the third
column a value of four.
1100112 = ?8
110 011
110 011
6 3
1100112 = 638
Figure 1.8 shows the expansion of octal to three binary digits. It may be
necessary to add zero to the left of the number to make groups of three binary
digits.
2468 = ?2
2 4 6
010 100 110
2468 = 0101001102
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 15 of 170
1.1.4.2 Hexadecimal notation
Table 7 lists the steps for the reduction of binary to hexadecimal and the
expansion of hexadecimal to binary.
110101112 = ?16
1101 0111
1101 0111
13 7
D 7
110101112 = D716
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 16 of 170
Figure 1.10 depicts the expansion of hexadecimal to its equivalent binary. The first
step is to convert the decimal equivalent of each hexadecimal digit to four binary
digits. The second step is to run the resulting groups of four binary digits into a
single string of binary.
2A916 = ?2
2 A 9
2 10 9
0010 1010 1001
2A916 = 0010101010012
1.2.1 Arithmetic
When a programmer is working with memory dumps to locate errors, simple
addition and subtraction of address values will be required. These addresses
will be either in octal or hexadecimal, depending on the computer's memory
organisation. In some cases, the programmer may also add or subtract binary
values to verify arithmetic results.
1.2.2 Addition
The steps required to add two numbers are the same in all number systems.
Therefore, the addition steps that are used for decimal numbers can also be
applied to adding binary, octal, and hexadecimal values. The easiest approach
to adding values of a number system other than decimal is to add the column
digits as if they were decimal. Because all binary and octal digit symbols are
also decimal symbols, adding them as decimal digits is easy. Hexadecimal
digits, however, use some symbols that are not included as decimal digits.
These additional symbols, A to F, should be converted to their equivalent
decimal values of 10 to 15 before the addition is attempted.
The general steps of addition are described in Figure 1.11. Addition always
begins by adding the rightmost column. If the column total is equal to or
greater than the value of the base, a 'carry-over' will occur. Whenever a 1 is
carried to the next column, the value being carried is equal to the value of the
base. As an example, if two decimal numbers were being added, and the first
column total was equal to 12, a 1 would be placed in the next column, which
would be a carry of 10 (the value of the base). Remember, a 1 in the 10s
column is equal to 10 in the 1s column. After carrying a 1 to the next column,
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 17 of 170
the remaining value is entered for the first column. These steps are repeated
for each column until the entire number has been added. Let us look at some
applications of these steps.
ADDITION
Step 1: Starting with the rightmost column, add the digits of the column
together.
Step 2: If the column total from Step 1 is equal to or greater than the base,
subtract the value of the base from the column total and carry a 1 to the next
column. If the column total is still equal to or greater than the base, repeat
Step 2.
Figure 1.11 - Steps in addition
479
+ 463
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 18 of 170
Step 3: If there are additional
11 columns or carry occurred in Step
479 2, add the next column and repeat
+ 463 Step 2.
942 Step 2: If the column total from
Step 3 is equal to or greater than
1+4+4=9
9 remains in this column the base, subtract the value of the
no carry over base from the column total and
carry a 1 to the next column.
479
+ 463
942
10111
+ 01110
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 19 of 170
Step 3: If there are additional
1 columns or carry occurred in Step 2,
10111 add the next column and repeat Step
+ 01110 2.
01 Step 2: If the column total from Step
3 is equal to or greater than the base,
(1+1)=2
0 remains in this column subtract the value of the base from the
carry over 1 group of 2 (a 1) column total and carry a 1 to the next
column.
1=1
1<2, so 1 remains in this
column
no carry over
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 20 of 170
10111
+ 01110
100101
265
+ 434
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 21 of 170
There are no more columns, so we
11 stop.
265
+ 434
721
1+2+4=7
7<8, so 7 remains in this
column
no carry over
265
+ 434
721
5A9
+ A86
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 22 of 170
Step 3: If there are additional
1 columns or carry occurred in Step
5A9 2, add the next column and repeat
+ A86 Step 2. Note: A = 10
2F Step 2: If the column total from
Step 3 is equal to or greater than
A=10
10+8=18=(16)+2 the base, subtract the value of the
2 remains in this column base from the column total and
carry over 1 group of 16 (a 1) carry a 1 to the next column.
1=1
1<16, so 1 remains in this
column
no carry over
5A9
+ A86
102F
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 23 of 170
1.2.3 Subtraction
The principles of subtraction using decimal numbers can be applied to
subtraction of other bases as well. Figure 1.16 lists the two steps of
subtraction, which are repeated for each column of the numbers. The first step
is to determine if it is necessary to borrow. If the subtrahend (the lower digit)
is larger than the minuend (the top digit), it is necessary to borrow from the
column to the left. The value borrowed depends upon the base of the number.
The value borrowed is always the decimal equivalent of the base. Thus, in
binary, 2 is borrowed. Borrowing in octal borrows 8, and borrowing in
hexadecimal borrows 16. The second step is simply to subtract the lower value
from the top value.
SUBTRACTION
Step 1: If the subtrahend digit of the column is larger than the minuend
digit, borrow from the column to the left. (Note: The value borrowed is
always equal in decimal to the value of the base.)
Step 2: Subtract the lower value from the top value.
Figure 1.16 - Steps in subtraction
346
- 183
1st operation 2nd operation
(Steps 1 and 2)
3rd operation
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 24 of 170
1.2.3.2 Subtracting in binary
Figure 1.18 illustrates the first steps of subtracting binary 01110 from binary
10101. The first column does not require borrowing, and the 0 is subtracted
from 1, leaving 1. In the second column 1 is subtracted from 0, so borrowing
must occur. A 1 is borrowed from the column to the left (leaving 0). The 1
borrowed from the third column becomes 2 in the second column. In the third
operation, the third column is also subtracting 1 from 0, and borrowing is
again required. The fourth column contains a 0 and thus has nothing to lend.
Therefore, the borrowing must be from the fifth column. Borrowing 1 from the
fifth column gives two in the fourth column, leaving 0 in the fifth. Now the
fourth column has something to lend for the fourth operation. When 1 of the 2
in the fourth column is borrowed, it becomes 2 in the third column, leaving 1 in
the fourth. The subtraction of 1 from 2 gives a difference of 1. In the fifth
operation, 1 is subtracted from 1 in the fourth column, giving 0, and
subtraction of the fifth column is 0 from 0, leaving 0 (the sixth operation).
NOTE Remember that binary values have a base of 2 and that is why 2 is
borrowed instead of just one.
10101
- 01110
1st operation (Steps 1 and 2 from 2nd operation
Table 9)
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 25 of 170
5th operation 6th operation
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 26 of 170
decimal, the 12 must be converted to a hexadecimal C. In the second column,
8 is subtracted from 6, and again borrowing is necessary. Borrowing 1 from
the third column adds 16 to the second column, for a total of 22. Taking 8
from 22 is equal to decimal 14, or hexadecimal E. In the last column, 4 is
subtracted from 9, leaving 5.
A7B
-48F
1st operation (Steps 1 and 2 from 2nd operation
Table 1.7).
3rd operation
An important cost consideration is the size of the numbers that the computer
will handle. The computer manufacturer has to design the computer to handle
numbers of a specific maximum size. For example, some computers handle
numbers of no more than eight digits (bits), and are much cheaper to produce
than computers that can handle numbers of sixty-four bits and larger.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 27 of 170
If this sign bit is a zero, the number is positive and the remaining five bits
represent the value of the number. If the leftmost sign bit is a one, the
number is considered negative and the remaining five bits represent the value
of the negative number.
The first leftmost bit is zero, which indicates that the number is positive. If the
remaining five bits are converted to decimal, the following is concluded:
(1 x 8) + (1 x 2) + (1 x 1) = 8 + 2 + 1 = 11 (decimal).
This is a negative number because the leftmost bit is a one. The value of this
negative number is represented by the last five bits. Therefore, this is -11
decimal. Table 8 shows the possible positive and negative numbers using a
sign bit and five value bits.
Since the leftmost bit was reserved for the sign, the maximum quantity that
can be represented with five bits is +31, and the minimum is -31. The earliest
computers used this method of sign bits and quantities. Computer hardware
was built to recognise positive and negative numbers and to add or subtract
them accordingly. However, this method meant installing complex hardware
circuits. As a result, this method was soon abandoned in favour of what is
called complement arithmetic.
Change all the 0s to 1s and all the 1s to 0s. This is called One's
Complement.
Take the one's complement and then add one to the result. This is called
Two's Complement.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 28 of 170
1.3.2.1 One's complement
The following example shows how a one's complement is obtained by changing
every one in the number to a zero and every zero in the number to a one.
NOTE This method will always change the sign of the number.
The sign bit is the first leftmost bit. If the number is positive to start with (sign
bit = 0), the one's complement will make it negative (sign bit = 1).
Add the six-bit binary numbers 001010 (10 decimal) and 000011 (3 decimal).
Computers can be built economically to handle such additions and can even be
built to subtract, but it is more economical to perform addition only. Here is
where complements play an important role.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 29 of 170
This is the way one's complement arithmetic works. The extra bit, or overflow
bit, is added to the sum to give us the correct answer. Table 1.9 summarises
what is to be done when adding or subtracting.
They found it was better to handle arithmetic with two's complement rather
than one's complement. The two's complement of a binary number is obtained
by following two steps:
Step 1 Take the one's complement by changing all 0s to 1s and all 1s to 0s.
Step 2 Add 1 to the one's complement.
Now compare one's complement and two's complement using the problem (10
- 3) = 7 (decimal).
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 30 of 170
With two's complement arithmetic, there is a two-step procedure, but only a
one-step addition procedure. Two's complement arithmetic is more efficient
than one's complement arithmetic, and is therefore used in modern computers
instead of one's complement arithmetic. Table 1.10 contrasts one's and two's
complements.
1.3.3 Overflow
Overflow occurs when the number of bits resulting from an arithmetic
operation exceeds the maximum number of bits that the computer can handle.
This occurred earlier with complement arithmetic. The example we examined
caused no problem. However, some overflow can cause problems.
Binary Decimal
The number 27 has been added to 16 to give 43, but look at the binary. Two
positive numbers have been added and obtained a negative binary number. It
is negative because the leftmost sign bit is 1. This is problematic because
adding two positive numbers cannot have a negative result. When two positive
numbers are added to give a negative number in binary, the error that occurs
is called a size error. In other words, a size error occurs when the result of an
arithmetic operation exceeds what the computer allows. This can be thought of
as a 'value overflow' - the limit of +31 has been exceeded by 12! The leftmost
(sixth) bit is reserved for the sign (+ or -) and the remaining five bits have a
maximum value of 31 (11111 in binary).
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 31 of 170
Understanding the limitations and capabilities of a computer can help you to
become a more efficient and effective computer programmer.
Binary
Octal
Hexadecimal
One's complement
Two's complement
Overflow
1.5 Exercises
1. Convert the following decimal numbers to octal using the successive division
method:
a. 2
b. 7
c. 13
d. 19
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 32 of 170
5. Obtain the hexadecimal equivalent of the following octal numbers by first
converting to binary:
a. 63
b. 72
c. 147
d. 361
14. Add the following octal numbers: 743 + 571 + 777 + 453 + 737
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 33 of 170
16. Hexadecimal 1B plus hexadecimal 11 equals hexadecimal_______
2. The largest single digit in our common decimal number system is:
A. nine
B. same as the base
C. both A and B are correct
D. one more than the base
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 34 of 170
6. The hexadecimal equivalent of decimal 864 is: _____.
A. 4E
B. 360
C. 55A
D. B84
9. Converting 19 (base 16), first to binary and then to octal, the answer is:
A. bin = 00110, oct = 13
B. bin = 01010, oct = 11
C. bin = 11001, oct = 31
D. bin = 10101, oct = 33
10. Converting 309 (base 16), first to binary and then to octal, the answer is:
A. bin = 0011110110, oct = 1141
B. bin = 0011001100, oct = 1114
C. bin = 0011110110, oct = 1411
D. bin = 1100001001, oct = 1411
11. Converting C143 (base 16), first to binary and then to octal, the answer is:
A. bin = 1100000101000011, oct = 305041
B. bin = 1100000101000011, oct = 140503
C. bin = 0011111010111100, oct = 305041
D. bin = 0011111010111100, oct = 140503
12. Converting 24F8 (base 16), first to binary and then to octal the answer is:
A. bin = 10010011111000, oct = 22370
B. bin = 01101100000111, oct = 22370
C. bin = 01101100000111, oct = 07322
D. bin = 10010011111000, oct = 07322
13. Converting 87 (base 10), first to binary and then to hexadecimal, the
answer is: ____________.
A. bin = 0101000, hex = 57
B. bin = 0101000, hex = 75
C. bin = 1010111, hex = 75
D. bin = 1010111, hex = 57
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 35 of 170
14. Converting 163 (base 10), first to binary and then to hexadecimal, the
answer is:
A. bin = 01011100, hex = 3A
B. bin = 01011100, hex = A3
C. bin = 10100011, hex = A3
D. bin = 10100011, hex = 3A
15. Converting 4910 (base 10), first to binary and then to octal, the answer is:
A. bin = 1001100101110, oct = 65411
B. bin = 1001100101110, oct = 11456
C. bin = 0111010011001, oct = 11456
D. bin = 0111010011001, oct = 65411
16. Converting 3598 (base 10), first to binary and then to octal, the answer is:
A. bin = 011100000111, oct 7016
B. bin = 111000001110, oct 7016
C. bin = 111000001110, oct 6107
D. bin = 000111110001, oct 7016
17. Converting 7985 (base 10), first to binary and then to octal, the answer is
A. bin = 1111100110001, oct = 17461
B. bin = 1111100110001, oct = 16471
C. bin = 0000011001110, oct = 17461
D. bin = 0000011001110, oct = 16471
18. Convert 819 base 10 to binary, octal and hexadecimal, the answer is:
A. 1100110011, 1463, 120C
B. 1100110011, 1507, 333
C. 1001000001110, 1463, 120E
D. 1100110011, 1463, 333
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 36 of 170
Unit 2 - Logic Gates and Truth Tables
This section on logic concepts lays the foundations for program design and
programming.
Here logic systems which shaped the evolution of the modern computer are
explored. Many discoveries will be made throughout this module. One of these
is that all computers are designed around logic circuits known as logic gates
or Boolean gates. Another discovery will be how technology used to
implement those gates has gone through many rapid changes since the first
computers were developed.
The very first electronic gates were created using relays, but these gates were
slow and bulky. Relays were replaced by vacuum tubes, which were much
faster, but they were also bulky as well as being unreliable and high in power
consumption. Vacuum tubes were replaced by transistors, which were invented
in 1947. Transistors were used to make gates in computers because they were
compact, reliable, and used relatively little power. Integrated circuits were
invented in the early 1960s, which meant transistors could be made together
on silicon 'chips'. First arrived Small Scale Integration (SSI) with integrated
circuits typically consisting of 20 transistors etched into a silicon chip. Next
arrived Medium Scale Integration (MSI) with chips containing components
made up of multiple gates. Large Scale Integration (LSI) made it possible to fit
all the components of a simple microprocessor onto a single chip, containing
over 4 000 transistors. Finally, Very Large Scale Integration has seen the
steady increase in the number of transistors since the early 1970s. The first
Pentium processor was released in 1993 with 3.2 million transistors.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 37 of 170
use a binary system of logic in which variables can have only one of two
possible values, zero or one.
Binary logic uses the three basic logic operations, which can be illustrated
using Venn diagrams as shown in Figure 2.1.
If given the statement: 'If it is NOT raining, then I will go out', it can be said
that 'It is raining' is either TRUE or FALSE, and consequently, 'I will go out' will
be either TRUE or FALSE. This logic relationship can be expressed in a table,
called a truth table. Consider Table 11.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 38 of 170
Remember, a bistable device can be in one of two possible states – never
in both at the same time. For instance, a lamp is either on or off. Electrical
current either flows or there is no current. A statement is either true or
false.
In binary, a value is either one or zero, so in binary logic we assign a value
of 1 to one state and a value of zero to the other.
A lamp that is on represents a '1', while a lamp that is off represents a '0'.
Similarly, a statement that is true represents a '1' and a statement that is
false represents a '0', or a circuit that is closed represents a '1' and an open
circuit represents a '0'.
Below is a more detailed look at the three basic binary operations that are
used to indicate relationships between binary variables.
The truth table for the AND circuit is shown in Table 12.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 39 of 170
The truth table for the AND circuit can be expressed in binary terms by
allocating a value of 1 to A and B if they are both closed, and a value of 0 if
they are both open.
Let L = 1 if the light is on and let L = 0 if the light is off.
The truth table for the AND operator now looks like the one shown in
Table 2.3.
This can be expressed in binary terms by replacing closed with 1, open with
0, off with 0, and on with 1 to obtain the truth table for the OR operator
shown in Table 2.5.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 40 of 170
Table 15 - Truth table for the OR operator
A B L=A+B
0 0 0
0 1 1
1 0 1
1 1 1
In the following section, binary logic is explored to show how to design and
analyse electronic circuits.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 41 of 170
LOGIC GATES
0 = FALSE
1 = TRUE
Input
Logic Output
gate
NOTE The voltage ranges for 0 or 1 are separated by a neutral range so that
no confusion can arise as to whether a certain voltage represents a 0
or 1. In Boolean algebra, the symbol which represents a gate is called
a logic symbol.
A
(Inputs) C (Output)
B
The truth table (Table 2.7) is the same as that of the AND operator.
Figure 2.6 shows how an AND gate works.
Table 17 - AND
A B C
0 0 0
0 1 0
1 0 0
1 1 1
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 42 of 170
AND
AND
AND
AND
True, on, or 1
False, off, or 0
A
(Inputs) C (Output)
B
The truth table (Table 18) is the same as that of the OR operator.
Figure 2.8 shows how an OR gate works.
Table 18 - OR
A B C
0 0 0
0 1 1
1 0 1
1 1 1
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 43 of 170
OR
OR
OR
OR
True, on, or 1
=
False, off, or 0
(Input) A A’ (Output)
With the aid of a truth table (Table 19), the behaviour of this gate can be
described as follows (NOTE it is the same as that of the NOT operator):
Table 19 - NOT
A A'
0 1
1 0
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 44 of 170
2.2.4 Additional logic gates
The additional gates that will be dealt with in this module are the NAND,
NOR, XOR, and XNOR gates.
A table of all gates with definitions and truth tables is given at the end of
this section.
A C = A.B D = C’ = (A.B)’
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 45 of 170
State
indicator
A
D
B
The truth table for a NAND gate can be derived as shown in Table 20.
NOTE The output of a NAND gate is 0 only in the case when all inputs are
equal to 1. For all other combinations of input values the output will
be equal to 1.
A C=A+B D=C=A+B
A
D
B
State indicator
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 46 of 170
The truth table for a NOR gate can be derived as shown in Table 21.
Table 21 - NOR
A B C= D = C' A B D
A+B
0 0 0 1 0 0 1
0 1 1 0 0 1 0
1 0 1 0 1 0 0
1 1 1 0 1 1 0
The truth table for the XOR gate is derived as shown in Table 22.
Table 22 - XOR
A B A' B' AB' A'B AB' +
A'B
0 0 1 1 0 0 0
0 1 1 0 0 1 1
1 0 0 1 1 0 1
1 1 0 0 0 0 0
A
F
B
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 47 of 170
The truth table for an XOR gate can be derived as shown in Table 2.13.
NOTE XOR: Output will be TRUE [1], if only one of the inputs is TRUE [1],
but not both.
A
F
B
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 48 of 170
Buffer
F=x x F
No
Makes no change 0 0
Symbol
to input. 1 1
NAND
F = (xy)' x y F
The result is false or 0 0 1
only if both F = xy 0 1 1
variables are true. 1 0 1
1 1 0
NOR x y F
x F = (x + y)' 0 0 1
The result is false F or 0 1 0
y
if either variable is F=x+y 1 0 0
true. 1 1 0
XOR x y F
F = xy' + x'y 0 0 0
The result of the or 0 1 1
Exclusive OR is F=x y 1 0 1
true if only one of 1 1 0
the variables is
true.
XNOR x y F
F = xy + x'y' 0 0 1
The result of the Or 0 1 0
Exclusive NOR is 1 0 0
false if only one of F= x y 1 1 1
the variables is
true.
For example: A + B = B + A
Draw your truth table.
LHS RHS Fill in all possible values for all
A B A+B B+A variables.
1 1 1 1 Fill in results for the left-hand-
side (LHS) and the right-hand-
1 0 1 1
side (RHS) of the equation.
0 1 1 1
If your LHS = RHS then the
0 0 0 0
equation is true.
For all the values of A and B, LHS = RHS, therefore A + B = B + A. Now using
different variables, the same calculation will be done: X + Y = Y + X.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 49 of 170
LHS RHS
X Y X+Y Y+X
1 1 1 1
1 0 1 1
0 1 1 1
0 0 0 0
LHS RHS
x x x.x x
1 1 1 1
0 0 0 0
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 50 of 170
2.4 Exercises
21. Given that the values of the following binary variables are as follows:
A = 1, B = 0, C = 1, and D = 0.
Calculate:
a. A. B
b. A + B
c. A + C
d. A'
e. D'
f. A. C
g. B + D
22. Draw up the truth table for the exclusive NOR gate. What does this show –
i.e. what can you deduce from this?
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 51 of 170
2.5 Revision questions
1. A fire alarm rings when there is smoke and when the temperature exceeds
50 degrees Celsius. The logical statement to control the alarm would be:
A. ((SMOKE) + (TEMP > 50))
B. (TEMP > 50)
C. (SMOKE)
D. ((SMOKE) . (TEMP > 50))
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 52 of 170
8. Which of the following is correct?
A. 1 AND 1 AND 0 = 0
B. 1 OR 0 AND 1 = 0
C. 1 OR 1 OR 0 = 0
D. 1 AND 0 AND 1 = 1
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 53 of 170
Unit 3 - Converting Boolean Algebra
3.2 Characteristics
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 54 of 170
Variables are represented by letters and logic conditions by symbols.
The logical operators: AND, OR, NOT determine the relationship between
binary variables and are represented by the following symbols:
The AND operation is indicated by a dot (.) or by writing the letters with no
spacing in between: X.Y is the same as XY because both mean X AND
Y.
The OR operation is indicated by the (+) sign: X + Y means X OR Y.
The NOT operation is indicated by a (') next to a variable or by a bar or
vinculum over a variable: X' is the same as because both mean X
NOT.
Variables are grouped together to retain the identity of the gate, and indicate
the intended function by using the grouping symbols shown in Table 3.1.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 55 of 170
3.4 Development of equations from logical diagrams
A A
C B C
B
AB = A+B=
C C
Figure 3.1 – First level logic
The expression AB = C can be read as: if inputs A and B are present at the
same time, there is an output of C. Further, this output exists only for the
duration of time that both inputs are present.
The expression A + B = C can be read as: if any one or both of the inputs
are present, then there is an output of C. Further, this output exists as long
as any one of the inputs is present.
The only time signs of grouping are not necessary is when an AND gate feeds
an OR gate.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 56 of 170
Figure 3.2 – Second level logic
Figure 3.2 makes use of the Boolean algebra grouping symbols discussed in
Table 25.
In diagram A, parenthesis is used to group AB. This then means that when
writing the expression from diagram A, that AB takes priority over C. The
same priority of parenthesis will apply in diagrams B, C, and D.
The output gate of both B and D above is an OR function, thus, the term
overall OR function is applied to these logic diagrams.
Similarly, A and C are overall AND function diagrams.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 57 of 170
Figure 3.3 – Third level logic
Figure 3.3 uses a different priority from Table 3.1. Here parenthesis is used
as well as square brackets.
This means that when writing an expression from diagram B, A + B and D +
E will be grouped first using parenthesis and only then will (A + B) and (D +
E) be grouped using square brackets ([ ]). Therefore, we say that square
brackets take second priority and not first like parenthesis.
The first step in writing the equation results in A + B as the output of gate
one.
The second step results in (A + B) C as the output of gate two.
The third step should be to write the output of gate three which is D + E.
The fourth step results in combining the inputs to AND gate four, to show
one output by making sure each input is separate.
In this case, brackets are required for one input and can also be used on the
other input to show equality and for ease of reading.
The final step is to combine the inputs to AND gate five resulting in the
output using braces for one of the inputs.
Braces can also be used around the single letter F on the output equation to
show equality, but understand they are not required.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 58 of 170
Figure 3.4 – Fourth level logic
In Figure 3.4, another Boolean algebra grouping symbol from Table 3.1 is
added to the expression. Here, curly brackets are used together with
parenthesis and square brackets. When writing an expression from the
above diagram, A + B will be grouped first using parenthesis (1st priority),
then (A + B) C and D + E will be grouped using square brackets (2nd
priority), and lastly [(A + B) C] [D + E] will be grouped using curly brackets
(3rd priority).
For example, 0 ̅ or 0' (zero NOT) is equal to 1, for if it is not 0, the only
other value it can have is one.
Conversely, 1 ̅ or 1' (1 NOT) can only be equal to 0.
It follows, then that if a variable A is not 1, the only other value it can have
is 0.
When the NOT function is applied to a logical connective the connective
assumes the alternate function, for example, + ̅ (OR NOT), becomes AND,
and .̅ (AND NOT) becomes OR.
The vinculum also acts as a grouping sign and is substituted in place of
parentheses, brackets, or braces when a state indicator is on the output of
any given logic symbol.
In some instances, a signal or sign may be negated more than once.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 59 of 170
It may have a double negation or a triple negation, or even more as shown
in Figure 3.5.
If there is an even number of vincula over the variable, it can be reduced
to equal the variable itself.
If there are an odd number of vincula over the variable the value is equal to
the negation of the variable.
Table 26 depicts the truth table of A.
̅ B + C̅ = Z.
Therefore, the equation for this diagram is: A
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 60 of 170
Figure 3.7 – Grouping for state indicators
Remember, that a logic operation that will produce an output when either
input is present, but not when both inputs are present is called an
exclusive OR. See Figure 3.8.
By writing the Boolean equation for the above circuit, the exclusive OR
equation is developed.
The equation, A'B + AB' = C, simply means NOT A AND B, OR A AND NOT B
equals C. In other words, NOT both inputs at the same time.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 61 of 170
3.4.8 Converting logic diagrams to Boolean equations
Upon completion of this activity you should be able to write a Boolean equation
to describe the output of a logic diagram of four levels.
Step-by-Step 1
Start with input signals and develop terms until the output is reached.
X and Y feed gate 1, the output is: XY.
S and T feed gate 2, the output is: ST.
The inputs to OR gate 3 is: XY, ST, giving the output expression: XY + ST.
Step-by-Step 2
Start with the input signals and develop terms until the output is reached.
T and U feed OR gate 1, the output is: T + U, inverted to give ̅̅̅̅̅̅̅̅
T+U
X and Y feed OR gate 4, the output is: X + Y.
Z is inverted, giving us .
The inputs to AND gate 3 is: X + Y and , giving us .
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 62 of 170
3.4.9 Converting Boolean equations to logic diagrams
Table 3.3 contains the rules for converting a Boolean to a logic diagram.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 63 of 170
c. Determine the number of inputs to the OR gate by dividing the
equation at each OR sign that is not enclosed. There are two inputs
in this instance as shown below.
Step 2 a. Perform the simplest operation first: Observe AB + CD, and again
determine the circuit.
b. D and AB + C are the inputs.
c. Draw a two-input AND gate 2 as the supplier to the OR gate as
shown below.
Step 4 Input AB is the last input to be shown. A and B are the inputs to AND
gate 4 as shown below.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 64 of 170
d. Draw the input OR gate 5 as shown below
Step 6 Divide F (G + H) into two inputs and draw AND gate 6 with
Parentheses removed as shown below.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 65 of 170
3.5 Key terms
Logic diagram
State indicator
Boolean equation
3.6 Exercises
1. Write the Boolean equation for each of the following logic diagrams.
A. ________________________
B. ________________________
A B
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 66 of 170
NOTE The level of logic is limited only by the equipment involved, and
some logic diagrams become quite complex. To add to the
complexity of the diagram, there is the inverter, which leads to the
law of NOT.
6. Write the Boolean expression for the output of the following diagram.
7. Write the output Boolean expression for the following logic symbols.
a. b.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 67 of 170
11. Write the output expression for the following logic circuit.
12. What Boolean expression represents the output of this logic diagram?
Label the output of each logic symbol.
14. Write down the output expressions for the logic functions below.
a.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 68 of 170
b.
c.
d.
e.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 69 of 170
3.7 Revision questions
a. (L + M + N) O + P
b. D' + E + F' (G + H)
c. (A + B) (A'CD + E)'
̅ D} ̅̅̅̅̅̅̅̅
d. {(A + B)C G+H
e. [(RS̅ + R
̅ S ) U] [ ( W + X
̅)Y]
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 70 of 170
Unit 4 - Using Boolean Algebra
NOTE In the laws and theorems that follow, x is used to represent any
variable or expression.
Therefore: x + 0 = x
Also means: y + 0 = y
xy + 0 = xy
(x + y) + 0 = (x + y)
This is the first law of Identity and like all the others, can be proved by building
a truth table. The truth table for x + 0 = x is shown in Table 4.1.
The truth table proves when x is zero, the result is zero, and when x is 1, the
result is 1. Table 29 lists all the laws and theorems.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 71 of 170
Table 29 - Boolean laws and theorems
Any variable or
Rule Examples
expression…
Identity …ORed with 0 is equal to
x+0=x
itself
…ANDed with 1 is equal
x.1=x
to itself
…ORed with 1 is equal to
x+1=1
1
…ANDed with 0 is equal
x.0=0
to 0
Involution (x')' = x
Commutative x+y=y+x
x.y=y.x
Associative (x + y) + z = x + (y+ z)
x . (y . z) = (x . y) . z
Distributive x . (y + z) = x . y + x . z
x + y . z = (x + y) . ( x + z)
Absorption x+x.y=x
x . (x + y) = x
NOTE These laws can be used to reduce Boolean equations the simplest
form possible. In the real world, this means reducing cost, because
every logic operator represents a corresponding element of hardware.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 72 of 170
You may find the following grouping of the laws a little easier to remember.
The techniques used to reduce Boolean equations are similar to those used in
ordinary algebra. Here is a suggested general approach:
Look for a variable and its complement in one term and drop the term:
xx’y = 0.y = 0
Look for pairs of terms that are identical, except for one variable.
If one variable is missing, the larger term can be dropped:
abcd + abd
= abd(c + 1)
= abd.1
= abd
x+ x.y
=x. 1+x.y Identity: x . 1 = x
=x. (1 + y) Distributive Law
=x. 1 Identity
=x Identity
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 73 of 170
Further examples using Boolean algebra:
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 74 of 170
4.1.1 Boolean functions
As in arithmetic expressions, brackets may be used to indicate the order of
evaluation of the operations.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 75 of 170
From De Morgan's two laws, you can deduce the following rule:
Step 1 Step 2
Step 3
A B A B
0 0 1 1 0 0 1 1
0 1 1 1 0 1 0 0
1 0 1 1 1 0 0 0
1 1 0 0 1 1 0 0
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 76 of 170
From the above truth tables it can be seen that:
To simplify: split
the long vinculum to give
This may be simplified by the law of the following:
uniqueness to:
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 77 of 170
2. Split the vinculum.
=
This is equal to:
The sign stays the same when
there is an even number of
vincula.
3. =
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 78 of 170
4. use De Morgan's to split the long vinculum
= 0 + BC apply law: 0 + x = x
= BC
Considering each letter and each sign on its own by putting them in
separate columns and applying De Morgan's theorem.
Then writing the simplified expression one letter and one sign at a time.
Figure 4.6 – The NOR gate equals the AND gate with inverted inputs
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 79 of 170
Figure 4.7 – The NAND gate equals the OR gate with inverted inputs
Boolean algebra
De Morgan's theorem
Boolean functions
Vinculum
4.4 Exercises
1. Showing all the steps, reduce the following equations to their lowest form.
a. F = (ab)(cd')(a')
b. F = xzy + xzy' + x'z
c. F = ab'c + ac'(b + a') + a'b'c
d. F = xwy' + z'yxw + wxyz + yx'zw
e. F = AB'C + AB'C' + ABC' + ABC + A
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 80 of 170
4.5 Revision questions
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 81 of 170
Unit 5 - The Karnaugh Map
One of the most powerful theorems within Boolean algebra states that any
Boolean function can be expressed as the sum of products of all the
variables within the system.
For example, A + B can be expressed as the sum of several products, each
of which contains the letters A and B. Similarly, in a three-variable
expression, each product must contain all three variables and in a four-
variable expression each product must contain all four variables.
Remember to arrange them in alphabetical order.
These products are called MINTERMS.
A+B
= A (1) + B (1) [x.1 = x] – anything AND 1 is equal to itself.
= A (B + B') + B (A + A') [x + x' = 1] – anything Ored with its
complement = 1
= AB + AB' + AB + A'B [multiply out and re-sort into alphabetical
order]
= AB + AB' + A'B [drop redundant terms]
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 82 of 170
Because minterms must contain all the letters used, a shorthand notation
has been developed that saves time writing down the letters. This can be
done in two easy steps:
Form a binary word out of the letters by substituting a 0 for any NOTed
letter and a 1 for the rest.
5. Then express the minterm as the decimal equivalent of this binary word
using an 'm' to show that it is a minterm.
AB' ▬► 10 ▬► m2
A'B ▬► 01 ▬► m1
Figure 2.1 shows Venn diagrams for the AND, OR, and NOT logic operators and
the shaded areas in these diagrams can be compared to the marked squares.
The square for x AND y is that square in which both x and y are represented.
The squares for x OR y are all those squares where either x, or y, or both x
and y are represented.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 83 of 170
5.2 Basic shapes of the Karnaugh map
Before we examine the various Karnaugh maps in detail, let us look at their
basic shapes. The shaded sections of the maps show the blocks that represent
the variable indicated.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 84 of 170
Figure 5.5 – The four-variable Karnaugh map
Now that you know what the maps look like, we can look at how to construct
them in more detail.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 85 of 170
NOTE The order of the variable is very important. For the sake of simplicity,
it is easiest to keep the variables in alphabetical order – e.g. defg or
wxy, etc. When drawing the four-variable Karnaugh map, the first
variable is always placed on the left-hand side, the second on the
right-hand side, the third on the top, and the fourth on the bottom of
the map.
This solution can be read directly from the map by grouping m0 and m4, and
by noting the variables represented by the blocks into which both minterms
fall.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 86 of 170
Figure 5.6 – Wrapping and Karnaugh map minterms
8. Always include at least one minterm not grouped before, when forming a
new group.
Now let us look at one-, two-, three-, and four-variable Karnaugh maps in a
little more detail.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 87 of 170
Minterms are: x, x' or binary minterms 0, 1 or decimal minterms m0, m1.
F = A'B + B'A + A'B' [no need for expansion, each product contains A and
B]
= A'B + AB' + A'B' [re-sort into alphabetic order]
= 01 + 10 + 00 [change to binary terms]
= m1 + m2 + m0 [write minterms – binary to decimal]
Group adjacent squares: [i.e. any two squares that share a boundary – this
includes the top and bottom edges and the left and right edges.]
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 88 of 170
NOTE It is possible to use the same square twice because anything ORed
with itself is equal to itself. The law of idempotence says: x + x = x
Read the map to reduce the number of terms by writing down the least
number of terms that are required to label each group unambiguously.
m0 + m1 = A'
m0 + m2 = B'
The simplified expression is then the logical OR of all the terms needed to
identify each group. Therefore: F = A' + B'
This gives the minterms: x'y'z', x'y'z, x'yz, x'yz', xy'z', xy'z, xyz, xyz' OR
Binary minterms: 000, 001, 011, 010, 100, 101, 111, 110 OR
Decimal minterms: m0, m1, m3, m2, m4, m5, m7, m6
Now let us look at how you would use a Karnaugh map to solve a three-
variable Boolean expression.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 89 of 170
1. First draw your Karnaugh map.
As there are three variables, there will be a maximum of eight minterms and
therefore the map will be made up of eight blocks.
6. Group the minterms in adjacent squares and write down the variables that
represent the group/groups formed, and then OR the terms representing each
group.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 90 of 170
We group m5 and m7 because the corresponding squares are adjacent and
differ in only one variable. We group m0 and m2 because they are adjacent if
we 'wrap' the map. Again they differ by only one variable.
We now OR the results of the two sets of minterms together to get the result.
Therefore, the simplified version of the original expression:
The map reduction is possible because as a general rule: Any two minterms
in adjacent squares that are ORed together will remove the different
variable.
We can prove our map reading was accurate by using Boolean algebra.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 91 of 170
Now convert terms to binary and decimal minterms and group terms in
adjacent squares.
Then OR terms representing each of the groups. In this case we have a group
of four squares all represented by C and a group of two squares represented
by A'B. Therefore, our simplified expression is: G = C + A'B. You can use the
same square twice if at least one term in the new group has not been used
before because xyz = xyz + xyz.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 92 of 170
This gives the minterms: w'x'y'z' w'x'y'z w'x'y z w'x'y z'
w'x y'z' w'x y'z w'x y z w'x y z'
w x y'z w x y'z wxyz w x y z'
wx'y'z' w x'y'z w x'y z w x'y z' OR
Decimal minterms: m0, m1, m3, m2 m4, m5, m7, m6, m12, m13, m15, m14,
m8, m9, m11, m10, respectively, OR
Binary minterms: 0000, 0001, 0011, 0010, 0100, 0101, 0111, 0110, 1100,
1101, 1111, 1110, 1000, 1001, 1011, 1010, respectively.
3. Draw your map. There are four variables, so we know there will be a
maximum of 16 minterms and therefore the map will be made up of 16
blocks.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 93 of 170
4. Use the given variables to label the columns and rows.
5. Put either the product terms of the binary or decimal minterms in the
appropriate blocks. Here we will insert the product terms in the appropriate
blocks.
6. Group adjacent blocks and write down the variables that represent the
group/groups formed, then OR the terms representing each group. In this
case, the one group of four is represented by AC. Therefore F = AC.
Therefore F = AC, which is exactly the same as the answer obtained through
reduction using our Karnaugh map!
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 94 of 170
Example 2. Simplify: F = A'B'C' + B'CD' + A'BCD' + AB'C'
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 95 of 170
Finally, m2 and m6 are adjacent if we use m2 a second time, giving the
term A'CD'
5. OR the terms to give the simplified expression:
F = B'C' + B'D' + A'CD'
NOTE Karnaugh maps for more than four variables are difficult to handle
and are not covered in this module.
Karnaugh map
Minterms
Expansion
Binary terms
5.4 Exercises
1. Expand the following expressions so that each product contains all the
variables:
a. A'B + C
b. AB + C'D +AB'C
2. Express the following products in binary and decimal minterms.
a. AB'C
b. AB'CD'
c. ABC'D'E
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 96 of 170
Unit 6 - Decision Tables
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 97 of 170
This would be represented on a decision table as follows:
1 2 3 4 5 6 7 8
C1 IS A CORRECT? Y Y Y Y N N N N
C2 IS B CORRECT? Y Y N N Y Y N N
C3 IS C CORRECT? Y N Y N Y N Y N
A1 GO TO P 20 X
A2 GO TO P 25 X X X
A3 GO TO P 30 X
A4 GO TO P 35 X X
A5 GO TO P 40 X
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 98 of 170
Table 32 - Labelled decision table example
TITLE LEARNER PROGRESSION TABLE
TABLE SIZE 3C, 5A, 8R
Step 1
Gather all information on the problem to be solved by the table.
Step 2
Identify the conditions and actions to be included in the table. The following is
an example of a narrative with the conditions and actions indicated inside the
parentheses.
A man has decided to purchase a radio. The three factors that will influence his
selection of a radio are (C1) whether he can get an acceptable discount, (C2)
whether he can trade in his old radio, and (C3) whether the new radio comes
with a two-year guarantee.
If he can get a discount and trade in his old radio, he is prepared to forego the
guarantee and will (A1) buy the radio and pay cash. If he can get the discount
and a two-year guarantee but no trade allowance, or if he is given the
guarantee but he gets no discount and does not get a trade allowance and a
guarantee, he will (A2) buy the radio and take out a loan to pay for it. In all
other cases, he will (A3) not buy the radio.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 99 of 170
for a male, because if a person is not female that person can only be male. By
the same token, it would be redundant to include a condition for a bank
balance over R8 000 as well as a condition for a bank balance of R8 000 or
less, because if there is an N indicated for the bank balance over R8 000, the
bank balance must be R8 000 or less. You will be heavily penalised if you
include two conditions instead of one with Y/N.
Step 3
In the third step, the condition stubs and action stubs can be listed.
C1 Discount?
C2 Trade?
C3 Guarantee?
Step 4
Determine the number of rules to be included in your table. The number of
rules equals 2 to the power of the number of conditions. A table with three
conditions will have eight rules (23), whereas one with four conditions will have
16 rules (24).
Step 5
Fill in the condition entries. For the first condition, the Y (yes) and N (no)
alternate once. For the second condition, they alternate twice and for the third
condition they alternate four times.
This formula ensures that you have included all possible combinations of
entries. In cases where some of the rules are impossible, you must identify
impossible rules by labelling them and crossing them out.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 100 of 170
Table 34 - Conditions entries
1 2 3 4 5 6 7 8
C1 Discount? Y Y Y Y N N N N
C2 Trade? Y Y N N Y Y N N
C3 Guarantee? Y N Y N Y N Y N
For example, if your table included conditions for a salary greater than R5 000
and a salary greater than R3 000, you would indicate as impossible the rule
that states N for salary greater than R3 000 and Y for salary greater than R5
000, as it is logically impossible for the same individual to earn less than R3
000 and more than R5 000 at the same time.
Step 6
Action entries must be filled in.
Step 7
A title and table size indicator must be added. For the above example, the title
might be Radio Purchase Table and the table size 3C, 3A, 8R (three
conditions, three actions, and eight rules).
6.3 Summary
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 101 of 170
6.4 Determining 'Impossibles' on a decision table
Impossible rules occur either when the specifications call for a restriction or
when the combination of the conditions is not possible. Consider the following
example:
I
1 2 3 4
C1 Salary > Y Y N N
R10 000
C2 Salary > Y N Y N
R3 000
A1 45% tax X
A2 25% tax X
A3 10% tax X
In Table 36, there are two conditions and three actions. If a person earns
under R3 000, 10% tax is payable. If a person earns R3 000 or more, 25% tax
is payable. If a person earns over R10 000, 45% tax is payable. Rule 2 is
logically impossible as a person cannot simultaneously earn an amount that is
greater than R10 000 and less than R3 000.
Using above steps as a guideline read the following narratives and construct a
decision table for each. The correct answers are shown below the question. If
you do not understand the examples, ask your lecturer for assistance.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 102 of 170
Table 37 - Solution for 6.5.1
TITLE Dog types
TABLE SIZE 3C, 4A, 8R, 2I
I I
1 2 3 4 5 6 7 8
C1 Male dog Y Y Y Y N N N N
C2 Dalmatian Y Y N N Y Y N N
C3 Maltese poodle Y N Y N Y N Y N
A1 Free collar X X X
A2 Free bowl X X X
A3 Free leash X X
A4 Free blanket X X
1 2 3 4
C1 Executive Y Y N N
C2 Salary > Y N Y N
R8 000
A1 First Class X
A2 Business Class X
A3 Economy Class X X
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 103 of 170
6.5.3 Example three
If you feel sick on a Monday, go to the doctor to get a doctor's note. If you feel
sick on a Friday, also go to the doctor for a doctor's note. If you feel sick any
other day, stay at home. If you feel sick on a Monday and/or Friday, and any
other day, go to the doctor to be booked off. If you feel good, go to work.
1 2 3 4 5 6 7 8
C1 Sick on Y Y Y Y N N N N
Monday
C2 Sick on Friday Y Y N N Y Y N N
C3 Sick other day Y N Y N Y N Y N
A1 Stay home X
A2 Doctor's note X X X
A3 Booked off X X X
A4 Go to work X
Complete the decision table exercises and take each one to your lecturer to be
marked.
Decision table
Title
Table size
Conditions
Actions
Rules
Impossibles
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 104 of 170
6.7 Exercises
She cannot buy a shirt unless she buys a miniskirt as well. If she buys zero,
one, or two items of clothing she gets one pair of shoes. If she buys three
or four items of clothing she gets two pairs of shoes. In addition, the lady is
not allowed to buy a miniskirt unless she buys a cap.
2. Peter Jones wishes to purchase a boat. There are various options available:
with life jackets
with extra skis
150HP engine instead of 100HP engine
with trailer
The only restriction is that Peter cannot choose the 150HP engine unless he
takes a trailer as well. He may buy the boat at the regular price if he
chooses zero, one, or two of the options. If he chooses three or four
options, he will receive a discount.
3. A movie reviewer wants to set up a table to help in rating movies. The table
is based on four conditions: good acting, good plot, good costumes, and good
photography. A movie can be rated from one to four stars, four being the best.
If the movie is good in all four areas, it is given four stars.
If the movie has good acting and a good plot, it is given three stars.
If the movie has good acting or a good plot, it is given two stars.
If the movie has neither good acting nor a good plot, it is given one
star.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 105 of 170
5. A building society offers benefits depending on age and amount invested.
Age over 60 and balance over R2 000 - interest rate 18%.
Age over 60 and balance R2 000 or less - interest rate 15%.
Anyone else with a balance over R5 000 - interest rate 18%.
Anyone else with a balance R5 000 or less - interest rate 15%.
Anyone else with a balance R2 000 or less - interest rate 5%.
1. James decides to go for a swim in the river. Before he does, he checks the
water temperature and the speed at which the river is flowing.
If the water speed is greater than 3 km/hr, he wears flippers.
If the water temperature is below 10° C, he rubs Vaseline on himself to
keep warm.
When the water speed is above 10 km/hr, he wears a cap.
Otherwise, he swims normally without flippers, cap or Vaseline.
2. A bank wants to set up some simple rules for hiring people as bank tellers.
All people who apply for a job as a bank teller are given a maths aptitude
test.
If a person has previous experience as a bank teller and either a high
school diploma or a test score greater than 80, the person will be hired
as a teller.
If the person has a high school diploma and a test score greater than
80, or if they have previous experience as a teller, the person will be
hired as a trainee.
In all other cases, they will not be hired.
Using the decision table created, determine whether or not Peter, who
achieved a test score of 86, has had previous experience as a computer
programmer, and has a high school diploma, will be hired and, if so,
whether he will be hired as a trainee or as a teller. Write down your
answer.
3. Maureen plans her vacation. Money, time and access to a car will determine
what she does.
She may have four weeks vacation, or two weeks vacation, or no
vacation at all. She may choose only one of the three options.
If she has enough money to go overseas and can take four weeks
vacation, she will go to Paris and London.
If she has four weeks vacation and not enough money to go overseas,
but she has access to a car, she will go to Cape Town.
If she has two weeks vacation and enough money to go overseas, she
will go to London.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 106 of 170
If she has two weeks vacation and not enough money to go overseas,
she will spend time at home.
Otherwise, she will not take a vacation.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 107 of 170
Unit 7 - System Flowcharts
7.1 Introduction
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 108 of 170
Table 40 - System flowchart symbols
Symbol Example and function
Terminator
Magnetic tape
Disk storage
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 109 of 170
Processing
Flowline
Document
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 110 of 170
Punched card
Manual operation
External storage
Manual input
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 111 of 170
Sort
Merge
Connector
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 112 of 170
7.3 System flowchart tips
The systems analyst will ask the programmer to write the program for the
contents of the process symbol.
Files can be represented on disk or magnetic tape.
No tape-to-tape, disk-to-disk, disk-to-tape, or disk/tape-to-document is
allowed. There must always be a process between storage media.
A document is the product of a process. It cannot be produced directly from
a storage medium.
Anything input at the keyboard, using the manual input symbol, is entered
into a program.
A double-sided arrow is used to show that a disk is updated. When a tape is
updated, the old tape and the new tape must be shown.
When sorting the contents of a file, it is permissible to use the SORT symbol
or a SORT program. The same is true for the MERGE symbol.
When making a backup or copy of a file on disk, input the file into a backup
or copy program and output a new file on disk (called Backup file or Copy
file).
The PROCESSING symbol is the most important, as without it the flow of
the diagram will be missing and will not make any sense. All actions or
steps take place here. If the processing symbol is left out any decisions
made will not be followed by an action. This is incorrect.
The following questions are based on the system flowchart in Figure 7.1.
Answer the questions in the space provided and check your answers with a
lecturer.
The flow for the system flowchart in Figure 7.1 begins at the top with the
source document symbol. It shows that the Standard 10 marks are
keypunched onto cards that are input to Program 1, which is a sort program.
Answer the questions that follow.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 113 of 170
Figure 7.1 – System flowchart for exercise 1
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 114 of 170
7.4.2 Activity Instructions
The following questions refer to the System flowchart in Figure 7.2.
Answer the questions that follow and check your answers with a
lecturer.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 115 of 170
d. Program 1 sorts the transactions by ID number. On what medium is the
output of the sort operation recorded and what is the name assigned to
the file?
e. How many files are used as input to Program 2? What are their names?
f. The NEW MASTER TAPE is output from Program 2. What type of storage
medium contains this file?
g. The flowchart shows that a copy of the NEW MASTER TAPE is stored
externally. Why is a copy stored?
h. How many documents does Program 3 produce and what are their
names?
System flowchart
Processing
Flow line
External storage
Manual input
Sort
Merge
7.6 Exercises
2. Continue with the system flowchart which was drawn in the previous
question.
The time cards serve as input to Program 1 which sorts the data and produces
a sorted time card data tape file. Draw a process symbol with the label
PROGRAM 1 SORT BY EMPLOYEE NUMBER.
Below the process symbol, draw a tape symbol and label it SORTED TIME
CARD TAPE.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 116 of 170
The SORTED TIME CARD TAPE serves as input to the next processing step,
which validates each employee's time data and produces two output files.
Draw a process symbol with the label PROGRAM 2 VALIDATE TRANSACTIONS
below the tape symbol. Below the process symbol, draw a tape symbol labelled
VALIDATED TIME CARD FILE. To the right of the process symbol, draw a tape
symbol labelled FILE and an external storage symbol from this.
3. Continue with the system flowchart which was drawn in the previous
question.
The master payroll tape is updated using the old master and validated time
card tapes as input. Draw a process symbol labelled PROGRAM 3 UPDATE
MASTER.
Draw an arrow from the process symbol pointing to a tape symbol labelled
NEW EMPLOYEE MASTER.
Draw a tape symbol with an arrow pointing to the above process symbol. Label
the tape OLD EMPLOYEE MASTER.
Show that the NEW EMPLOYEE MASTER will become the OLD EMPLOYEE
MASTER on the next run by drawing a dashed flow line between the two tape
symbols.
Draw a flow line from PROGRAM 3 to a tape symbol and label it REPORT TAPE.
The REPORT TAPE is used as input to PROGRAM 4 REPORT WRITER.
PROGRAM 4 prints a report labelled REPORT.
The system begins with source documents called INVOICES, which are
keypunched onto cards, resulting in an INVOICE DECK.
The INVOICE DECK is manually checked and any incorrect cards are
keypunched again and rechecked.
Once the cards in the INVOICE DECK are all correct, the INVOICE DECK is
sorted and placed on a magnetic disk called SORTED INVOICE FILE.
The SORTED INVOICE FILE is used as input to three programs. PROGRAM 1
produces a report called REPORT 1.
PROGRAM 2 produces a magnetic tape called TABLE TAPE, which is used to
produce REPORT 2.
PROGRAM 3 uses a magnetic tape OLD MASTER as additional input.
PROGRAM 3 produces a magnetic tape called NEW MASTER.
NEW MASTER is input to PROGRAM 4. The date is entered at the keyboard and
REPORT 3 is produced.
5. A monthly tape file TAPE 1 is sorted onto disk for input to PROG 1. PROG 1
reads the monthly file and uses it to update DISK 2. DISK 2 is then read by
PROG 2, which updates DISK 3. TAPE 2 is then also created. TAPE 2 will be
used as input to the 'System' the next month.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 117 of 170
6. Three files (on disk) are sorted onto one disk file for input to PROG 1. PROG
1 also reads in a TRANSACTION file (tape). PROG 1 uses these 2 files to create
a DEBTORS file (disk) and a CREDITORS file (disk). A JOURNAL, showing
balances, is also printed. PROG 2 then uses both the DEBTORS and
CREDITORS files as input. Only records with a balance of zero will be written to
tape for storage.
1. The results of the learners at CTI are keypunched onto cards. The cards
form the TRANSACTION deck. A SORT program which sorts the transactions
according to learner number reads this TRANSACTION deck and outputs the
sorted data onto magnetic tape, called the TRANSACTIONS file. A copy of this
file is stored away. A program called PRINT reads these transactions and
produces a report. The same TRANSACTIONS file is read into the UPDATE
program, which also reads LAST YEAR's file, which is on tape. Update creates a
new LEARNER file on disk and this file is printed.
2. Five stores send daily transaction tapes to H.Q. once a day. PROG 1
validates each file's data, and if found incorrect, the incorrect tape/s are
manually corrected and the corrected tape/s are then processed again. When
all the files are correct, they are merged into one tape file for input to PROG 2.
PROG 2 will then update the MASTER STOCK file (on tape) and BOOKKEEPING
file (on tape) after copies of each of these two files are made. These copies are
then stored. PROG 2 also produces an UPDATE ANALYSIS report. The updated
BOOKKEEPING file will be used by PROG 3 to produce credit cheques.
3. Source documents are keypunched onto cards, which are read by PROG 1
and written onto 3 separate disk files – DISK 1, 2 and 3. DISK 2 is used as
input to PROG 2, which prints reports. DISK 3 is sorted onto a disk (DISK 4)
and this is read by PROG 3 which also updates the MASTER file (on tape). DISK
1 is sorted onto tape by PROG 4. This tape and the NEW MASTER are merged
to form a new file on disk, which is stored.
5. A scrap dealer receives a car that he will use to sell second hand car parts.
The details of this car are punched onto cards that are then used to update the
CAR PARTS file on disk. A customer walks in and requests a part. This request
is entered manually via the keyboard into the PARTS program. This program
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 118 of 170
checks the CAR PARTS file to check availability. If a part is available, the part
is issued and the CAR PARTS and DAILY TRANSACTIONS files (both on disk)
are updated. The PARTS program then prints a sales advice slip that is given to
the customer. At the end of the day, the CONSOLIDATE program updates the
ISSUES disk file from the DAILY TRANSACTIONS file.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 119 of 170
Unit 8 - Program Flowcharts
After a problem has been analysed, the program to be used in solving the
problem must be designed. The result of this design process is a program
flowchart. The program flowchart illustrates the logic of the program and gives
details on manipulating the data. It is less costly to determine, arrange and
rearrange complex logic on a flowchart than to correct logic errors in an
implemented program. A program flowchart is vital if the program is to be
maintained easily and efficiently or if modifications are necessary.
Terminator
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 120 of 170
Input/Output
Process
Decision
Connector
Off-page
connector
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 121 of 170
8.3 Variables
A variable name should be short, simple, descriptive, and meaningful and the
same name should be used throughout the program.
A variable name should begin with a letter and should preferably not be longer
than eight characters with no blanks.
Some computer languages are case-sensitive and so the variable name should
be in the same case throughout the program.
Do not use an underscore to join two words. The first letter of the second word
may be capitalised. For example, total units could be represented as totUnits.
Variable names should begin with a small letter. When joining two words, the
first letter of the second word should be capitalised. For example, totStud
could be used to represent total learners. This standard is to be used when
drawing program flowcharts.
8.4 Calculations
classAverage = totalMarks/totLearners
Percentages must be converted to decimal before you can work with them.
For example, if the tax is 10% of the gross salary the calculation would be
worked out as follows:
Input the number of kilometres on a car odometer when the car is filled with
petrol; input the number of kilometres on the odometer when the car was
previously filled, and the number of litres of petrol used to fill the car's tank.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 122 of 170
Calculate the kilometres per litre by subtracting the previous odometer
reading from the current odometer reading and then dividing by the number
of litres used to fill the car.
Print the kilometres per litre.
NOTE The broken-line arrows are not part of the program flow; it is simply
used to add information to the diagram. A program flowchart must
contain a Start symbol, a Stop symbol, and at least one Input
symbol, one Output symbol, and one Process symbol.
Flowchart loops are used when a process may be performed one or more
times. Used, for example, when more than one record from a file is to be
processed by the computer program. In this case, the computer will read in the
next record after processing the current record. However, the program must
be able to stop when all the records have been processed. To make this
possible, an end-of-file (EOF) check is used. Every computer input device uses
a special record called an end-of-file, or EOF record.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 123 of 170
This EOF record is the last record in a file and when read by a program, can be
recognised. When using loops in your programs, an EOF check should be used,
unless specific instructions are given, such as, process until the number zero is
input. Use a decision symbol to represent an EOF check.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 124 of 170
NOTE The broken-line arrows are not part of the program flow; it is simply
used to add information to the diagram. Records consisting of a
number of data fields are either read from a file or they may be input
by the user via the keyboard. Read is used to indicate the input that is
from a file, whereas Input is used to indicate that the input is manual
via the keyboard. It is important that the correct input term is used.
The above program reads a record from a file containing the following
fields: name, rate, hours, and deductions.
An EOF check determines whether the record is the last record on the file. If
the EOF condition is true, the program stops. Otherwise, the program will
continue to process the records.
The gross pay is calculated by multiplying the hours by the rate. The net
pay is calculated by subtracting the deductions from the gross pay. A pay-
slip is then printed and the next record on the file is read and processed.
This symbol means the for loop will be processed five times – that is, for count
= 0 to count = 4, increment count by 1 where:
Input 5 numbers from the keyboard and determine, then print, the total value
of the numbers input.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 125 of 170
Figure 8.4 – Example of a for loop using the for symbol
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 126 of 170
8.7 Logical decisions
1. Computers can determine and act on only 'Yes' and 'No' decisions.
2. You must supply every decision the computer is to make and every
resulting action for each decision.
These factors require the programmer to pay a great deal of attention to the
logic of the program.
= Equal
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 127 of 170
8.8.1 Accumulating totals – example 1
Records for employees at an advertising agency are read from a file. Each
record contains the employee name, gross pay and tax. Draw a program
flowchart that will print a payslip for each of the employees. The output values
will be the name, gross pay, tax and net pay. The Director wants to know the
total amount that was paid out to all of the employees. Net pay is the total
that will be accumulated in this example. The variable names used are:
Using the above example, suppose the first record contained the following
data:
The net pay is equal to the gross pay minus tax, which would give us R1 800.
totNetPay has been initialised to zero and will become 1 800 with John Smith's
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 128 of 170
net pay added to it. If the net pay for the next record is 1 200, totNetPay will
become 3 000.
The program will continue adding the net pay for each record to totNetPay.
After all of the records have been processed, totNetPay will be printed.
Draw a program flowchart that will calculate the total votes for each of the
three candidates. A total of all the votes must be printed at the end of file.
Variable names:
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 129 of 170
Figure 8.7 – Example 2
NOTE The broken-line arrows are not part of the program flow; they are
used to add information to the diagram.
When a program executes a loop, each record in a file is processed within the
main loop and final totals are printed at the end of the program. To print a
report, it is necessary to print the headings before entering the loop. Each line
of the report will be printed each time the loop executes and final totals will be
printed at the end.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 130 of 170
8.9.1 Printed output – example 1
NOTE The broken-line arrows are not part of the program flow; they are
used to add information to the diagram.
The printed output for the flowchart in Figure 8.8 would look as follows:
: : : : :
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 131 of 170
Figure 8.10 - Printed output example 2
NOTE The broken-line arrows are not part of the program flow; they are
used to add information to the diagram.
We previously learnt that computers can determine and act only on 'yes' and
'no' conditions, and that the programmer must supply every decision the
computer is to make and every resulting action for each decision. It is
extremely important that the program should be able to recover from incorrect
input from the user. This is done through the use of error messages. If error
checking is not used in a program, the program will crash when unexpected
information is input.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 132 of 170
Figure 8.11 - Error message example
Program flowchart
Terminator
Input/Output
Process
Decision
Flowchart loops
Count
Logical decisions
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 133 of 170
8.12 Exercises
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 134 of 170
Figure 8.12 - Program flowchart exercise 1
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 135 of 170
3. Construct a flowchart for a program that will do the following:
Read an employee's name, rate of pay, and hours worked from an
employee file.
If the employee worked zero hours, read the next employee. If the employee
worked more than zero hours, calculate gross pay as rate times hours and
print out the employee's name and gross pay.
Continue reading employee records until the computer encounters an
end-of-file check.
4. Draw a program flowchart for the following problem. Use your own variable
names. To be accepted as a Flyaway airline employee, an applicant must be
over 21 but under 35 years of age, over 170 cm tall and weigh more than 60
kilograms. Otherwise, the applicant must be rejected. The required input
values are name, age, height and weight.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 136 of 170
8.13 Revision questions
Car 1: Clients may use this car for a maximum of 5 days. If the
client exceeds this limit, a 10% surcharge is added to the
final cost.
Car 3: Because of the popularity of this class, the clients may use it
for a maximum period of 10 days. If the 10 day limit is
exceeded, the client is charged an extra R3 per kilometre.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 137 of 170
3. Draw a program flowchart to produce a learner grading report.
The following input values are read from a file: learner number, learner
name, maximum test score and learner test score.
0 – 44 Fail
45 – 49 Supplementary
50 – 59 3rd class
60 – 69 2nd class
70 – 74 Upper second class
75 – 100 First class
The Gross Profit formula: Sales amount – cost amount. The sales amount,
cost amount and the gross profit fields are each totalled.
Input: employee number, name, hours worked, rate of pay and deductions.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 138 of 170
Output: employee number, name, hours worked, rate of pay, regular
earnings, overtime earnings, deductions and net pay.
Regular pay (hours * rate of pay) is earned on 40 hours or less. Overtime pay
(1.5 * number of hours worked overtime * rate of pay) is earned on hours in
excess of 40.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 139 of 170
Unit 9 - Trace tables
Test data is necessary to draw a trace table. Test values are placed in the
relevant block (column-row intersection). These values are updated
accordingly as we step through the program. Test data must be planned and it
must include extreme values (upper and lower) and special values to test all
parts of the program. While it is not possible to test all values to show the
robustness of a program, all that is required to prove failure, is one test case in
which the program does not work.
NOTE MODULO (the MOD operator) - 'A mod B' gives the answer 'the
whole number remainder when A is divided by B'. For example, 16
mod 3 will give an answer of 1, i.e. 16/3 = 5 remainder 1.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 140 of 170
9.3 Trace table example
A B
8 6
15 3
20 8
12 4
7 2
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 141 of 170
Table 42 - Trace table
Box N K A B A mod B = N = 5? Output
No. 0?
1 0 0
2 8 6
3 1
4 No
7 No
2 15 3
3 2
4 Yes
5 1
6 15 3
7 No
2 20 8
3 3
4 No
7 No
2 12 4
3 4
4 Yes
5 2
6 12 4
7 No
2 7 2
3 5
4 No
7 Yes
8 2
The first column contains the box number; the next four columns contain the
variable names, followed by the control structures and the output.
The trace table keeps track of the results for each input. You will notice that
the variables N and K are incremented depending on the results of the logical
decisions.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 142 of 170
9.4 Key terms
Output
Decision
Count
Trace table
9.5 Exercises
1. Study the example in Figure 9.2 and draw a trace table. The following
values have been input at box 2:
Num
9, 23, 7, 14, 11.
Take your trace table to your lecturer to be marked before you continue with
the rest of this exercise.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 143 of 170
2. Answer the following questions about Figure 9.2 and take them to your
lecturer to be marked.
a. Construct a trace table in order to answer this question. Give the output
with the following as input:
b. The flowchart has one logic error. Identify the box in which it occurs and
give the corrected box.
c. Can box number 6 and box number 7 be interchanged? Explain why?
d. Can box number 4 and box number 6 be interchanged? Explain why?
e. Which box(es) represent the body of the loop?
f. When will the loop stop?
g. What is an infinite loop? Which box when removed will create an infinite
loop?
h. Predict the output and effect if box 1 was placed after box 3.
i. What is meant by initialisation of a variable? Where in the flowchart does
this occur?
j. Alter and redraw the flowchart to incorporate the following:
Any necessary corrections.
Calculate and print the total number of households billed.
Print a warning message for each household that is using more than 400
units.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 144 of 170
Figure 9.3 – Electricity Meter
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 145 of 170
3. Study the flowchart and answer the questions that follow:
a. Construct a trace table using the following data: Pete, John, Anna, ZZZ.
b. The flowchart has one error - identify the box in which it occurs.
c. How would you change the flowchart to correct the error?
d. Does initialisation of a variable occur? If so, in which box does it occur,
what is the name of the variable, and to what value is the variable
initialised?
e. In which box does input occur?
f. In which box does output occur?
g. Should you wish to print the names of all those programmers who do
not have the name 'ZZZ', would you insert the print symbol before or
after box 3?
Each employee record in the employee file holds the employee number,
name, hours worked and the rate of pay. The output for each employee
includes the employee number, name, hours worked, rate of pay and the
gross pay.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 146 of 170
The hours worked and the gross pay for each employee must be
accumulated and these totals printed after the end-of-file condition has
been met.
Construct a trace table for the above exercise using the following data as
input:
The code field in the input record indicates whether the customer's balance is
current, 30 days old, or 60 days old.
Code categories:
Code 1: current account – 3% cash discount.
Code 2: 30 – 60 days overdue – no discount.
Code 3: Over 60 days overdue – 1.5% service charge.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 147 of 170
123 Ian & Co 200.00 200.00 30-60 days
255 Potts Ltd 200.00 1.5% 203.00 Over 60
days
Using the relevant data above as input, construct a trace table to show that
your program flowchart will produce the same output as shown in Table 9.2.
Include an incorrect code in your data to show that an error message is
output.
NOTE The steps in the program flowchart can be numbered in any order.
Where calculations are necessary (such as, determining the balance
due), complete these by using the values in the trace table and
check that the answer is the same as shown in Table 43.
Code categories:
3. Draw a program flowchart to count how many male employees earn above
R1 000 and how many female employees earn below R5 000.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 148 of 170
Output: number of males earning above R1 000.
number of females earning below R5 000.
Print a report showing the department No., salesperson name, sales amount
and commission for each salesperson.
At the end of the report, print the total number of salespersons in each
department and the total sales amount for all salespeople. Processing
continues until an end-of-file indicator is reached. Construct a trace table for
the above example.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 149 of 170
Test Your Knowledge
Truth tables
Show all the steps.
(X + Y) (X + Y') = X
PQ + (P'+ Q') P = P
(x + y)' = x'y'
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 150 of 170
Logic diagrams to and from expressions or equations
NOTE For questions 1 to 8, label each step and use only two inputs per logic
gate.
{[(P + Q)' (S + T) R] U}
A (B + C') (D + E'F)
(A + B) (A'CD + E)
(R + S) (R'LX + Q)'
[D + E + F (G + H)] + J'
(AB)(CD)(E'F)
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 151 of 170
10. Write down the output expression for the logic diagram.
11. Write down the output expression for the logic diagram.
12. Write down the output expression for the logic diagram.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 152 of 170
Boolean algebra
NOTE Show all working. You do NOT need to state the law or theorem used.
F = x + (x' + y)
F = XYX'Z + XZ' + XZ + Y
F = JK + N + KLM + N'
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 153 of 170
De Morgan's theorem
NOTE Show all the steps. Vincula may be used instead of ' for all answers.
You do NOT have to provide the name of the law or theorem used.
F = X + X'Y
F = WY + YZ + W' + Y'
F = W + X + YZ + (WX)'
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 154 of 170
Karnaugh maps
NOTE Show all working. You may choose to show either the algebraic,
binary, or decimal terms in the mapping.
1. Simplify the following equation using a Karnaugh map. Derive your binary
and decimal minterms before plotting the map.
2. Simplify the following equation using a Karnaugh map. Derive your binary
and decimal minterms before plotting the map.
3. Simplify the following equation using a Karnaugh map. Derive your binary
and decimal minterms before plotting the map.
4. Simplify the following equation using a Karnaugh map. Derive your binary
and decimal minterms before plotting the map.
5. Simplify the following equation using a Karnaugh map. Derive your binary
and decimal minterms before plotting the map.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 155 of 170
Decision tables
1. Mary decides to go to the beach. The weather could be sunny or rainy, hot
or cold, clear or cloudy.
Draw a decision table to see what she will wear in all conditions and label
the impossibilities, if any.
a. If the driver is over 21 years old and drives a car valued at over R100
000 then he/she should get a fully comprehensive policy.
b. If the driver has a good record, he/she should take out a third party,
fire and theft policy.
c. If the driver is 21 years old or younger and drives a car valued at over
R100 000, he/she should take out a third party only policy.
d. Anyone else should not be allowed to take out a policy.
3. A credit company needs to determine the credit allowed for its customers,
depending on whether the customer is a company or an individual, where
the customer is based, and whether the customer has a good reference.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 156 of 170
4. An airline company calculates airfares depending on children's ages and
whether they sit on a parent's lap or not.
If a child is four years old or younger, he/she pays 25% of the normal
airfare, unless he/she sits on a parent's lap, in which case there is no
charge. Children older than four may not sit on a parent's lap to save on
airfares.
Children aged between four and sixteen years pay 55% of the normal
airfare. Children sixteen years and older are considered adults and pay the
full fare.
5. At the end of every two months, lecturers at a college prepare and post a
report to each learner's sponsor. Depending on a learner's performance,
the lecturer may also need to telephone the sponsor to discuss the learner,
or to arrange a meeting to do so.
Should only one of the above happen, the lecturer only needs to speak to
the sponsor over the telephone.
Construct a decision table showing the conditions, rules and actions that
determine whether or not the sponsor must be contacted. Show the
impossibilities, if any.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 157 of 170
System flowcharts
At a retail store, source documents from the men's, ladies', and children's
departments are entered via a keyboard into a SALES file (on disk).
The SALES file is then sorted daily onto a disk file called SORTED SALES.
This is used to update the MASTER CUSTOMER file (on disk). A backup of
the MASTER CUSTOMER file is made on disk.
Once a month, the MASTER CUSTOMER file is used to print statements for
the clients. The date is entered via the keyboard.
A monthly report is also produced with the details of customers who have
bought goods during the month and this information is also put onto a tape
file, which is stored.
This disk file is then read by a sort program, which sorts the orders into
alphabetical order by description.
This sorted file is then read by a program called INV that produces two files,
the INVOICE file and the STOCK TRANSACTION file (both on disk).
The INVOICE file together with a BAD DEBTORS file (on disk) is then read into
a program to check if any of the invoices belong to bad debtors. Two reports
are printed – one listing all the invoices belonging to the bad debtors and one
listing all debtors.
The VALIDPAY file is sorted according to customer number onto a disk file
called VALIDFILE2. The VALIDFILE2 is then used to update the CUSTFILE
(on disk) that contains the amount owed by customers.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 158 of 170
Monthly statements are printed from this updated file for the customers
who still owe money.
The Stock department receives documents for stock issued and received. A
keyboard is used to enter the data from these documents into a stock
transaction file (STOCKTRANS) (on disk).
This file is sorted by part number into a sorted transactions disk file
(STOCKTRANS2). This sorted file is read into a program, which creates two
files on disk – one for stock items received (STOCKIN) and one for stock
items issued (STOCKOUT).
The STOCKIN file is used together with the stock master file (STOCK) (on
disk) to create a NEWSTOCK file on disk.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 159 of 170
Program flowcharts
Output: This is to consist of a name and address label for every subscriber
(to post the magazine to) and when the EOF is encountered, the
two totals mentioned above must be printed.
The police computer contains records of stolen cars, which have been
recovered. Each record has a field for the registration number and a flag
field. These details are used as input.
If the flag is an invalid letter (i.e. not an 'A', or 'B') an error message must
be printed.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 160 of 170
A game of dice is played in which the player continues to throw the dice
until the number six is thrown. Count the number of times the player
throws a one. When the player throws a six, print a congratulatory
message, then print the number of ones thrown and exit the program.
The program must allow the user to input a series of numbers. When the
user enters a zero, the program must calculate and print the average value
of these numbers.
Read learner records from a file. Each record contains the learner's name,
address and an examination mark out of 350.
Print the names and percentages with a remark for all the learners
according to the following criteria.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 161 of 170
Trace tables
1. Accumulate numbers:
b. The flowchart has one error - identify the box in which it occurs.
d. Which box would you change for the program to count how many numbers
there are before the number zero is entered, instead of accumulating the total
value of the numbers?
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 162 of 170
2. Count numbers:
b. The flowchart has one error - identify the box in which it occurs.
d. Which box would you change for the program to add the value of the
numbers instead of counting how many numbers there are before the number
0 is entered?
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 163 of 170
3. Largest number:
b. The flowchart has one logical error - identify the box in which it occurs.
e. Which box would you change if you wanted the last number input to be the
only final output?
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 164 of 170
4. Smallest number:
b. The flowchart has one logical error - identify the box in which it occurs.
e. Which box would you change if you wanted to output the last number input
as well?
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 165 of 170
5. Number of learners:
a. Construct a trace table using the following data: John, Piet, Harry, ZZZ.
b. The flowchart has one error - identify the box in which it occurs.
e. Should you wish to print the names of all those learners who do not have
the name 'ZZZ', would you insert the print symbol before or after box 3?
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 166 of 170
Examination Requirements
The examination is three hours long for a total of 160 marks. The breakdown
is as follows.
Please note that the number systems and part of the logic concepts sections
will be tested on the computer and will consist of short questions, such as
multiple choice and fill in the blank.
The practical questions will appear on the computer and the answer must be
written on paper using a blue or black pen. The following will be required for
the examination:
draw one truth table
one logic diagram from an expression or equation, or derive the expression
from the logic diagram
simplify two Boolean algebraic equations
simplify two equations using De Morgan's theorem
draw one Karnaugh Map
one Decision table
one System flowchart
one Program flowchart
one Trace table.
The practical questions asked in the examinations differ from the exercise
questions. The examination will test understanding and application of the
knowledge learned from all the examples and exercises.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 167 of 170
References
http://www.allaboutcircuits.com/vol_4/chpt_7/8.html
http://encyclopedia2.thefreedictionary.com/Boolean+algebra+(logic)
http://www.allaboutcircuits.com/vol_4/chpt_7/9.html
http://www.ams.org/featurecolumn/archive/venn.html
http://www.hci.com.au/hcisite2/toolkit/flowchar.htm
http://www.edrawsoft.com/flow-chart-design.php
http://www.wiley.com/college/busin/icmis/oakman/outline/chap05/slides/sy
mbols.htm
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 168 of 170
Processing and Logic Concepts – Exercise Checklist
Name
Module Start Date
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 169 of 170
Evaluation Form
Very
Poor Fair Good Excellent
poor
The study guide is clear and understandable.
The text material is clear and understandable.
The exercises help you to grasp the module
material.
The projects help you to understand the module
material.
You know what to expect in the exam.
The practical exercises test your knowledge and
ability.
Your lecturer was able to help you.
Please note any errors that you found in the study guide.
Thank you for completing the evaluation form. Please remove this evaluation
form and return it to your lecturer.
MLPL171-01 Processing and Logic Concepts Study Guide | V1.0 Nov 2016 Page 170 of 170
CTI is part of Pearson, the world’s leading learning company. Pearson is the corporate owner, not a registered
provider nor conferrer of qualifications in South Africa. CTI Education Group (Pty) Ltd. is registered with
the Department of Higher Education and Training as a private higher education institution under the
Higher Education Act, 101, of 1997. Registration Certificate number: 2004/HE07/004. www.cti.ac.za.
Page 1 of 1