7
Introduction to Digital Electronics, Module 4: Boolean Algebra 1 Module 4 - Boolean Algebra & Karnaugh Map Simplification INTRODUCTION: Boolean algebra is formal a way to express digital logic equations, and to represent a logical design in an alpha-numeric way. The present Boolean algebra format, and many of the logic manipulation rules and techniques were formalized around 1850 by George Boole, an Irish mathematician. It was used as a systematic approach to solving problems in logic and reasoning. With the advent of modern electronics, and digital systems in particular, Boolean algebra found a natural home. In addition to being used as a tool for deductive reasoning, it is now an almost indispensable tool for designing digital logic circuits and machines. CONCEPT 4.1: The line as a NOT or INVERT indicator A line over the top of a single digital variable or group of variables ORed together, ANDed together, or in any combination of AND and OR operations, changes the result of the term or expression from a "1" to a "0" or from a "0" to a "1". A line covering a single letter, term, or group of terms means that the logical result of the letter or expression under the line is inverted, or in the opposite binary state. The expression A+B reads A or B. If either A or B is at a "1" state, then their combined result, or in this case their ORed result, is a "1". If a line is drawn over the top of the expression A+B, the line inverts the result, changing it from a "1" to a "0". In the process of using Boolean algebra and DeMorgan's Theorem, more than one line often appears over terms. If there are an even number of lines over a term, the lines cancel. If there are an odd number of lines over a term, they can be reduced to a single line. CONCEPT 4.2: The Commutative Law An AND or an OR expression can be taken in any order without changing the result of the expression. A + B = B + A, A B = B A Imagine a basic AND gate or an OR gate. Either input can be used to bring in the data without affecting the results.

Boolean Algebra And Karnaugh Map Simplification

Embed Size (px)

Citation preview

Page 1: Boolean Algebra And Karnaugh Map Simplification

Introduction to Digital Electronics, Module 4: Boolean Algebra 1

Module 4 - Boolean Algebra & Karnaugh Map Simplification

INTRODUCTION:

Boolean algebra is formal a way to express digital logic equations, and to represent a logical design in an alpha-numeric way. The present Boolean algebra format, and many of the logic manipulation rules and techniques were formalized around 1850 by George Boole, an Irish mathematician. It was used as a systematic approach to solving problems in logic and reasoning. With the advent of modern electronics, and digital systems in particular, Boolean algebra found a natural home. In addition to being used as a tool for deductive reasoning, it is now an almost indispensable tool for designing digital logic circuits and machines.

CONCEPT 4.1: The line as a NOT or INVERT indicator

A line over the top of a single digital variable or group of variables ORed together, ANDed together, or in any combination of AND and OR operations, changes the result of the term or expression from a "1" to a "0" or from a "0" to a "1".

A line covering a single letter, term, or group of terms means that the logical result of the letter or expression under the line is inverted, or in the opposite binary state. The expression A+B reads A or B. If either A or B is at a "1" state, then their combined result, or in this case their ORed result, is a "1".

If a line is drawn over the top of the expression A+B, the line inverts the result, changing it from a "1" to a "0". In the process of using Boolean algebra and DeMorgan's Theorem, more than one line often appears over terms. If there are an even number of lines over a term, the lines cancel. If there are an odd number of lines over a term, they can be reduced to a single line.

CONCEPT 4.2: The Commutative Law

An AND or an OR expression can be taken in any order without changing the result of the expression.

A + B = B + A, A B = B A

Imagine a basic AND gate or an OR gate. Either input can be used to bring in the data without affecting the results.

Page 2: Boolean Algebra And Karnaugh Map Simplification

Introduction to Digital Electronics, Module 4: Boolean Algebra 2

CONCEPT 4.2: The Associative Law

The terms or variables of a logic expression can be presented and acted upon in any order without changing the meaning of the expression.

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

CONCEPT 4.3: The Distributive Law

Variables can be factored out of Boolean algebra terms and expressions in much the same way as in classical algebra.

A(B + C) = AB + AC

CONCEPT 4.4: Basic Boolean Algebra Rules

There are 12 basic rules of Boolean algebra. They are logical in nature and follow the rules of gates covered in previous modules.

Page 3: Boolean Algebra And Karnaugh Map Simplification

Introduction to Digital Electronics, Module 4: Boolean Algebra 3

CONCEPT 4.5: The NOT expression

The word “NOT” written on the left side of a variable or of an expression is the same thing as a line drawn over the top of the variable or the expression. The NOT indicator means that the variable or expression below the line is inverted. Everywhere the expression yields a "1", it is changed to a "0", and everywhere the expression yields a "0", it is changed to a "1".

CONCEPT 4.6: Product of Sums (POS)

