0% found this document useful (0 votes)
21 views

Ch2. Boolean Algbra

Boolean Algebra, developed by George Boole, is a mathematical framework for logic that operates on binary values of True (1) and False (0). It utilizes logical operators such as AND, OR, and NOT to perform operations, which are fundamental in digital computing and logic circuits. The document also covers truth tables, logic gates, and the laws of Boolean algebra that govern the manipulation of logical expressions.

Uploaded by

akashwadhvani15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Ch2. Boolean Algbra

Boolean Algebra, developed by George Boole, is a mathematical framework for logic that operates on binary values of True (1) and False (0). It utilizes logical operators such as AND, OR, and NOT to perform operations, which are fundamental in digital computing and logic circuits. The document also covers truth tables, logic gates, and the laws of Boolean algebra that govern the manipulation of logical expressions.

Uploaded by

akashwadhvani15
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 89

Boolean Algebra

Introduction
• Developed by English Mathematician George
Boole in between 1815 - 1864.
• It is described as an algebra of logic or an
algebra of two values i.e True or False.
• The term logic means a statement having
binary decisions i.e True/Yes or False/No.
Application of Boolean algebra

• It is used to perform the logical operations in digital computer.


• In digital computer True represent by ‘1’ (high voltage) and
False represent by ‘0’ (low voltage)
• Logical operations are performed by logical operators. The
fundamental logical operators are:

1. AND
2. OR
3. NOT (negation/complement)
AND operator
• It performs logical AND operation (like multiplication)
and denoted by (.) dot.

X Y X.Y
0 0 0
0 1 0
1 0 0
1 1 1
OR operator
• It performs logical OR operation (like addition) and
denoted by (+) plus.

X Y X+Y
0 0 0
0 1 1
1 0 1
1 1 1
NOT operator
• It performs logical negation and denoted by (-)
bar. It operates on single variable.

X X (means complement of x)

0 1

1 0
Truth Table
• Truth table is a table that contains all possible values
of logical variables/statements in a Boolean
expression.

No. of possible combinations = 2n, where n=number of


variables used in a Boolean expression.
Truth Table
A truth table lists all possible combinations
of input binary variables and the
corresponding outputs of a logic system.

 The logic system output can be found from


the logic expression, often referred to
as the Boolean expression.

 When the number of input binary variables


is only one, then there are only two
possible inputs, i.e. ‘0’ and ‘1’.
8
Binary literals
 A literal is a binary variable or its complement and
therefore takes only one of two possible values
 Recall from Unit 1 that these two binary values have
different names:
• True/False
• On/Off
• Yes/No
• 1/0
 We use 1 and 0 here to denote these two values

 literal identifier
y
• A, B, y, z, or X1
examples: A
B
Logic
Circui
etc…. G
t
Input Output
literal literal9
Logical Operations on Binary
literals
 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 overbar ( ¯ ), a
