Lecture 1 - Digital Logic
Lecture 1 - Digital Logic
3
•In 1854, George Boole invented a two-valued algebraic
system, now called Boolean Algebra.
•Using this algebra, one can formulate propositions that are
the other.
4
Boolean Algebra is the mathematics we use
to analyze digital gates and circuits. We can
use these “Laws of Boolean” to both reduce
and simplify a complex Boolean expression in
an attempt to reduce the number of logic
gates required. Boolean Algebra is therefore a
system of mathematics based on logic that
has its own set of rules or laws which are
used to define and reduce Boolean
expressions.
5
The variables used in Boolean Algebra only have one
of two possible values, a logic “0” and a logic “1” but an
expression can have an infinite number of variables all
labelled individually to represent inputs to the
expression, For example, variables A, B, C etc, giving
us a logical expression of A + B = C, but each variable
can ONLY be a 0 or a 1.
They represent ways of using simple circuitry components
to create input / output devices that function exactly as
Boolean algebra operators.
6
Boolean Algebra Operations
The basic operations of Boolean algebra are
as follows:
Conjunction or AND operation
Disjunction or OR operation
Negation or Not operation
7
Operator Symbol Precedence
NOT ‘ (or) ¬ Highest
AND . (or) ∧ Middle
OR + (or) ∨ Lowest
9
For instance;
A simple logic gate takes two inputs (two electrical
connections) and generates one output (one electrical
connection).
Each input will either be on or off, meaning it carries
voltage or does not.
The output will also be either on or off.
A particular gate performs the algebraic function that
corresponds to it's name.
For example, an AND gate will generate a positive
(on / true) output if and only if both of its inputs are
on.
If only one of its input's are on, or neither of them
are, it will generate no output (false / off).
10
Another example is the OR gate, which will generate a
true output if either one, or both of it's input's are on.
Each particular type of logic gate has a predetermined set
11
Gates - Three basic gates (AND, OR, NOT) are
sufficient to build any combinational digital logic
system.
12
AND operator: the relationship between the semantic
and logical operator.
Consider:
If the car is fueled AND the engine works,
then the engine will start
13
We now have two ways of representing an AND gate,
the truth table and the circuit diagram.
However, there is a third way of representing this
information - a symbolic way - that will take us
toward Boolean algebra.
Let us consider our variables, A, B and C to be
algebraic variables, but algebraic variables that can
only take on two values, 0 and 1.
Then we represent the AND function symbolically in
either of two ways.
C = A·B or C = AB
14
Truth Table: The truth table is a table that gives all the
possible values of logical variables and the
combination of the variables. It is possible to convert
the Boolean equation into a truth table.
The number of rows in the truth table should be equal
15
Boolean Algebra Truth Table
Now, if we express the above operations in
a truth table, we get;
A B A∧B A∨B
True True True True
True False False True
False True False True
False False False False
A ¬A
True False
False True
16
A truth table shows how a logic circuit's output
responds to various combinations of the inputs, using
logic 1 for true and logic 0 for false
AND Operator
Truth Table
A B Output
0 0 0
0 1 0
1 0 0
1 1 1
17
Standard symbol for AND gate
A For digital logic:
Output
Inputs
True = 1 is 5 volts
B False = 0 is 0 volts
A
F F is true only when
B
C all the inputs are
D true (1’s)
18
Assume you have an AND gate with two inputs, A and
B. Determine the output for the following cases.
i) A=1, B=0
ii) A=0, B=1
iii) If either input is zero, what is the output?
iv) A = 1, B = 1
19
Another basic operator is the OR
Consider:
If I have cash OR a credit card,
then I can pay the bill
OR works such that the output is true, if either of the
two inputs is true
OR Operator: Truth Table
A B Output
0 0 0
0 1 1
1 0 1
1 1 1
20
Assume you have an OR gate with two inputs, A and B.
Determine the output for the following cases.
i) A = 1, B = 0
ii) A = 0, B = 1
iii) If either input is one, what is the output?
21
Following are the important rules used in Boolean
algebra.
Variable used can have only two values. Binary 1 for
overbar.
OR-ing of the variables is represented by a plus (+)
22
There are six types of Boolean algebra laws. They are:
• Commutative law
• Associative law
• Distributive law
• AND law
• OR law
• Inversion law
Those six laws are explained in detail here.
23
Commutative Law
Any binary operation which satisfies the
A. B = B. A
A + B = B + A
24
Associative Law
It states that the order in which the logic
conditions:
A. ( B + C) = (A. B) + (A. C)
A + (B. C) = (A + B) . ( A + C)
25
AND Law
These laws use the AND operation. Therefore they are
called OR laws.
A +0=A
A+1=1
A+A=A
A+A=A
26
Inversion Law
In Boolean algebra, the inversion law states that double
27
These two De Morgan’s laws are used to change the
expression from one form to another form. Now, let us
discuss these two theorems in detail.
De Morgan’s First Law:
28
A B A’ B’ (A.B)’ A’+B’
0 0 1 1 1 1
0 1 1 0 1 1
1 0 0 1 1 1
1 1 0 0 0 0
29
I beg to stop!
30