Download as pdf or txt
Download as pdf or txt
You are on page 1of 26

Boolean Algebra and Logic

Gates
EE/CE 233 Digital Logic Design
Rehan Ahmed
rehan.ahmed@itu.edu.pk
Slides adapted from various sources including Dr Kasif Riaz’s slides from Fall 2019, Morris Mano
instructor slides, and several others.
Digital Systems
• Digital systems consider discrete amounts of data.
• Examples
• 26 letters in the alphabet
• 10 decimal digits

• Larger quantities can be built from discrete values:


• Words made of letters
• Numbers made of decimal digits (e.g. 239875.32)
Decimal
• Decimal numbers are made of decimal digits: (0,1,2,3,4,5,6,7,8,9)
• A way of interpreting decimal numbers:
• 7392:

• We can do the same with fractions


• 97654.35 = 9x104 + 7x103 + 6x102 + 5x101 + 4x100 + 3x10-1 + 5x10-2

• Why do we use 10 digits, anyway?


Decimal
• a5a4a3a2a1a0 . a-1a-2a-3

105a5 + 104a4 + 103a3 + 102a2 + 101a1 + 100a0 . 10-1a-1 + 10-2a-2 +10-3a-3

• Compact notation: = ∑%!"#$ 10! 𝑎!

• Notation: (a5a4a3a2a1a0 . a-1a-2a-3)10

4
Binary Numbers
• Computers operate on binary values (0 and 1)
• Easy to represent binary values electrically
• Voltages and currents.
• Easy to represent 0 and 1 using electrical values.
• Possible to tolerate noise.
• Easy to transmit data
• Easy to build binary circuits.
• Create the building blocks of modern computers

• (110101)2
25 x 1 + 24 x 1 + 23 x 0 + 22 x 1 + 21 x 0 + 20 x 1 = 32 + 16 + 4 + 1 = (53)10

• Let’s look at an example

5
Example
• Find the decimal representation of the following binary number:
10001011

How to go from decimal to binary


How to represent fractions
Conversion between other number systems Week 6, 7
Negative numbers

6
Boolean Algebra
• A set of rules formulated by the English mathematician George Boole describe
certain propositions whose outcome would be either true or false
• Two valued Boolean Algebra Is defined on a set of two elements B ={0, 1} with
rules for two binary operators
• “.” And Operator
• “+” Or Operator

• Useful for identifying and minimizing circuit functionality


Boolean Algebra: Operator Precedence
1. () Parenthesis
2. ‘ Compliment, Not
3. . And
4. + Or

• (x+y)’
• Evaluate expression inside the parenthesis first
• Complement

8
Class Exercise

9
Boolean Algebra: Postulates and Theorems
• Identity elements
• a + 0 = a (0 is the identity element for the + operation)
• a . 1 = a (1 is the identity element for the . operation)
• Commutation
• a+b=b+a
• a.b = b.a
• Association
• (a + b) + c = a + (b + c)
• (a.b).c = a.(b.c)
• Distribution
• a.(b+c+…) = (a.b) + (a.c) +…
• a + (b.c….) = (a + b).(a + c)…
• Absorption
• a + (a.c) = a
• a.(a + c) = a
Boolean Algebra: Duality
• If an expression is valid in Boolean algebra, the dual of that expression is also
valid.
• To form the dual of an expression, replace all + operators with . operators, and all .
operators with + operators, all ones with zeros, and all zeros with ones.

• Form the dual of the expression


• a + (b.c) = (a+b) . (a+c)
Boolean Algebra: Involution
• This theorem states:
a’’ = a
• Remember that aa’ = 0 and a+a’=1.
• Therefore, a’ is the complement of a and a is also the complement of a’.
• As the complement of a’ is unique, it follows that a’’=a.
• Taking the double inverse of a value will give the initial value.
Boolean Algebra: Absorption
• This theorem states:
a + ab = a a(a+b) = a
• To prove the first half of this theorem:
a + ab = a . 1 + ab
= a (1 + b)
= a (b + 1)
= a (1)
a + ab = a
Boolean Algebra: DeMorgan’s Theorem
• A key theorem in simplifying Boolean algebra expression is DeMorgan’s
Theorem. It states:
(a + b)’ = a’.b’ (ab)’ = a’ + b’

• Complement the expression


a(b + z(x + a’)) and simplify.

(a(b+z(x + a’)))’ = a’ + (b + z(x + a’))’


= a’ + b’(z(x + a’))’
= a’ + b’(z’ + (x + a’)’)
= a’ + b’(z’ + x’a’’)
= a’ + b’(z’ + x’a)
Boolean Algebra Summary

15
Simplifying expressions using boolean algebra
• Literal: single variable within a term in complimented or un-complimented
form
• Determine the number of literals in:
𝐹& = 𝑥 ' 𝑦 ' 𝑧 + 𝑥 ' 𝑦𝑧 + 𝑥𝑦′

• Simplifying a boolean expression implies minimizing the numer of literals

16
Example 2.1 MM 5ed
• Simplify the boolean
functions:
1. 𝑥 𝑥 ' + 𝑦
2. 𝑥 + 𝑥 ' 𝑦
3. 𝑥 + 𝑦 𝑥 + 𝑦 '
4. 𝑥𝑦 + 𝑥 ' 𝑧 + 𝑦𝑧
5. (𝑥 + 𝑦)(𝑥 ' + 𝑧)(𝑦 + 𝑧)

17
Example 2.2 MM 5ed
• Find the complement of functions 𝐹( = (𝑥 ' 𝑦𝑧 ' + 𝑥 ' 𝑦 ' 𝑧), 𝐹( = 𝑥(𝑦 ' 𝑧 ' + 𝑦𝑧)

18
Logic Gates

19
Logic Gates

20
Logic Gates

21
Truth Tables

22
Gate level realization of a boolean expression

23
Minterms

24
Maxterms

25
26

You might also like