Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

INTRODUCTION TO

INFORMATION &
COMMUNICATION
TECHNOLOGY

LECTURE 9 : WEEK 9
CSC-111-T
Credit : (2 + 1) / Week
TEXT AND REF. BOOKS
 Text Book:
 Peter Norton (2011), Introduction to Computers, 7 /e,
McGraw-Hill
 Reference Book:
 Gary B (2012), Discovering Computers, 1/e, South
Western
 Deborah (2013), Understanding Computers, 14/e,
Cengage Learning
 June P & Dan O (2014), New Perspective on Computer,
16/e
MOBILE ALERT
Kindly Switch Off your Mobile/Cell Phone

OR

Switch it to Silent Mode Please


Learning Outcome
 Binary Logic, Variables and Gates
 Logical Operations
 Notational Examples
 Truth Tables
 Logic Function Implementation
 Logic Gates, Symbol and Behavior
 Logic Diagram and Expressions
 Boolean Algebra, Operator Precedence
 DeMorgan’s Theorem
Binary Logic and Gates
 Binary variables Take on one of two values.
 Logical operators Operate on binary values and binary
variables.
 Basic logical operators are the logic functions AND, OR and
NOT.
 Logic gates Implement logic functions.
 Boolean Algebra: A useful mathematical system for specifying
and transforming logic functions.
 We study Boolean algebra as a foundation for designing and
Binary Variables
 Recall that the two binary values have different
names:
 True/False
 On/Off
 Yes/No
 1/0
 We use 1 and 0 to denote the two values.
 Variable identifier examples:
 A, B, y, z, or X1 for now
Logical Operations
 The three basic logical operations are:
 AND
 OR
 NOT
 AND is denoted by a dot (·).
 OR is denoted by a plus (+).
 NOT is denoted by an over-bar ( ¯ ), a single quote
