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

LOGIC GATES

Logic gates are tools in expressing a given Boolean expression in a symbolic format. Buffer Gate Also known as a transfer gate and is used only to delay an output of a given expression. Logic Symbol

A
Boolean Expression

Y=A
Truth Table A 0 1 NOT Gate This gate is also referred to as an inverter and it negates the input expression. Logic Symbol Y 0 1

A
Boolean Expression

Y = A' or Y = A
Truth Table A 0 1 Y 1 0

Note: The two gates mentioned above can only have one input at any given time.
Boolean Algebra -1-

AND Gate AND gate is also known as an all or nothing gate since it will only output a true condition if ALL its inputs are true. Logic Symbol

A B
Boolean Expression

Y = A B or Y = AB
Truth Table A 0 0 1 1 OR Gate OR gate is often referred to as an any or all gate since it outputs a true condition if at least one of its conditions is true. Logic Symbol B 0 1 0 1 Y 0 0 0 1

A B
Boolean Expression

Y=A+B
Truth Table A 0 0 1 1
Boolean Algebra

B 0 1 0 1

Y 0 1 1 1
-2-

NAND Gate This gate is the complement of an AND gate. In other words, it would only be false if all of its input conditions are true. Logic Symbol

A B
Boolean Expression

Y = A B or Y = AB
Truth Table A 0 0 1 1 B 0 1 0 1 Y 1 1 1 0

XOR Gate Also known as an excusive-OR gate. It outputs a true condition if the input variables have an odd number of binary 1s. Logic Symbol

A B
Boolean Expression

Y = A B or Y = AB + AB
Truth Table A 0 0 1 1 B 0 1 0 1 Y 0 1 1 0

Boolean Algebra

-3-

BOOLEAN FUNCTION
A Boolean function is an expression formed with binary variables, binary or unary operators, parenthesis and equal sign. It can either be 1 or 0. Literal A literal can either be a primed or unprimed variable. It is represented by each appearance of a variable or its complement in any given Boolean expression. Example:

F = xyz + xyz + x y z
9 literals, 3 variables

MINTERM AND MAXTERM


Minterm (Standard Product) A minterm is a complete representation of a single Boolean expression obtained from an AND term of n variables. A variable with a value of binary 0 is represented by a primed or complemented variable, while a variable with a value of binary 1 is represented b y an unprimed m. variable. It is sometimes denoted in the form m j or

Illustrating a 2-variable minterm example.

x
0 0 1 1

y
0 1 0 1

Term

MINTERM Designation

xy xy xy xy

m0 m1 m2 m3

Boolean Algebra

-4-

Illustrating a 3-variable minterm example.

x
0 0 0 0 1 1 1 1

y
0 0 1 1 0 0 1 1

z
0 1 0 1 0 1 0 1

MINTERM Term Designation

xyz xyz xyz xyz xyz xyz xyz xyz

m0 m1 m2 m3 m4 m5 m6 m7

Maxterm (Standard Sum) A maxterm is a complete representation of a single Boolean expression obtained from an OR term of n variables. A variable with a value of binary 1 is represented by a primed or complemented variable, while a variable with a value of binary 0 is represented by an unprimed variable. It is sometimes denoted in the form M j or M . Illustrating a 2-variable maxterm example.

x
0 0 1 1

y
0 1 0 1

x+y

MAXTERM Term Designation

M0 M1 M2 M3

x+y x+y x+y

Boolean Algebra

-5-

Illustrating a 3-variable maxterm example.

x
0 0 0 0 1 1 1 1

y
0 0 1 1 0 0 1 1

z
0 1 0 1 0 1 0 1

x+y+z

MAXTERM Term Designation

M0 M1 M2 M3 M4 M5 M6 M7

x+ y+z x+ y+z x+ y+z x+ y+z x+y+z x+ y+z x+ y+z

Note: In all cases, the representation is

2 n number of possible combinations.

CANONICAL FORMS
A Boolean function could also be expressed into two canonical forms namely:

Sum of Minterms Sum of minterms could be expressed in the form of a Boolean function wherein you take all the binary 1s in a given function from the truth table and express those 1s in the form of minterm and summing them up together. Example: Given the truth table below, express function F in sum of minterms.

x
0 0 0 0 1 1 1 1

y
0 0 1 1 0 0 1 1

z
0 1 0 1 0 1 0 1

F
0 1 1 1 1 0 0 0

F = x yz + x yz + x yz + x yz F = m1 + m 2 + m3 + m 4 F = m(1,2,3,4)

