A) Boolean Expressions à Truth
tables
Algorithm:
-
Analyse the boolean expression and decide how many entries will be in the
truth table
-
Fill in all the initial entries
-
Put paranthesis for each level
-
Begin with the innermost expression; evaluate and build its truth table
-
Continue with next innermost expression
-
Done when there is only one value
B) Logic Circuits à Truth tables
Rules:
-
Input to a gate is on its left, output is to its right
-
An output of a gate, is the input to the gate on its right
-
Input values for the circuit are at the left-most
-
Output of the right-most gate(s) is the circuit output for a particular
set of input values
Algorithm:
-
Analyse the logic circuit and decide how many entries will be in the truth
table
-
Fill in all the initial entries
-
Start from left-most gates of the circuit
-
Work from left to right
-
For each gate you encounter build its truth table based on its input
-
Continue with step 4 until you get to the out of the right-most gate of
the circuit
C) Boolean Expressions à Logic
Circuits
-
Start with outer-most Boolean expression and work towards the inner-most
-
Build the corresponding circuit:
-
Draw the gate that correspond to the Boolean operator
-
The output of a gate is the input of the gate on its right (which correspond
to the outer Boolean expressions)
-
The out-most of the Boolean expression is the right-most gate (output)
-
The inner-most Boolean expressions are the left-most gates (inputs)
-
Order and position do not matter but we want to make it easy to read
D) Logic Circuits à Boolean Expressions
-
Solve the circuit from the right-most gate (output) and work back (to the
left)
-
Build the corresponding Boolean expression from the out-most to inner-most
level:
-
The right-most gate (the output) is the outer-most operator of the Boolean
Expression
-
The left-most gates (inputs) are the inner-most operators of the Boolean
expression
-
The inputs of the circuits are the variables of the Boolean expression
-
Write the Boolean operator that correspond to the gate. Put paranthesis
for the inner expression (inputs of the gate)
-
Order and position do not matter but we want to make it easy to read
E) Truth Table à Logic Circuits
and Boolean Expressions
-
For all the inputs in a row whose output is 1:
-
If input P value is 1 then write P
-
If input P value is 0 then write NOT P
-
Connect then all the inputs in the row with AND gates
-
Repeat for all the rows in the truth table
-
Connect the rows with OR gates
Application: How to build a logic circuit which adds two binary digits.