Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
35 views

Module 4a Boolean Algebra (Student)

This document discusses Boolean operations and expressions. It defines variables, complements, and literals in Boolean algebra. It also outlines the basic laws of Boolean algebra, including commutative, associative, and distributive laws. An example is given to prove the associative law for multiplication using a truth table. The rules of Boolean algebra can be proven using truth tables.

Uploaded by

Ghana Kumaran
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Module 4a Boolean Algebra (Student)

This document discusses Boolean operations and expressions. It defines variables, complements, and literals in Boolean algebra. It also outlines the basic laws of Boolean algebra, including commutative, associative, and distributive laws. An example is given to prove the associative law for multiplication using a truth table. The rules of Boolean algebra can be proven using truth tables.

Uploaded by

Ghana Kumaran
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

10/4/12

Boolean Operations & Expressions

•  Variable (Pembolehubah)
–  A symbol that represents a logical quantity
–  Usually italic uppercase (A, B, C, D)
–  A single variable can have a 1 or 0 value

•  Complement (Pelengkap)
–  The inverse of a variable
–  Indicated by an overbar (Ā) or prime (A’)
–  If A = 1 , then Ā = 0

•  Literal
= both variable and its complement in a term.
–  Ā + B + C è 3 literals
1
FACULTY OF COMPUTER SCIENCE & INFORMATION SYSTEM Resource: Nota Dr. Siti Hajar, SCK1023 (07/08-I) 2

Laws & Rules of Boolean Algebra

Example: •  Basic laws of BA


–  Commutative Laws (Hukum Tukar Tertib)
• For addition and multiplication

–  Associative Laws (Hukum Sekutuan)


• For addition and multiplication

–  Distributive Laws (Hukum Taburan)

3 Resource: Nota Dr. Siti Hajar, SCK1023 (07/08-I) 4

Commutative Laws Associative Laws


•  A + (B + C) = (A + B) + C
•  A + B = B + A A A
A+B
A + (B + C)
A B B
A+B B+A B
B A (A + B) + C
B+C
C C
Commutative law of addition
Associative law of addition

•  AB = BA •  A(BC) = (AB)C
A A
A B A(BC)
AB BA B
B A
B
Commutative law of multiplication (AB)C
BC
C C

Associative law of multiplication 6


Resource: Nota Dr. Siti Hajar, SCK1023 (07/08-I) 5 Resource: Nota Dr. Siti Hajar, SCK1023 (07/08-I) 6

2012/2013-I @m 1
10/4/12

Ex
tr
Distributive Laws a

Exercise 4a.1:
•  A(B + C) = AB + AC
Prove the Associate Law for A(BC) = (AB)C using truth table.
B A
B+C A B C AB BC A(BC) (AB)C
C B 0 0 0

AB + AC 0 0 1
A(B + C) 0 1 0
A
A
0 1 1
C
1 0 0
1 0 1
1 1 0
1 1 1
7 8
Resource: Nota Dr. Siti Hajar, SCK1023 (07/08-I) 7

Rules of Boolean Algebra Rules of Boolean Algebra: PROOF

1 A+0=A
The rules can be proven by using
1 truth table. 2 A+1=1
3 A 0=0 Rule 1:
4 A 1=A A= 1 A= 0
5 A+A=A X=1 X=0
0 0
6 A+A=1
X=A+0=A
7 A A=A
The rules can be proven by using
2 Boolean algebra laws and rules. 8 A A=0 Rule 2:
9 A=A A= 1 A= 0
X=1 X=1
10 A
A ++AB
AB==A A 1 1
11 A + AB = A + B
X=A+1=1
12 (A + B)(A + C) = A + BC continue...
9 10

Rule 3:
A= 1 A= 0
X=0 X=0
0 0

X=A 0=0
Rule 4:
A= 0 A= 1
X=0 X=1
1 1

X=A 1=A

Rule 5:
A= 0 A= 1
X=0 X=1
A= 0 A= 1