Boolean Algebra

-6-

Product of Maxterms Product of maxterms could be expressed in the form of a Boolean function wherein you take all the binary 0s in a given function from the truth table and express those 0s in the form of maxterm and getting their product. Example: Given the truth table below, express function F in product of maxterms.

x
0 0 0 0 1 1 1 1

y
0 0 1 1 0 0 1 1

z
0 1 0 1 0 1 0 1

F
0 1 1 1 1 0 0 0

F = (x + y + z)( x + y + z)( x + y + z)( x + y + z) F = M 0 M 5 M 6 M 7 F = M (0,5,6,7)

STANDARD FORMS
A Boolean function could also be expressed into two standard forms namely: Sum of Products (SOP) It is a simplified Boolean expression containing AND terms called product terms, of one or more literals. The sum denotes the OR-ing of these terms. Product of Sums (POS) It is a simplified Boolean expression containing OR terms called sum terms, of one or more literals. The product denotes the AND-ing of these terms. Examples: SOP: POS:

F = y+ xz

F = ( x + y )( x + z )

F = x( y + z )( y + z + w)

Boolean Algebra

-7-

NON-STANDARD FORMS
A Boolean expression that could be further simplified into SOP or POS form.

F = (ab + cd )(ab + c d ) F = (a + b)(c + d ) + (a + b)(c + d )

DRAWING LOGIC DIAGRAMS


Example: Simplify functions F 1 and F2; and draw their corresponding logic representation.

x
0 0 0 0 1 1 1 1 a) F1 = x + y z

y
0 0 1 1 0 0 1 1

z
0 1 0 1 0 1 0 1

F1
0 1 0 0 1 1 1 1

F2
0 1 0 1 1 1 0 0

x y z
b) F2 = x y + x z x

F1

F2

Boolean Algebra

-8-

PROPERTIES OF BOOLEAN ALGEBRA


1. Operations with 0 and 1

x0 = 0 x 1 = x

x +1 =1 x+0= x

2. Idempotent Laws

xx = x

x+x= x x + x =1

3. Law of Complementary

xx = 0
4. Involution Law

x=x
5. Commutative Law

xy= yx

x+ y= y+x

6. Distributive Law

x( y + z ) = x y + x z

x + y z = ( x + y )( x + z )
x+xy=x

7. Absorption

x( x + y ) = x

8. Identity

x( x + y ) = x y
9. Associative Law

x+xy=x+ y x + ( y + z) = ( x + y) + z

x( y z ) = ( x y ) z

10. De Morgans Law

xy = x + y
11. Consensus Theorem

x+ y = x y

( x + y )( x + z )( y + z ) = ( x + y )( x + z ) xy+ xz+ yz= xy+ xz


12. Simplification Theorem

( x + y )( x + y ) = x

xy+xy=x

Boolean Algebra

-9-

13. Theorem of Multiplying Out and Factoring

( x + y )( x + z ) = x z + x y x y + x z = ( x + z )( x + y ) CONVERSION
Sum of Minterm Examples: 1.

Product of Maxterm

F ( x, y, z ) = m(5,6,7) = M (0,1,2,3,4) x
0 0 0 0 1 1 1 1

y
0 0 1 1 0 0 1 1

z
0 1 0 1 0 1 0 1

F
0 0 0 0 0 1 1 1

2.

F (a, b, c) = M (1,2,3,4,6) = m(0,5,7) x


0 0 0 0 1 1 1 1

y
0 0 1 1 0 0 1 1

z
0 1 0 1 0 1 0 1

F
1 0 0 0 0 1 0 1

Boolean Algebra

- 10 -

Sum of Minterm Example:

SOP

F ( x, y, z ) = (0,1,3,4,7) = xy z + xy z + xyz + xy z + xyz = x y (z + z) + x y z + x y z + x y z = x y(1) + x y z + x y z + x y z = xy + xyz + xy z + xyz = x y + x y z + y z (x + x) = x y + x y z + y z (1) = xy + xy z + yz = y (x + x z ) + y z = y (x + z) + y z = xy + yz + yz


SOP

distributive law law of complementary operations with 0 and 1 distributive law law of complementary operations with 0 and 1 distributive law identity distributive law

Sum of Minterm

Example:

F = x + yz = xyz + xyz + xyz + xyz + xyz + xyz = xyz + xyz + xyz + xyz + xyz

Product of Maxterm Example:

POS

F ( x, y, z ) = (2,5,6) = (x + y + z)(x + y + z)(x + y + z) = (y + z)(x + x) (x + y + z) = (y + z)(1) (x + y + z) = (y + z)(x + y + z)