single quote mark (') after, or ( or #)
before the literal, e.g. A, ‘A, A,
or #A
10
Definitions of the Basic Logic Operation
Operations are defined on the values "0"
and "1" for each operator:
AND (.) OR (+) NOT (
)
0·0=0 0+0=0
0·1=0 0+1=1 0=1
1·0=0 1+0=1
1·1=1 1+1=1 1=0
Comparison Multiplication Addition and No
with the and AND give OR give corresponding
corresponding identical results different Math operator
Math Operator Results for for NOT
1+1 11
Truth Tables
 Truth table - A tabular listing of the values of a
logic function for all possible combinations of
the values of its argument literals
 Example: Truth tables for the basic
logic operations:
AND OR NOT
X Y Z = X·Y X Y Z = X+Y X Z
0 0 0 0 0 0 X
0 1 0 0 1 1 0 1
1 0 0 1 0 1 1 0
1 1 1 1 1 1 12
Truth Table

 Ifthe number of inputs is two, there


can be four possible input
combinations, i.e. 00, 01, 10 and 11.

 This statement can be generalized to


say that, if a logic circuit has n binary
inputs, its truth table will have 2^n
possible input combinations.

13
Truth Table

14
Truth Table

15
Logic Gates

 Thelogic gate is the most basic building


block of any digital system, including
computers.

 Each one of the basic logic gates is a


piece of hardware or an electronic
circuit that can be used to
implement some basic logic
expression.

16
Logic Gates…

 While laws of Boolean algebra could be


used to do manipulation with binary
variables and simplify logic expressions,
these are actually implemented in a
digital system with the help of electronic
circuits called logic gates.
 The three basic logic gates are the
OR gate, the AND gate and the NOT
gate.

17
Logic Gates – OR Gate
 An OR gate performs an ORing operation
on two or more than two logic variables.

 written as Y = A+B and reads as Y equals A


OR B and not as A plus B.

 An OR gate is a logic circuit with two or more


inputs and one output.

18
Logic Gates – OR Gate

19
Logic Gates – OR Gate

20
Logic Gates – AND Gate
 An AND gate is a logic circuit having two or
more inputs and one output.

 The output of an AND gate is HIGH only when


all of its inputs are in the HIGH state.

 The AND operation on two independent logic


variables A and B is written as Y = A.B and
reads as Y equals A AND B.

21
Logic Gates – AND Gate

22
Logic Gates – AND Gate

23
Practical Implementation of AND and OR
Functions
1. Using Switches
Input/Output Definitions
• Input:
 logic 1 is switch closed
 logic 0 is switch open
• Output:
 logic 1 is lamp on
 logic 0 is lamp off.

24
Logic Gates – NOT Gate
A NOT gate is a one-input, one-output
logic circuit whose output is always the
complement of the input.

 That is, a LOW input produces a HIGH


output, and vice versa.

 It is also known as a ‘complementing


circuit’ or an ‘inverting circuit’.

25
Logic Gates – NOT Gate
.

26
Logic Gate Symbols and Behavior

X X
Z=
5 X· 5 1 X 5
Y Y Z = X+ Z=
AND Y
OR Y NOT gate X
gate gate or
(a) Graphic inverter
symbols

X 0 1 1
0
Timing Y 1 0 1
diagrams 0
(derived from (AND X ·Y 0 0 1
truth tables) ) 0

1 1 1 1
(OR) X + Y
0
(NOT) 1 0 0
X
4
Logic Gates – NAND Gate
 NAND stands for NOT AND.

 An
AND gate followed by a NOT circuit
makes it a NAND gate.

 The
output of a NAND gate is a logic ‘0’
when all its inputs are a logic ‘1’.

Y = A.B

28
Logic Gates – NAND Gate

29
Logic Gates – NOR Gate
 NOR stands for NOT OR.

 AnOR gate followed by a NOT circuit


makes it a NOR gate.

 The output of a NOR gate is a logic ‘1’


when all its inputs are logic ‘0’; For all
other input combinations, the output is a
logic ‘0’.

Y = (A+B). 30
Logic Gates – NOR Gate

31
Logic Gates – EXCLUSIVE-OR Gate

 The EXCLUSIVE-OR gate, commonly


written as EX-OR gate, is a two-input,
one-output gate.
 As can be seen from the truth table, the
output of an EX-OR gate is a logic ‘1’
when the inputs are unlike and a logic
‘0’ when the inputs are like.
 Y = (A⊕B) = (A.B+A.B).

32
Logic Gates – EXCLUSIVE-OR Gate

33
Logic Gates – Exclusive-NOR Gate
 EXCLUSIVE-NOR (commonly written as
EX- NOR) means NOT of EX-OR, i.e.
the logic gate that we get by
complementing the output of an EX-OR
gate.

 The truth table of an EX-NOR gate is


obtained from the truth table of an
EX-OR gate by complementing the
output entries. Logically,
Y = (A⊕B) = (A.B+A.B).
34
Logic Gates – Exclusive-NOR Gate

35
Summary of Digital Logic
Gates

Universality, Rearranging Truth Tables 36


Summary of Digital Logic
Gates

Universality, Rearranging Truth Tables 37


Logic Gates – Universal Gates
 OR, AND & NOT gates are the
three basic logic gates as they
together can be used to construct the
logic circuit for any given Boolean
expression.

 NOR and NAND gates have the property


that they individually can be used to
implement a logic circuit corresponding
to any given Boolean expression.

38
Logic Gates – Universal Gates

 Combination of NAND gates or a


combination of NOR gates can be
used to perform functions of any of
the basic logic gates.

39
Logic Gates – Universal Gates

40
Logic Gates – Universal Gates

41
De Morgan’s Theorems

 De Morgan has suggested theorem


two s
which extremely useful in Boolean
are
Algebra.
1. Theorem 1: A.B=A+B.
( NAND = Bubbled OR)
 The left hand side (LHS) of this
theorem represents a NAND gate with
inputs A and B, whereas the right
hand side (RHS) of the theorem
represents an OR gate with inverted 42
De Morgan’s Theorems

43
De Morgan’s Theorems

2. Theorem 2:
A+B = A.B
NOR = Bubbled AND

 The LHS of this theorem represents a


NOR gate with inputs A and B, whereas
the RHS represents an AND gate with
inverted inputs.

44
De Morgan’s Theorems

45
Boolean
Algebra
 Variable, complement, and literal
are terms used in Boolean algebra.
 A variable is a symbol used to
represent a logical quantity. Any
single variable can have a 1 or a 0
value.
 The complement is the inverse
of a variable and is indicated by
a bar over variable (over bar).
46
Boolean Algebra

 The complement of the variable A is


read as "not A" or "A bar“.
 Sometimes a prime symbol rather
than an over bar is used to
denote the complement of a
variable; for example, B' indicates
the complement of B.

47
Boolean Algebra -
Laws
1. Commutative Law: The
commutative law of addition for
two variables is written as
A+B = B+A.
 This law states that the order in
which the variables are ORed
makes no difference.
 In Boolean algebra as applied to
logic circuits, addition and the OR
operation are the same.
48
Boolean Algebra -
Laws

 Above figure illustrates the


commutative law as applied to
the OR gate and shows that it
doesn't matter to which input each
variable is applied.

49
Boolean Algebra -
Laws
1. Commutative Law: The
commutative law of multiplication
for two variables is
A.B = B.A
 This law states that the order in
which the variables are ANDed
makes no difference.

50
Boolean Algebra -
Laws
2. Associative Law: The associative
law of addition is written as
follows for three variables: A + (B
+ C) = (A + B) + C.
 This law states that when ORing
more than two variables, the result
is the same regardless of the
grouping of the variables.

51
Boolean Algebra -
Laws
2. Associative Law: The associative
law of multiplication is written as
follows for three variables: A.
(B.C) = (A.B).C.
 This law states that it makes
no difference in what order the
variables are grouped when
ANDing more than two variables.

52
Boolean Algebra -
Laws
3. Distributive Law: The distributive
law is written for three variables
as follows: A(B + C) = A.B +
A.C
 This law states that ORing two or more
variables and then ANDing the result
with a single variable is equivalent
to ANDing the single variable with each
of the two or more variables and
then ORing the products.
53
Boolean Algebra -
Laws
3. Distributive Law: The
distributive law also expresses
the process of factoring in which
the common variable A is
factored out of the product
terms, for example, AB + AC =
A(B + C).

54
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

55
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

56
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

57
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

58
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

59
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

60
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

61
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

62
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

63
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

64
Boolean Algebra -
Laws
Rules of Boolean
Algebra: .

65
Boolean Algebra -
Laws
Rules of Boolean Algebra: The
proof is shown in Table below,
which shows the truth table and
the resulting logic circuit
simplification.

66
Boolean Algebra -
Laws
Rules of Boolean
Algebra:.

67
Boolean Algebra -
Laws
A+AB = A+B

A(B+B)+AB
=> AB+AB +AB
=> AB+AB +AB+AB
Þ A(B+B) + B(A+A)
Þ A.1+B.1
Þ A+B

68
Boolean Algebra -
Laws
A+AB = A+B

A + A’ B = A. l + A’ B
= A (l + B) + A’B
=A + AB + A’B
=A + B (A + A’)
=A+B

69
Boolean Algebra -
Laws
Rules of Boolean
Algebra:.

70
Boolean Algebra -
Laws
Rules of Boolean
Algebra:.

71
Boolean Algebra -
Laws
Rules of Boolean
Algebra:.

72
Boolean Algebra -
Simplification
Boolean Expression for the a
logic circuit: .

74
Boolean Algebra -
Simplification
 Boolean Expression for the a
logic circuit: To derive the Boolean
expression for a given logic
circuit, begin at the leftmost
inputs and work toward the final
output, writing the expression for
each gate.
 For the given circuit, the
Boolean expression is determined
as follows:
75
Boolean Algebra -
Simplification
Boolean Expression for the a
logic circuit:
 The expression for the left-most AND
gate with inputs C and D is CD.
 The output of the left-most AND gate

is one of the inputs to the OR


gate and B is the other input.
Therefore, the expression for the
OR gate is B + CD.

76
Boolean Algebra -
Simplification
Boolean Expression for the a
logic circuit:
 The output of the OR gate is one
of the inputs to the right-most AND
gate and A is the other input.
Therefore, the expression for this AND
gate is A(B + CD), which is the final
output expression for the entire circuit.

77
Boolean Algebra -
Simplification
Constructing Truth table for a logic Circuit:-.
 Once the Boolean expression for a given
logic circuit has been determined, a truth
table that shows the output for all possible
values of the input variables can be
developed.

 There are four input variables (A, B, C, and


D) and therefore sixteen (2^4 = 16)
combinations of values are possible.

78
Boolean Algebra -
Simplification
 Constructing Truth table for a logic Circuit:-.
 The first step is to list the sixteen input
variable combinations of 1s and 0s in
a binary sequence as shown in below
table.
 Next, place a 1 in the output column for
each combination of input variables
that was determined in the evaluation.
 Finally, place a 0 in the output column for
all other combinations of input variables.

79
Boolean Algebra -
Simplification
 Constructing Truth table for a logic
Circuit:-.

80
Basic Theorem of Boolean Algebra
T1:
(a) 0 + A = A
(b) 0. A = 0
T2:
(a) 1 + A = 1
(b) 1. A = A
Basic Theorem of Boolean Algebra

T3 : Commutative Law
(a)A + B = B + A
(b)A. B = B. A

T4 : Associate Law
(a) (A + B) + C = A + (B + C)
(b) (A B) .C = A. (B.C)

T5 : Distributive Law
(a) A (B + C) = A B + A C
(b) A + (B C) = (A + B) (A + C)
(c) A+A’B = A+B
Basic Theorem of Boolean Algebra

T6 :
(a) A + A = A
(b) A. A = A

T7 :
(c) A + A B = A
(d) A. (A + B) = A
Basic Theorem of Boolean Algebra

T8 :
(a) X+X’=1
(b) X.X’=0
T9 : n
(a) x’’ = x

T10 : De
Morgan's
Theorem
(a)
(X+Y)’=X’.Y’
(b)
(X.Y)’=X’+Y’
Boolean Algebra

 0·0=0
0 + 0 =0
 0’ = 1

 Duality
 1·1= 1
1 + 1 =1
 1’ = 0

 0+1=1+0=1
 0 · 1 = 1 ·0 = 0

16
Single Variable Theorems
 x · 0 = 0
 x + 1 = 1
 x · 1 = x
 x + 0 = x
 x · x = x
 x + x = x
 x + !x = 1
 x · !x = 0
 x · x · x · … x = x
 !!x = x

Introduction 17
Two Variable Theorems
 x · y = y · x
 x + y = y + x
 Both are
commutative

Introduction 18
De Morgan's Theorem

X 1  X 2  ...  X n   X1 
X 2  ...  X n
 X 1  X 2  ... 
X 1  X 2  ... 
Xn
Xn 

Remember: X Y  X
Y
X  Y X 
Y

2
Possible Logic Operations

OR
NAND
NOR

AND
90

You might also like