X=A+A=A continue...
11 continue...
12
11 12

2012/2013-I @m 2
10/4/12

Rules 10, 11, and 12 can be proven by


using Boolean algebra laws.

continue...
13 continue...
14
13 14

DeMorgan’s Theorems

•  To minimize the variety and number of logic gates IC.


•  Provides mathematical verification for:
–  NAND ≡ negative-OR
–  NOR ≡ negative-AND

X X
XY X+Y
Y Y
NAND Negative-OR

X X
X+Y XY
Y Y

NOR Negative-AND
15 16
15 16

DeMorgan’s Theorems Application

DeMorgan's Theorems I
•  DM theorem 1:
–  The complement of a product of variables is XYZ = X + Y + Z
equal to the sum of the complements of the
variables
WXYZ = W + X + Y + Z
XY = X + Y
•  DM theorem 2: DeMorgan's Theorem II
–  The complement of a sum of variables is
equal to the product of the complements of X + Y + Z = XYZ
the variables
W + X + Y + Z = WXYZ
X + Y = XY 17
17 18

2012/2013-I @m 3
10/4/12

Ex
tr
a

Example of applying DeMorgan’s Theorems. Self-Test:

(AB +C)(A + BC) = (AB + C) + (A + BC) Prove that AB is equal or not equal with AB by using the truth table.

(AB + C) + (A + BC) = (AB)C + A(BC)


(Theorem II)

(AB)C + A(BC) = (A + B)C + A(B + C)


(Theorem I)

(Theorem I) (Theorem II)

XY = X + Y X + Y = XY
19 20

Ex
tr
a

Exercise 4a.2:

Resource: Floyd, Digital Fundamentals, 10th Edition, 2009. 21 22

Example: (BC + D)
AND

OR

NOT
AND

Logic circuit

23 24

2012/2013-I @m 4
10/4/12

Ex
tr
a Logic circuit to Boolean expression
•  To derive the Boolean expression for a given circuit,
follow left-2-right rule.
Exercise 4a.3: –  Begin from the left-most inputs and work towards the
Draw the logic circuit represented by each expression: last.
(i)  AB. + AB
(ii)  AB
. + AB + ABC 1
4
(iii)  AB(C
. + D) C CD
Z Z(A(B + CD))
D 2
B + CD
B A(B + CD)
A 3

1 2 3 4
26
Resource: Floyd, Digital Fundamentals, 10th Edition, 2009. 25 26

Ex
tr
a Boolean expression to truth table

Exercise 4a.4:
Determine which of the logic circuits are equivalent. •  A truth table shows the output for all possible
input values.
•  From a Boolean expression, a truth table can
be developed.

x = number of input variables


Possible combinations of values, n = 2x

•  Example:
–  A(B + CD) è x = 4; n = 24=16

Resource: Floyd, Digital Fundamentals, 10th Edition, 2009. 27 28

Steps in construction a truth table

Example: F = A + B
•  Step 1: Identify x and n from the Boolean exp.

•  Step 2: Find the values of the variables that


make the expression equal to 1.
(Hint: use the rules for Boolean addition and multiplication)

•  Step 3: List in a table


• all the n combinations of 1s and 0s (input)
• The values of variables from step 2 (output)
• All the other output values will be 0

29 30

2012/2013-I @m 5
10/4/12

Ti
ps

•  Tips on ‘table-making’:
–  For n possible combinations, the input part of
the table will register the binary value of 0 to
n-1.
–  (e.g. n = 16; 0 to 15)

24 22 21 20
–  Remember the sequence
8 4 2 1
0 0 0 0 (0)
0 0 0 1 (1)
0 0 1 0 (2)
0 0 1 1 (3)
32
31

Example:

Given the truth table below, produce


the logic circuit (Module: page 115).
1

33 34
33 34

Example:

Produce a truth table from the following circuit.

35 36
35 36

2012/2013-I @m 6

You might also like