distributive law law of complementary operations with 0 and 1

Boolean Algebra

- 11 -

POS

Product of Maxterm

Example:

F = (x + y)(x + z) = (x + y + z)(x + y + z)(x + y + z)(x + y + z) = (x + y + z)(x + y + z)(x + y + z)


SOP

1.

POS

Examples:

F = x + yz = (x + y)(x + z) F = xy + xz = (x + z)(x + y)
SOP

2.

POS

1.

Examples:

F = (x + y)(x + z) = xz + xy F = (x + y)(x + z) = x + yz

2.

Boolean Algebra

- 12 -

Karnaugh Map or Veitch Diagram (K-Map)


K-map is represented by 2 m squares where m is the number of variables, and each of these squares represent a corresponding minterm or maxterm. It is a modified truth table intended to allow minimal SOP and POS expressions to be obtained by visual inspection. Rules 1. 2. 3. in implementing K-Map: groupings should be a factor of 2 n , where n = 0, , m. groupings should either be horizontal / vertical only for each group, cover as many 1s or 0s as possible since it will minimize the number of literals 4. for each group, there should be at least one exclusive minterm or maxterm 5. you are allowed to use a minterm or a maxterm more than once if it would make a group bigger 6. each group corresponds to one product or sum term

2-Variable K-Map 0 0 1 1 x\y 0 1 0 1

m0 m2

m1 m3

xy xy

xy xy

where: m 0 corresponds to x y

m1 corresponds to xy m 2 corresponds to x y m3 corresponds to xy


Examples: 1)

F ( x, y ) = (0,2) = x y + xy
x\y 0 1 = 0 1 1 1

Boolean Algebra

- 13 -

2)

F ( x, y ) = (2,3) = x y + xy
x\y 0 1 = 0 1 1 1

3)

F ( x, y ) = x + y
x\y 0 1 = 0 1 1 1 1

x+y

4)

F ( x, y ) = x y + x y
x\y 0 1 = 0 1 1 1

3-Variable K-Map 00 m0 m4 01 m1 m5 11 m3 m7 10 m2 m6

0 1

Examples: 1)

F (a, b, c) = (0,1,2,5,6,7)
a\bc 0 1 = 00 1 01 1 1 11 1 10 1 1

a b + bc + ac
or

Boolean Algebra

- 14 -

a\bc 0 1 = 2)

00 1

01 1 1

11 1

10 1 1

a c + bc + ab

F ( x, y, z ) = x yz + xyz + xyz + xyz


x\yz 0 1 = 00 01 1 11 1 1 10 1

yz + xz + xy

3)

F (a, b, c) = (1,3,5,7)
a\bc 0 1 = 00 01 1 1 11 1 1 10

4)

F (a, b, c) = (0,2,4,6)
a\bc 0 1 = 00 1 1 01 11 10 1 1

5)

F (a, b, c) = (0,1,2,3)
a\bc 0 1 = 00 1 01 1 11 1 10 1

Boolean Algebra

- 15 -

4-Variable K-Map 00 m0 m4 m12 m8 01 m1 m5 m13 m9 11 m3 m7 m15 m11 10 m2 m6 m14 m10

00 01 11 10

Examples: 1)

F (a, b, c, d , ) = m0 + m7 + m9 + m11
ab\cd 00 01 11 10 = 00 1 01 11 1 1 1 10

a b c d + abcd + a bd

2)

F (a, b, c, d ) = (1,5,6,7,11,12,13,15)
ab\cd 00 01 11 10 = 00 01 1 1 1 11 1 1 1 10 1

a cd + abc + abc + acd

3)

F (a, b, c, d ) = (0,1,2,6,8,9,10)
ab\cd 00 01 11 10 = 00 1 01 1 11 10 1 1 1

b c + acd + b d

Boolean Algebra

- 16 -

Product of Sums Simplification Examples: 1)

F (a, b, c, d ) = (0,1,2,5,8,9,10) = (3,4,6,7,11,12,13,14,15)


ab\cd 00 01 11 10 = 00 0 0 01 11 0 0 0 0 10 0 0

(c + d )(a + b)(b + d)

2)

F (a, b, c, d ) = (0,1,4,5,7,10,11,13,14,15)
ab\cd 00 01 11 10 = 00 0 0 01 0 0 0 11 0 0 0 10

0 0

(a + c)(b + d)(a + c)

Boolean Algebra

- 17 -

You might also like