Sunteți pe pagina 1din 9

LOGIC GATES, BOOLEAN FUNCTIONS and

TRUTH TABLES
. Logic gate, Boolean function and truth table are related into one another. Having
one of these in hand, you are able to obtain the other two. In this part of module, we will
learn how to create truth tables, obtain Boolean functions and draw logic circuits. Literals W,
X, Y and Z or A, B, C and D will be used for the inputs and Q or F for the output. Other
letters can, of course, also be used.

LOGIC STATE
There are several ways of expressing the logic state of inputs and output of a logic
circuit. See the table below for common terms used. Whatever of these terms is used, for
example TRUE instead of 1, or Low instead of False, the meaning is still the same.

Logic states
True False
1 0
High Low
+Vs 0V
On Off

POSITIVE LOGIC
0 → 0 volt OR 0 → -5 volts
1 → 5 volts 1 → 0 volt
“1” level value of the variable is greater than “0” level value

NEGATIVE LOGIC
0 → 5 volts OR 0 → 0 volt
1 → 0 volt 1 → -5 volts
“1” level value of the variable is less than “0” level value

TYPES OF LOGIC CIRCUITS:


1. Combinational logic circuits
– logic circuits in which outputs depend only on the current inputs. It has no
memory elements. Example: combination of switches will glow some part of lightings.

2. Sequential logic circuits


– logic circuits in which outputs depend on the current input and past outputs.
It has memory elements. Example of this is a counter.
TRUTH TABLE
The truth table is a table showing all the possible combinations of input values and
their outputs in a given logic circuit or Boolean function. It shows how the output of logic
circuit responds with various combinations of inputs. Some use T and F for TRUE and
FALSE respectively, some use 1 and 0, and any other notation listed in the table of logic
states.

BASIC COMBINATIONAL BUILDING BLOCKS (LOGIC GATES)

LOGIC GATE
A logic gate is an electronic circuit which performs logical operation on one or more
inputs and produces one output. It is the elementary building block of a digital circuit.

AND gate
AND gate is a logic circuit which will give a 1 output if all the inputs are 1s. The output
of a two input AND gate can be compared to a lamp controlled by two switches connected
in series. The lamp will glow only if two switches are switched ON at the same time. The
logic symbol of an AND gate with inputs X and Y is shown below. Its corresponding Boolean
function is Q = X • Y or simply Q = XY. We use the symbol dot(•) for AND gate. The truth
table is also shown below.

Logic symbol: Truth Table:


X Y Q
0 0 0
0 1 0
1 0 0
1 1 1

OR gate
OR gate is a logic circuit which will give a 1 output once there is/are 1 input/s. The
output of a two input OR gate can be compared to a lamp controlled by two switches
connected in parallel. The lamp will glow if any or both of the two switches are switched ON.
The logic symbol of an OR gate with inputs X and Y is shown below. Its corresponding
Boolean function is Q = X + Y. We use the symbol plus(+) for AND gate. The truth table is
also shown below.

Logic symbol: Truth Table:


X Y Q
0 0 0
0 1 1
1 0 1
1 1 1
NOT gate
NOT gate is a logic circuit having only one input and one output. The output is always
the complement of the input. It is also called an inverter. The logic symbol of NOT gate with
input X is shown below. Its corresponding Boolean function is Q = 𝑋. The truth table is also
shown below.

Logic symbol: Truth Table:

X Q
0 1
1 0

BUFFER gate
A BUFFER gate is the same as two inverters connected in series so that the output
of the first one will be the input of the other. The logic state of the output of this gate is the
same as the input because of its double inversion. While this may seem like a pointless
thing to do, it does have practical application. A weak signal source may be boosted by
means of two inverters. The logic level is unchanged, but the full capabilities are available to
drive a load resistance if needed. The logic symbol and truth table are shown below.

Logic symbol: Truth table:

X Q
0 0
1 1

NAND gate
NAND gate is a logic circuit which will give a 0 output when all the inputs are HIGH. It
is the same as an AND gate followed by a NOT gate. The logic symbol of a NAND gate with
inputs X and Y is like an AND gate with a bubble as shown below. Its corresponding
Boolean function is Q = 𝑋 • 𝑌 or Q = 𝑋𝑌.

Logic symbol: Truth Table:


X Y Q
0 0 1
0 1 1
1 0 1
1 1 0
NOR gate
NOR gate is a logic circuit which gives a HIGH output when all the inputs are 1s. It is
the same as an OR gate followed by a NOT gate. The logic symbol of a NOR gate with
inputs X and Y is like an OR gate with a bubble as shown below. Its corresponding Boolean
function is Q = 𝑋 + 𝑌

Logic symbol: Truth Table:


X Y Q
0 0 1
0 1 0
1 0 0
1 1 0

XOR gate
The XOR gate is a logic circuit which will give a 1 output if one but not both of its
inputs is 1. It is a circuit that outputs a 1 when the number of 1s at its inputs is odd, and a 0
when the number of incoming 1s is even. The logic symbol and truth table of an XOR gate
with inputs X and Y are shown below. Its corresponding Boolean function is Q = X + Y
which is equivalent to Q = 𝑋 𝑌 + 𝑋 𝑌.

