Chapter 2 - Number Systems and Boolean Algebra
Chapter 2 - Number Systems and Boolean Algebra
Example:
Convert 15610 to binary
Decimal to Binary
Example:
Convert 15610 to binary
Convert 15610 to binary
156 / 2 = 78 with 0 remainder
78 / 2 = 39 with 0 remainder
39 / 2 = 19 with 1 remainder
19 / 2 = 9 with 1 remainder
9 / 2 = 4 with 1 remainder
4 / 2 = 2 with 0 remainder
2 / 2 = 1 with 0 remainder
1 / 2 = 0 with 1 remainder
15610 = 100111002
Exercise
Convert 15610 to octal
Convert 15610 to octal
15610 = 2348
Number Conversion
• Decimal to any number system
• Any number system to Decimal
• Binary to Octal
• Binary to Hexadecimal
• Octal to Binary
• Hexadecimal to Binary
Any number system (N) to Decimal
– Sum of the products of powers of N
Example:
Convert 2348 to decimal (base 10)
Convert 2348 to Decimal (base 10)
4096 512 64 8 1
84 83 82 81 80
• C+ Original Expression
• C + (+ ) DeMorgan's Law
• C + () Commutative Law
• (C + + Associative Laws
• 1+ Identity Law
• 1 Identity Law
Simplification of Boolean expressions
Simplify Y = ĀBC+ĀBC+ABC+ABC:
Thus Y = BC
Exercise
Show complete solution of the
following:
= (0 + ) (Y + ) (1)
Canonical normal form
• Any Boolean expression may be expressed in
terms of either minterms or maxterms.
• For an expression with N variables, minterms
and maxterms are defined as follows :
– A minterm is the product of N distinct literals
where each literal occurs exactly once.
– A maxterm is the sum of N distinct literals where
each literal occurs exactly once.
Minterms and Maxterms for two-variable
expression
X Y Minterm Maxterm
0 0 X'.Y' X+Y
0 1 X'.Y X+Y'
1 0 X.Y' X'+Y
1 1 X.Y X'+Y'
Canonical Forms
• There are two canonical forms :
– sum-of-products (∑)
• Defined as the sum of the minterms
– Product-of-sums (π).
• Defined as the product of the maxterms.
Sum-of-products/Sum-of-minterms
∑(1,4,7)
1. No zeros allowed.
2. No diagonals.
3. Only power of 2 numbers of cells in each group.
(20 = 1, 21 = 2, 22 = 4, 23 = 8)
4. Groups should be as large as possible.
5. Every “one” must be in at least one group.
6. Overlapping allowed.
7. Wrap around allowed.
8. Fewest number of groups possible.
Groups may not include any cell containing a zero
0 0 0
0
Two Variables K-Map
Example: Solve F = X’Y + XY’ + XY
0
Three Variables K-Map
• There are eight minterms for three binary
variables.
• Therefore, the map consists of eight squares.
Three Variables K-Map
Example 1: Simplify F(X,Y,Z) = Σ (2, 3, 4, 5)
Three Variables K-Map
Example 2: Simplify F(X,Y,Z) = Σ (0, 2, 4, 5, 6)
Three Variables K-Map
Example 3: Simplify F(A, B, C) = Σ (1, 2, 3, 5, 7)
Exercise
Simplify using K-Map method:
F(A,B,C) = SOP(0,1,3,4,5)
Four Variables K-Map
• There are sixteen minterms for four binary variables.
• Therefore, the map consists of sixteen squares.
Four Variables K-Map
Example: Simplify F(W,X,Y,Z) = Σ (0,1, 2, 4, 5, 6, 8, 9, 12, 13, 14)
Exercise
F(A,B,C,D) = SOP(3,4,5,6,7,11,12,13,14,15)
Don’t Care (X) Conditions in K-Map
Example-1:
Minimize the following function in SOP minimal
form using K-Map:
f(A,B,C,D) = m(1, 5, 6, 12, 13, 14) + d(4)
Don’t Care (X) Conditions in K-Map
Example-2:
Minimize the following function in SOP minimal
form using K-Map:
F(A, B, C, D) = m(1, 2, 6, 7, 8, 13, 14, 15) + d(3, 5, 12)
Class Activity
Simplify the following expression using K-Map:
F(A,B,C)=ABC’ + ABC + AB’C’ + AB’C + A’B’C + A’BC
Logic Gate
• physical device implementing a Boolean
function
• primarily implemented using diodes or
transistors acting as electronic switches
allowing the construction of a physical model
of all of Boolean logic
AND & OR Gates
NOT gate
NAND & NOR Gates
EXOR & EXNOR Gates
Logisim Tool
• Draw the following using the Logisim Tool
Exercise
Draw a circuit for the expression
(A’ OR B AND C ) AND D’