Digital Logic Design
NU-BCS
Lecture 3
Boolean Algebra and Logic Gates
• English mathematician George Boole who was the pioneer of
Boolean Algebra.
• In mathematics and mathematical logic, Boolean algebra is the
branch of algebra in which the values of the variables are the
truth values true and false, usually denoted 1 and 0 respectively.
• A Boolean Variable takes the value of either 0 (False) or 1 (True).
• Symbols are used to represent Boolean variables e.g. A, B, C, X, Y,
• There are three basic logic operations AND, OR, NOT
The Boolean Operators are • + ‾
• A + B means A OR B
• A • B means A AND B
• A means NOT A
• Computer is designed on the basic of electronic circuits if
the electronic switch is open (ON) when it is closed (off).
• The circuit use operands AND,OR,NOT.
Boolean Operands
• Boolean operands take the value in binary number used in
the circuit because electronic switches assume only one of
the two states and binary number system suits for this
types of operations.
• These operation represented by logical variables.
Logical Addition
• Logical Addition is done by the help of Logical OR Operator
and symbolically represented by “+”.
Logical Multiplication
• Logical Multiplication is done by logical AND operator
symbolically represented by dot “.” operator.
Complement Or Logical Negation
• Logical Negation applied on a single variable and is called
unary or singular operation.
_
• Symbol are used for logical negation is a bar “ ” over a
variable.
Order Precedence for Boolean Logical
Operator
1. Left to Right
2. Parentheses ( ) evaluate first.
3. NOT
4. AND
5. OR
Truth Table
• The table given for Boolean Operations are called tables of
Combination or Truth Tables.
• Truth table are useful in evaluating the logical expressions.
Boolean Expressions
• The truth table for the Boolean function:
Draw a truth table for A+BC
A B C BC A+BC
0 0 0 0 0
0 0 1 0 0
0 1 0 0 0
0 1 1 1 1
1 0 0 0 1
1 0 1 0 1
1 1 0 0 1
1 1 1 1 1
Draw a truth table for A(B+D)
A B D B+D A(B+D)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
Draw a truth table for (A+B)(A+C)
A B C A+B A+C (A+B)(A+C)
0 0 0 0 0 0
0 0 1 0 1 0
0 1 0 1 0 0
0 1 1 1 1 1
1 0 0 1 1 1
1 0 1 1 1 1
1 1 0 1 1 1
1 1 1 1 1 1
• Draw a truth table for PT(P+Z)
P T Z T PT P+Z PT(P+Z)
0 0 0 1 0 0 0
0 0 1 1 0 1 0
0 1 0 0 0 0 0
0 1 1 0 0 1 0
1 0 0 1 1 1 1
1 0 1 1 1 1 1
1 1 0 0 0 1 0
1 1 1 0 0 1 0
Practice
1. A B C+ A B C+A B C
2. A(B C+ B C)
3. ABC+ABC+ABC
Boolean Identities
Double Complement Law
~(~A) = A
Complement Law
A + ~A = 1 (OR Form)
A · ~A = 0 (AND Form)
Idempotent Law
A + A = A (OR Form)
A·A=A (AND Form)
Identity Law
A+0=A (OR Form)
A·1=A (AND Form)
Boolean Identities
Dominance Law
A+1=1 (OR Form)
A·0=0 (AND Form)
Commutative Law
A+B=B+A (OR Form)
A· B = B · A (AND Form)
Associative Law
A + (B + C) = (A + B) + C (OR Form)
A· (B · C) = (A · B) · C (AND Form)
Boolean Identities
Absorption Law
A· (A + B) = A
A + (A · B) = A
Simplification Law
A · (~A + B) = A · B
A + (~A · B) = A + B
Boolean Identities
Distributive Law
A + (B · C) = (A + B) · (A + C)
A · (B + C) = (A · B) + (A · C)
De-Morgan's Law
~(A · B) = ~A + ~B
~(A+ B) = ~A · ~B
Logic Gates
• Boolean functions are implemented by using logic gates.
The following are the logic gates:
• A gate is an electronic device that produces a result based
on two or more input values.
• In reality, gates consist of one to six transistors, but
digital designers think of them as a single unit.
• Integrated circuits contain collections of gates suited to
a particular purpose.
Logic Gates
• The three simplest gates are the AND, OR, and NOT gates.
Logic Gates
• Another very useful gate is the exclusive OR (XOR) gate.
• The output of the XOR operation is true only when the values of the
inputs differ.
• Note the special symbol for the XOR operation.
Logic Gates
• NAND and NOR are two
very important gates. Their
symbols and truth tables
are shown at the right.
• NAND and NOR are known
as universal gates because
they are inexpensive to
manufacture and any
Boolean function can be
constructed using only
NAND or only NOR gates.
Digital Components
• The main thing to remember is that combinations of gates
implement Boolean functions.
• The circuit below implements the Boolean function:
combinatorial circuit
• complicated Digital circuits can be constructed from three basic circuits,
called gates
• The inverter, or NOT gate, takes an input bit p, and produces as output
¬p.
• OR gate takes two input signals p and q, each a bit, and produces as
output the signal p ∨ q
• AND gate takes two input signals p and q, each a bit, and produces as
output the
signal p ∧ q
• We use combinations of these three basic gates to build more
complicated circuits
(P^ ¬ Q )V ¬r
The circuit for (p ∨ ¬r) ∧ (¬p ∨ (q ∨
¬r))
Find the output of each of these
combinatorial circuits
Practice 2:
Practice 3:
Practice 4:
Draw diagram for
• (p ∧ ¬r) ∨ (¬q ∧ r)
• ((¬p ∨ ¬r) ∧ ¬q) ∨ (¬p ∧ (q ∨ r)
.
E D
N