Logic symbol: Truth Table:


X Y Q
0 0 0
0 1 1
1 0 1
1 1 0

XNOR gate
The XNOR gate is a logic circuit wherein the output is the opposite of the XOR gate.
It is like an XOR gate with an inverter represented by a bubble. It is a circuit that outputs a 0
when the number of 1s at its inputs is odd, and a 1 when the number of incoming 1s is
even. The logic symbol of a XNOR gate with inputs X and Y is like a NOR gate with a
bubble as shown below. Its corresponding Boolean function is Q = 𝑋 + 𝑌 which is
equivalent to Q = 𝑋𝑌 + 𝑋 𝑌.

Logic symbol: Truth Table:


X Y Q
0 0 1
0 1 0
1 0 0
1 1 1
De Morgan’s Theorems:
𝐴+𝐵 =𝐴• 𝐵
𝐴𝐵 = 𝐴 + 𝐵

BASIC TWO-LEVEL CIRCUITS


Standard Boolean functions can be expressed either in sum of products form or
product of sums form. These forms when converted to logic circuits will produce two- level
circuits. In sum of products form, the first level(column) of the circuit contains AND gates
and the second level(column) contains an OR gate. In product of sums form, the first level
contains OR gates and the second level contains an AND gate.

SUM OF PRODUCTS
The sum of products form(also called sum of minterms) of expression is a series of
product(AND) terms connected by addition(OR). This form of Boolean function can be easily
obtained from the truth table. For example in the given truth table below, the outputs are 1in
three cases:

A B C F (output) MINTERMS
0 0 0 0 𝐴𝐵𝐶 → m0
0 0 1 1 𝐴𝐵𝐶 → m1
0 1 0 1 𝐴𝐵𝐶 → m2
0 1 1 1 𝐴 𝐵𝐶 → m3
1 0 0 0 𝐴𝐵𝐶 → m4
1 0 1 0 𝐴𝐵𝐶 → m5
1 1 0 0 𝐴𝐵 𝐶 → m6
1 1 1 0 𝐴𝐵𝐶 → m7

From the truth table above, the Boolean expression can be obtained by adding
minterms(product terms from input combination) with outputs equivalent to 1, that is, 𝐹 =
𝐴 𝐵 𝐶 + 𝐴 𝐵 𝐶 + 𝐴 𝐵𝐶 or 𝐹 = 𝑚1 + 𝑚2 + 𝑚3. Its corresponding two-level circuit is shown
below.
PRODUCT OF SUMS

The product of sums form(also called product of maxterms) is a series of sum(OR)


terms connected by multiplication(AND). This form of Boolean function is not as easy to
obtain as is SOP form. For example, using the same truth table, we can say that the output
is 1 if the input combination is not m0, not m4, not m5, not m6 and not m7. Thus,
𝐹 = 𝑚0 • 𝑚4 • 𝑚5 • 𝑚6 • 𝑚7
Or

𝐹 = (𝐴 + 𝐵 + 𝐶) • (𝐴 + B + C) • (𝐴 + B + 𝐶) • (𝐴 + 𝐵 + C) • (𝐴 + 𝐵 + 𝐶)

A B C F (output) MAXTERMS
0 0 0 0 𝐴+𝐵+𝐶
0 0 1 1 𝐴+𝐵+𝐶
0 1 0 1 𝐴+𝐶+𝐶
0 1 1 1 𝐴+𝐵+𝐶
1 0 0 0 𝐴+𝐵+𝐶
1 0 1 0 𝐴+𝐵+𝐶
1 1 0 0 𝐴+𝐵+𝐶
1 1 1 0 𝐴+𝐵+𝐶

The corresponding logic circuit is shown below.


EXERCISES
PART I
Determine the Boolean expression in sum of products form and draw the logic circuit of the
given truth table below.
A B C D F
0 0 0 0 1
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 1
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
PART II
Determine the Boolean expression in product of sums form and draw the logic circuit of the
given truth table below.
A B C D F
0 0 0 0 1
0 0 0 1 1
0 0 1 0 1
0 0 1 1 1
0 1 0 0 1
0 1 0 1 0
0 1 1 0 1
0 1 1 1 0
1 0 0 0 0
1 0 0 1 1
1 0 1 0 0
1 0 1 1 1
1 1 0 0 0
1 1 0 1 0
1 1 1 0 0
1 1 1 1 0
PART III
Provide the truth table and draw the logic circuit of the given Boolean expressions.
1. 𝑄 = 𝐴𝐵𝐶 + 𝐴𝐵𝐶 + 𝐴𝐵𝐶 + 𝐴𝐵 𝐶
2. 𝑄 = 𝑋 𝑌𝑍 + 𝑋𝑌𝑍 + 𝑋𝑌 𝑍

S-ar putea să vă placă și