Open Course
O1.2 GE EXP6
Combinatorial logic
I. Introduction
Logic has always had an important place in science and philosophy from
antiquity (Aristotle) to today's applications of artificial intelligence.
The field of logic circuits deals with the resolution of logic problems
(automatisms in particular) in the form of operations carried out by various
judiciously organised operators.
The operative part is the assembly that carries out the physical operations
(sensors, actuators) while the control part is the assembly that carries out the
calculation operations.
The operations are very numerous, especially in computers which are in fact
complex logic circuits.
Combinatorial logic, which is only a sub-part of logic in general, is used when
you need a system that produces an output result based solely on the state of its
inputs.
This implies that a defined state of its inputs can provide only one value of the
output result.
Example of the use of combinatorial logic circuits: toggles 2 switches :
A lamp must be switched on or off with 2 switches A and B. When one of the
two switches is pressed, the status of the lamp is changed.
The following operating table can be derived from this:
1 / 11
Switch A Switch B Lamp status
Open Open Off
Open Closed Lighted
Closed Open Lighted
Closed Closed Off
II. Boolean Algebra
Georges Boole (1815-1864) was an English mathematician from the Algebraic
school of Cambridge. He tried to represent logical reasoning in an algebraic form.
To do this he had to build a particular symbolism and set out basic rules for
manipulating logical expressions.
Boolean algebra will have many applications in electronics and computer
science, notably thanks to Claude Shannon nearly a century later.
Therefore, logical reasoning can be represented in the form of algebraic
operations. The next step is to create operators corresponding to these operations
and to transform a reasoning into an organized set of operators.
This discourse has great difficulty being accepted by philosophers at the level
of human reasoning, but it applies to automatisms in general regardless of their
complexity.
The definition of Boolean algebra is given below:
Boolean algebra is an algebra on a set E with the following properties:
Set E contains 2 elements
2 basic internal operations are set to E :
● An operation noted "+" and called OR
● An operation noted "●" and called ET
● ∀ A , B ∈ E ⇒ A+ B ∈ E , A • B ∈ E
2 / 11
There is on E an equivalence relation noted "=" which has the 3 following
properties:
● Reflexivity: ∀ A ∈ E then A=A
● Symmetry: ∀ A , B ∈ E then A=B ⇒ B=A
● Transitivity: ∀ A , B , C ∈ E then A=B and B=C ⇒ A=C
Although Boolean algebra is defined on a set that can have more than 2
elements in practice one will always work with 2 elements: they are generally
called 0 and 1, up and down, true and false, black and white.
The symbols 0 and 1 are the symbols used when working in base 2. These are
called "binary" elements (BIT for Binary digIT).
The basic axioms * of Boolean algebra are given below:
* Proposal considered obvious, admitted without demonstration
3 / 11
The commutativity:
The AND and OR operations are switchable :
A+ B=B+ A and A−B=B− A
Associativity:
AND and OR operations are associative:
( A+ B)+C=A +(B+C ) and ( A−B)−C=A−(B−C)
Distributivity:
The AND and OR operations are distributive in relation to each other.
A−(B+C)=( A−B)+( A−C ) and A+(B−C)=( A+ B)−( A +C)
The neutral elements:
AND and OR operations each have a neutral element
A+0= A and A−1= A
The complement:
Each element A of E has a complement noted Ā such as A+ Ā=1 and A • Ā=0
We've got 0̄=1 and 1̄=0
Idempotence:
A+ A= A and A−A= A
Absorption:
A+(A . B)= A and A−(a+ b)= A
Inclusion:
A−B+ A−B= A
4 / 11
The applications of Boolean algebra are very important. Indeed, if a technology
(electronic, mechanical, fluidic...) allows the fabrication of the basic elements and
operators described in Boolean algebra, then the solution of a logic problem
becomes feasible in this technology.
The TRUE or FALSE state, 1 or 0, can be achieved for example by a mechanical
relay :
We saw in the previous semester that the same function could be realized in
electronics by a transistor:
In electronics, elements 0 and 1 are associated with voltage levels: logic levels.
Logic level 0 = voltage level close to earth
Logic level 1 = voltage level close to the supply voltage
The voltage thresholds defining the level separation may vary.
5 / 11
III. Basic logic operators
Basic operators are used to electrically realize the axioms defined by Boole: AND,
OR, complement. Here are their symbols. On the left the IEC (European IEEE)
standard and on the right the US standard (MIL STD 806B).
IV. The various representations of a logical function
A function X (e.g. switching on a lamp) can have n logic variables. We obtain 2n
combinations. For each of these combinations, the function can take a value of 0
or 1. All of these combinations and the associated value of the function can be
represented in different ways.
The truth table:
6 / 11
The canonical form:
To write the equation of X as a function of the 2 variables, one must mention as
many terms as the number of times the function is 1. When the variable a is 1, we
note a. When the variable a is 0, we note ā . For the truth table above it reads:
The chronogram:
The binary variables and the resulting logic function are represented by a
voltage level as a function of time :
Resource: https://www.youtube.com/watch?v=-6w-MHjwzT0
V. De Morgan's theorem and the NAND and NOR functions
Auguste de Morgan was a British logician mathematician (1806-1871). Here is
his theorem:
The complement of the result of an OR operation between 2 variables is equal to
the result of an AND operation between the complements of the 2 variables :
7 / 11
This theorem that we will not demonstrate is very useful in electronics. Indeed
there are 2 specific operators derived from the basic operators: the NAND and the
NOR.
The NO AND function is equivalent to an AND function followed by a changeover
switch.
The NO OR function is equivalent to an OR function followed by a changeover
switch.
The raison d'être of these 2 operators is technological and historical. The
manufacturing of a NAND or a NOR requires fewer transistors than the
manufacturing of an AND or an OR. At the appearance of the first circuits
containing transistor-based logic operators, the possibilities of integration were
weak so the first available operators were NAND and NOR. This is why in
electronics De Morgan's theorem is used to transform basic AND/OR operations
into NAND/NOR operations.
Here is below the implementation based on NMOS transistors (but the operating
principle is the same) of the NON, NAND and NOR logic gates:
8 / 11
NOT NAND NOR
Example: Performing an OR function with NANDs only
Using the following theorems:
● The involution theorem: NO NO A = A
● De Morgan's theorem
● The idempotence theorem is this: A AND A = A
●
We obtain the equivalence between the 2 functions below:
Important note regarding NAND and NOR operators:
It should never be forgotten that the logical operations NAND and NOR are
not basic operations of Boolean algebra and therefore do NOT have the
properties of the basic AND and OR operators.
Resource: https://www.youtube.com/watch?v=RrynEQ7sG5A
VI. Another useful boolean function: the XOR
The EXCLUSIVE OR or XOR is also very useful in combinatorial logic.
9 / 11
State 1 is obtained by acting on variable a or variable b but not both.
S=a ⊕b
Resource: https://www.youtube.com/watch?v=wGilEPBfcT8
VII. A brief overview of the simplification of logical equations
The relationship between input and output quantities is often in a very
complex algebraic form. It is therefore necessary to simplify it as much as possible
to reduce the number of logic gates to be used.
For this, the table of truth is transposed into Karnaugh's table.
Then, to simplify the equation, it is enough to group the boxes that have the
state 1 of the output variable under the following conditions:
10 / 11
Each grouping gives the logical product of the input variables that have not
changed state. The set of these groupings is a logical sum.
11 / 11