Product of sums terms refer to Boolean algebra expressions that have ORed terms ANDed together. An example of a POS expression is given below:

_ _ _ _

(A + B + C )(A + B + C)(A + B + C) = Y

CONCEPT 4.7: Sum of Product (SOP)

Boolean algebra expressions are written in either Product of Sums (POS) form or Sum of Products (SOP) form. Sum of Product refers to Boolean algebra expressions that have AND terms Ored together. An example of SOP is:

_ _ _ _ _ _

A B C + A B C + A B C = Y

CONCEPT 4.8: DeMorgan’s Theorem

DeMorgan’s Theorem states that equivalent forms of NAND and NOR expressions exist just like the equivalents for NAND and for NOR gates.

Using DeMorgan's Theorem, an OR gate with the inputs inverted is the same as an AND gate with the output inverted (both forms are called a NAND gate.) Using the DeMorgan's Theorem for the NOR equivalent gates, an AND gate with the inputs inverted is the same as an OR gate with the output inverted (both forms are called a NOR gate.) The OR and AND versions of NAND and NOR gates can be substituted for one another.

_ _ __ _ _ _____

A + B = A B and A B = A + B

Page 4: Boolean Algebra And Karnaugh Map Simplification

Introduction to Digital Electronics, Module 4: Boolean Algebra 4

To convert between the AND form of a NAND gate and the OR form of a NAND gate, break the line above the NAND expression, and change the sign between the variables. Use the same process to convert between the AND and OR forms of the NOR gate. This process is useful to convert Boolean algebra equations from POS to SOP form.

CONCEPT 4.9: Boolean Algebra Simplification

By applying Boolean algebra rules with DeMorgan’s Theorem, we can cancel out redundant terms and variables from an SOP or POS expression. This is called Boolean algebra simplification.

Page 5: Boolean Algebra And Karnaugh Map Simplification

Introduction to Digital Electronics, Module 4: Boolean Algebra 5

To accomplish Boolean algebra simplification, group and manipulate expressions, and reduce the number of redundant terms much like you would do with a classic algebra manipulation of a numeric expression. ANDed terms can be treated like multiplied terms, and OR expressions can be treated like addition + signs in arithmetic expressions.

Terms can be factored out of expressions, and parenthesis can be added and removed to and from grouped terms as needed. The similarity ends when the results are interpreted. AND is not multiplication, and OR is not addition in digital logic expressions.

CONCEPT 4.10: Karnaugh Maps (K Maps)

A Karnaugh Map is a method of mapping truth tables onto a matrix that identifies places where two or more different combinations of the input variables yield the same result. In addition to identifying redundant terms, the K map also cancels them, leaving only the minimized Boolean algebra expressions that will yield the same truth table outputs as the unreduced terms.

The best way to understand K maps is to go through an actual simplification process using a K map. We will start with a three variable truth table. Three variables have 2 to the 3rd, or 8 possible combinations of 1’s and 0’s. This means that the K map must have 8 cells, one for every possible combination of input variables.

The input variables can be mapped in any order on the K map, but it must follow the same organization as the truth table being mapped. We will assign the letters R, S, & T to the input variables of our truth table, and X to the output.

Page 6: Boolean Algebra And Karnaugh Map Simplification

Introduction to Digital Electronics, Module 4: Boolean Algebra 6

The Karnaugh map is laid out so that from cell to cell and from edge to edge, there is only a one bit change in the variables at any given time. This accounts for the column to column and row to row order of 00 01 11 10. The column variables are assigned across the top of the map, and the row variables are assigned to the left side of the map. Each cell contains the result of the variables for the binary combination given by the intersecting row and column. If the column variables are R S and the row variables are T U for a 16 cell or four variable map, the combination 0 1 1 0 is the same as (notR S T notU) or cell 6. If the truth table shows a 1 for the output at the position 0 1 1 0, then the Karnaugh map will contain a 1 in that particular cell.

As an example, let’s simplify the 3 bit K map above. Notice the four three variable expressions reduce down to three two variable expressions. This is a substantial savings in circuitry, and the equation will do exactly the same thing as the original unsimplified expression from the truth table.

Page 7: Boolean Algebra And Karnaugh Map Simplification

Introduction to Digital Electronics, Module 4: Boolean Algebra 7

The same method applies to larger K maps of 4, 5, and 6 variables. Four variable K maps have sixteen cells, since 2 to the 4th is 16. Five variable K maps are mapped as two, sixteen cell maps side by side. It is like mapping one map above the other, with the same numbered cells being redundant. Six variable K maps result in four, sixteen cell maps together in a square pattern. Top to bottom and side by side, redundancies are cancelled in the same numbered cells. More than four variable K maps are rarely used because they are more difficult to follow without getting lost.