NOT AND OR XOR NAND NOR

advertisement
NOT
AND
OR
XOR
NAND
NOR
 Expression
1: It is raining today
 Expression 2: Today is my birthday
X
Meaning
True
It is raining today
False
It is not raining
Binary representation of the above:
X
Meaning
1
It is raining today
0
It is not raining

Truth Tables: A table that shows the results of
applying the logical function to all possible
combinations of inputs.
X
Y
Q
0
0
0
0
1
1
1
0
1
1
1
1
Boolean equation: An equation that expresses a
Boolean output Q in terms of Boolean inputs X, Y,
Z etc. To which one or more Boolean functions
such as OR, AND, and NOT are applied.
For example X+Y=Q

=0
Supply
Lamp
Supply
Lamp
=1
 OR
Function
X
Supply
Lamp
Q
Y
Truth Table
X
Y
Q
0
0
0
0
1
1
1
0
1
1
1
1
 OR
Function
X
Supply
Lamp
Q
Y
Black-box Diagram
X
Y
OR
Q
 AND
Function
Supply
Lamp
X
Q
Y
Black-box Diagram
X
AND
Q
 AND
Function
Supply
Lamp
X
Y
Truth Table
X
Y
Q
0
0
0
0
1
0
1
0
0
1
1
1
Q
 NOT
Function
Truth Table
X
Q
0
1
1
0
Q= NOT X or Q = X
X
Y
Q
0
0
0
0
1
0
1
0
0
1
1
1
 NOT
Function
Black-Box Diagram
X
NOT
Q
 Combination
of AND and OR
Y
Supply
X
Q
Z
Boolean equation from the above arrangements:
Q=(X AND Y) OR (X AND Z)
Q=X.Y + X.Z
Q= x.(Y+Z)
Lamp
1.
2.
Draw the truth tables for the AND, OR and NOT functions
What logic function is performed by the switch arrangement
shown below?
Supply
X
Lamp
Q
Y
3.
Draw a switch arrangement for the AND function
4.
Draw the switch arrangement for output Q where Q=X.Y + X.Z
 Logic
Gate is an electronic circuit that
performs the Boolean function.
 Symbols used:
Q=A.B
Q=A
A
B
Q
A
AND Gate
A
B
Q
OR Gate
Q=A+B
Q
NOT Gate
A
B
Q
NOR Gate
Q=A+B
A
B
Q
NAND Gate
Q=A.B
E
A
B
Q
F
C
D
Q=(A.B)+(C.D)
Q=E+F
E
A
B
Q
F
C
D
Suppose we require an output Q from three inputs A, B, C
such that
Q= 0 when A is present (1) and B is present (1)
OR
When B is not present (0) but C is present (1)
Q= A.B + B.C
A.B+ B. C=Q
A.B
A
B
Q
B
C
Q= A.B+B.C
B .C
A
Q=A
B




B
Also known as EX-OR or XOR function
Differs slightly from the normal OR function, often called
the inclusive OR function
The inclusive OR function gives an output of 1 if any input
is 1
The exclusive OR function gives an output of 1 if only one
of the inputs is 1 and not if both inputs are 1
Input A
Input B
Output
Input A
Input B
Output
0
0
0
0
0
0
0
1
1
0
1
1
1
0
1
1
0
1
1
0
XOR Function
1
1
1
OR Function
1



A gate which performs the XOR function is called an
exclusive OR, EX-OR or XOR gate
The XOR gate is sometimes known as a non-equivalence
gate as its output is 1 if the inputs are not equivalent
Boolean algebra representation of the exclusive OR
function is:
Q = A.B + A.B
Condition: A=1, B=0 A.B i.e. A AND [NOT B]
Condition: A=0, B=1 A.B i.e. [NOT A] AND B therefore Q=1
A
B
A.B
Indicates inverted output

Boolean function, which is simply a combination of the
AND and NOT functions
NOT AND abbreviated to NAND A.B

NAND function: logic circuit

A.B
A
B
A.B
Input A Input B Output

Truth Table
0
0
1
0
1
1
1
0
1
1
1
0
A
B
A+B
Indicates inverted output


NOT OR function
NOR function: logic circuit
A+B
A
A+B
B

Truth Table
Input A
Input B
Output
0
0
1
0
1
0
1
0
0
1
1
0
1.
2.
3.
Draw truth tables for the NAND, NOR and
XOR logic gates
Draw the circuit symbols for the AND, OR,
NOT, NAND NOR and XOR logic gates
EXPRESS q IN TERMS OF Boolean variables
A, B and C for the arrangements of logic
gates below:
A
B
C
Q
1.
2.
Construct a logic circuit using only NAND
gates for the Boolean expression (A.B).(B.A)
Construct logic circuits, using only NOR
gates, for the Boolean expression
(A+B)+(A+B)
 Enable
Boolean expressions to be converted to
forms requiring only the OR and NOT functions
or only the AND and NOT functions
 This
means any Boolean expression may be
implemented using only OR gates and NOT
gates [NOR gates] or using only AND gates and
NOT gates [NAND gates]
 NAND
and NOR gates may be used as NOT gates
by connecting all the gate inputs together
 Therefore,
NOR gates alone or NAND gates
alone can implement any Boolean function
 The
fabrication on a single chip of many NOR
gates or many NAND gates is possible with
integrated circuit technology
 In
general, De Morgan’s Laws may be written as
follows:
A1 + A2 + A3 +…..+ An = A1.A2.A3. … .An
A1.A2.A3. … .An = A1+A2+A3+ … +An

In simplest form : A + B = A.B
A.B = A + B
The laws are easily remembered as everything
associated with an expression must be
changed:
•
•
•
The logical connectives must be changed: AND
to OR and OR to AND
The logical state of each variable must be
changed: A to A, A to A
The logical state of the complete expression
must be changed: expression to expression,
expression to expression
1.
Show that A.B+A.B = (A+B).(A+B), where A and
B are Boolean variables
2.
Show that (A+B).(A+B) = (A+B).(A+B) by using
A.A = B.B = 0
3.
Simplify 1.B where B is a Boolean variable and
1 is a Boolean constant
4.
Show that (A.A.B).(B.A.B) = A.B + B.A
5.
Output Q = A.(C+D)+B.(C+D) where A, B, C and
D are Boolean inputs. Show how it is possible
to use just four NAND gates to produce output
Q from A, B, C and D. One of the NAND gates is
used as a NOT gate
In this topic we have covered:
• Boolean variables may have two discrete
possible values, e.g. true or false, 1 or 0
• A truth table shows the result of applying a
logical function to all possible input
combinations
• OR function (+): output is true if either or both
inputs are true
• AND function (.): the output is true if all inputs
are true
• NOT function (
): the output is the inversion of
the input
• XOR function( ): the output is true if either
input is true but not if both are true
In this topic we have covered:
• NAND function (NOT AND): the output is true if
any input is false
• NOR function (NOT OR): the output is true only
when all inputs are false
• Logic gates perform Boolean functions such as
AND, OR and NOT
• Output Q is expressed in terms of Boolean inputs
X, Y, Z etc. and Boolean functions
• De Morgan’s Laws: A+B = A.B and A.B=A+B
• To simplify a logical expression use a truth table
to write down input combinations that make the
output 1 then use De Morgan’s Law to produce a
solution in NAND or NOR
In this topic we have covered:
• The logic gate symbols:
Download