Boolean Algebra For Digital Systems
Boolean Algebra For Digital Systems
1 2
• Boolean algebra allows only two values—0 and 1. • A truth table describes the relationship between
– Logic 0 can be: false, off, low, no, open switch.
the input and output of a logic circuit.
– Logic 1 can be: true, on, high, yes, closed switch.
• The number of entries corresponds to the
number of inputs.
– A 2-input table would have 22 = 4 entries.
– A 3-input table would have 23 = 8 entries.
3 4
3 4
1 + 1 = 1 not 1 + 1 = 2
5 6
5 6
dce dce
2017 3-3 OR Operation With OR Gates 2017 3-3 OR Operation With OR Gates
• An OR gate is a circuit with two or more inputs, • An OR gate is a circuit with two or more inputs,
whose output is equal to the OR combination whose output is equal to the OR combination
of the inputs. of the inputs.
Truth table/circuit symbol for a two input OR gate. Truth table/circuit symbol for a three input OR gate.
7 8
7 8
9 10
11 12
11 12
A' = A
Another indicator for
inversion is the
prime symbol (').
This circuit always has only a single input, and the out-put
logic level is always opposite to the logic level of this input.
NOT Truth Table
13 14
13 14
The INVERTER inverts (complements) the Typical application of the NOT gate.
input signal at all points on the waveform.
Whenever the input = 0, output = 1, and vice versa. This circuit provides an expression that
is true when the button is not pressed.
15 16
15 16
17 18
19 20
19 20
21 22
21 22
• The best way to analyze a circuit made up of • The first step after listing all input combinations
multiple logic gates is to use a truth table. is to create a column in the truth table for each
– It allows you to analyze one gate or logic intermediate signal (node).
combination at a time.
– It allows you to easily double-check your work.
– When you are done, you have a table of tremendous
benefit in troubleshooting the logic circuit.
23 24
23 24
• The next step is to fill in the values for column v. • The third step is to predict the values at node w
which is the logical product of BC.
25 26
25 26
• The final step is to logically combine columns v • Output logic levels can be determined directly
and w to predict the output x. from a circuit diagram.
– Output of each gate is noted until final output is found.
• Technicians frequently use this method.
27 28
27 28
29 30
29 30
31 32
31 32
33 34
33 34
• The NOR gate is an inverted OR gate. Output waveform of a NOR gate for
– An inversion “bubble” is placed at the output the input waveforms shown here.
of the OR gate, making the Boolean output
expression x = A + B
35 36
35 36
• The NAND gate is an inverted AND gate. Output waveform of a NAND gate for
– An inversion “bubble” is placed at the output the input waveforms shown here.
of the AND gate, making the Boolean output
expression x = AB
37 38
37 38
39 40
39 40
Theorem (2) is also obvious Theorem (6) states that if any variable
by comparison with ordinary is ORed with 1, the is always 1.
multiplication. Check values: 0 + 1 = 1 and 1 + 1 = 1.
41 42
41 42
dce dce
2017
3-10 Boolean Theorems 2017
3-10 Boolean Theorems
Multivariable Theorems Multivariable Theorems
Commutative laws Theorems (14) and (15) do not have counterparts
in ordinary algebra. Each can be proved by
trying all possible cases for x and y.
Analysis table & factoring
Associative laws for Theorem (14)
Distributive law
43 44
43 44
• DeMorgan’s theorems are extremely useful in Equivalent circuits implied by Theorem (16)
simplifying expressions in which a product or
sum of variables is inverted.
Theorem (16) says inverting the OR sum of two variables is the same as
inverting each variable individually, then ANDing the inverted variables.
Theorem (17) says inverting the AND product of two variables is the
same as inverting each variable individually and then ORing them. The alternative symbol
for the NOR function.
45 46
45 46
Equivalent circuits implied by Theorem (17) • NAND or NOR gates can be used to create the
three basic logic expressions.
– OR, AND, and INVERT.
• Provides flexibility—very useful in logic circuit design.
47 48
47 48
How combinations of NANDs or NORs are How combinations of NANDs or NORs are
used to create the three logic functions. used to create the three logic functions.
It is possible, however, to implement any logic expression using NOR gates can be arranged to implement
only NAND gates and no other type of gate, as shown. any of the Boolean operations, as shown.
49 50
49 50
51 52
51 52
53 54
53 54
55 56
55 56
Interpretation of the two NAND gate symbols. Interpretation of the two OR gate symbols.
57 58
57 58
Proper use of alternate gate symbols in the circuit diagram • When a logic signal is in the active state (HIGH or
can make circuit operation much clearer. LOW) it is said to be asserted.
• When a logic signal is in the inactive state (HIGH
Original circuit using or LOW) it is said to be unasserted.
standard NAND
symbols.
A bar over a signal Absence of a bar
Equivalent representation
means asserted
(active) LOW.
RD means asserted
(active) HIGH
RD
where output Z is
active-HIGH.
Equivalent representation
where output Z is
active-LOW.
59 60
59 60
• An output signal can have two active states, • When possible, choose gate symbols so bubble
with an important function in the HIGH state, outputs are connected to bubble input.
and another in the LOW state. – Nonbubble outputs connected to nonbubble inputs.
– It is customary to label such signals so both
active states are apparent.
RD/WR
When this signal is HIGH, the read operation (RD) is performed;
when it is LOW, the write operation (WR) is performed.
61 62
61 62
The logic circuit shown activates an • Propagation delay is the time it takes for a system
alarm when output Z goes HIGH. to produce output after it receives an input.
– Speed of a logic circuit is related to propagation delay.
Modify the circuit diagram • Parts to implement logic circuits have a data
so it represents the circuit
operation more effectively.
sheet that states the value of propagation delay.
– Used to assure that the circuit can operate fast enough
for the application.
The NOR gate symbol should be
changed to the alternate symbol with a
nonbubble (active-HIGH) output to
match the nonbubble input of AND
gate 2.
The circuit now has nonbubble outputs
connected to nonbubble inputs of gate 2.
63 64
63 64
65 66
dce dce
2017
A simple logic fn and its Verilog module 2017
A simple logic fn and its Verilog module
The module of a Verilog design unit describes what the design “looks
like” on the inside i.e. what its behaviour and/or structure is
Sensitivity list
67 68
67 68
69 70
69 70
dce dce
2017
Verilog syntax 2017
Four input example
71 72
71 72
73 74
73 74
dce
2017
Hierarchical Verilog Code
75
75