mark (') after, or tilde (~) before the variable.
Notation Examples
 Examples:
 Y = A.B is read “Y is equal to A AND B.”
 Z = x + y is read “z is equal to x OR y.”

X=A is read “X is equal to NOT A.”

 Note: The statement:


1 + 1 = 2 (read “one plus one equals two”)
is not the same as
1 + 1 = 1 (read “1 OR 1 equals 1”).
Operator Definitions
 Operations are defined on the values "0" and "1"
for each operator:

AND
 
OR NOT
0·0=0 0 + 0 =0 0=1
0·1=0 0+1=1 1= 0
1·0=0 1+0=1
1·1=1 1+1=1
Truth Tables
 Tabular listing of the values of a function for all possible
combinations of values on its arguments
 Example: Truth tables for the basic logic operations:
AND OR NOT
X Y Z = X·Y X Y Z = X+Y X Z =X
0 0 0 0 0 0 0 1
0 1 0 0 1 1 1 0
1 0 0 1 0 1
1 1 1 1 1 1
Truth Tables – Cont’d
 Used to evaluate any logic function
 Consider F(X, Y, Z) = X Y + Y Z
X Y Z XY Y YZ F=XY+YZ
0 0 0 0 1 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 0 0
1 0 0 0 1 0 0
1 0 1 0 1 1 1
1 1 0 1 0 0 1
1 1 1 1 0 0 1
Logic Function Implementation
 Using Switches Switches in parallel => OR
 Inputs:
 logic 1 is switch closed
 logic 0 is switch open
Switches in series => AND
 Outputs:
 logic 1 is light on
 logic 0 is light off.
Normally-closed switch => NOT
 NOT input: C
 logic 1 is switch open
 logic 0 is switch closed
Basic Logic Gates
 Logic gates perform basic LOGICAL
FUNCTIONS and are the fundamental building
blocks of DIGITAL  INTEGRATED CIRCUITS.
 Most logic gates take an input of TWO binary
values, and output a SINGLE value of a 1 or 0.
Logic Gate “AND”
 The AND gate is an electronic circuit that gives
a high output (1) only if ALL its inputs are high
 A dot (.) is used to show the AND operation i.e.
A.B.  (sometimes omitted i.e. AB)
Logic Gate “OR”
 The OR gate is an electronic circuit that gives a
high output (1) if ONE OR MORE of its inputs
are high.  
 A plus (+) is used to show the OR operation
Logic Gate “NOT”
 The NOT gate is an electronic circuit that produces
an inverted version of the input at its output.  
 It is also known as an inverter. 
Logic Gate Symbols and Behavior
 Logic gates have special symbols:
X X
Z = X ·Y Z= X+ Y X Z= X
Y Y
AND gate OR gate NOT gate or
inverter

 And waveform behavior in time X 0 0 1 1

as follows: Y 0 1 0 1

(AND) X ·Y 0 0 0 1

(OR) X + Y 0 1 1 1

(NOT) X 1 1 0 0
Logic Diagrams and Expressions
Logic Equation
Truth Table
XYZ F = X + Y × Z F = X +Y Z Logic Diagram
X
000 0
001 1
Y F
010 0
011 0 Z
100 1  Boolean equations, truth tables and logic diagrams describe
101 1 the same function
110 1  Truth tables are unique, but expressions and logic diagrams
111 1 are not. This gives flexibility in implementing functions.
Truth Tables – Cont’d
 Used to evaluate any logic function
 Consider F(X, Y, Z) = X Y + Y Z
X Y Z XY Y YZ F=XY+YZ
0 0 0 0 1 0 0
0 0 1 0 1 1 1
0 1 0 0 0 0 0
0 1 1 0 0 0 0
1 0 0 0 1 0 0
1 0 1 0 1 1 1
1 1 0 1 0 0 1
1 1 1 1 0 0 1
Boolean Algebra
 BOOLE is one of the persons in a long historical
chain who were concerned with formalizing and
mechanizing the process of logical thinking
 Boolean algebra is a type of math that deals with
bits instead of numbers
Truth Table : Laws of Boolean
Truth Table : Laws of Boolean
Truth Table : Laws of Boolean
Boolean Algebra
 Invented by George Boole in 1854
 An algebraic structure defined by a set B = {0, 1}, together with two binary operators (+
and ·) and a unary operator ( )

1. X +0=X 2. X .1 =X Identity element


3. X +1 =1 4. X .0 =0
5. X+X =X 6. X .X =X Idempotence
7. X+X =1 8. X .X = 0 Complement
9. X=X Involution
10. X+Y =Y+X 11. XY = YX Commutative
12. (X + Y) + Z = X + (Y + Z) 13. (XY) Z = X(Y Z) Associative
14. X(Y + Z) = XY + XZ 15. X + YZ = (X + Y) (X + Z) Distributive
16. X + Y =X .Y 17. X .Y = X + Y DeMorgan ’s
Boolean Algebraic Proof – Example 1
 A+A·B =A (Absorption Theorem)
Proof Steps Justification
A+A·B
= A · 1 + A · B Identity element: A · 1 = A
= A · ( 1 + B)Distributive
=A·1 1+B=1
=A Identity element

 Our primary reason for doing proofs is to learn:


 Careful and efficient use of the identities and theorems of Boolean algebra, and
 How to choose the appropriate identity or theorem to apply to make forward progress, for
simple solutions irrespective of the application.
Boolean Algebraic Proof – Example 2
 AB + AC + BC = AB + AC
Proof Steps Justification
= AB + AC + BC
= AB + AC + 1 · BC Identity element
= AB + AC + (A + A) · BC Complement
= AB + AC + ABC + ABC Distributive
= AB + ABC + AC + ACB Commutative
= AB · 1 + ABC + AC · 1 + ACB Identity element
= AB (1+C) + AC (1 + B) Distributive
= AB . 1 + AC . 1 1+X = 1
= AB + ACIdentity element
Truth Table to Verify DeMorgan’s
X+Y=X·Y X·Y=X+Y
Applications of De-Morgan’s Theorems

30
END OF LECTURE

Any Questions !!!

You might also like