Logic Equation Simplification

36
Logic equation simplification. Digital Logic and Software Applications © University of Wales Newport 2009 This work is licensed under a Creative Commons Attribution 2.0 License .

description

The following presentation is a part of the level 4 module -- Digital Logic and Signal Principles. This resources is a part of the 2009/2010 Engineering (foundation degree, BEng and HN) courses from University of Wales Newport (course codes H101, H691, H620, HH37 and 001H). This resource is a part of the core modules for the full time 1st year undergraduate programme. The BEng & Foundation Degrees and HNC/D in Engineering are designed to meet the needs of employers by placing the emphasis on the theoretical, practical and vocational aspects of engineering within the workplace and beyond. Engineering is becoming more high profile, and therefore more in demand as a skill set, in today’s high-tech world. This course has been designed to provide you with knowledge, skills and practical experience encountered in everyday engineering environments.

Transcript of Logic Equation Simplification

Page 1: Logic Equation Simplification

Logic equation simplification.

Digital Logic and Software Applications

© University of Wales Newport 2009 This work is licensed under a Creative Commons Attribution 2.0 License.

Page 2: Logic Equation Simplification

The following presentation is a part of the level 4 module -- Digital Logic and Signal Principles. This resources is a part of the 2009/2010 Engineering (foundation degree, BEng and HN) courses from University of Wales Newport (course codes H101, H691, H620, HH37 and 001H). This resource is a part of the core modules for the full time 1 st year undergraduate programme.

The BEng & Foundation Degrees and HNC/D in Engineering are designed to meet the needs of employers by placing the emphasis on the theoretical, practical and vocational aspects of engineering within the workplace and beyond. Engineering is becoming more high profile, and therefore more in demand as a skill set, in today’s high-tech world. This course has been designed to provide you with knowledge, skills and practical experience encountered in everyday engineering environments.

Contents Introduction Karnaugh Maps 2 Input Karnaugh Maps The Process Steps Example 3 Input Karnaugh Maps Example A function F has the truth table shown below. De... Example Three judges A, B and C vote: 1 guilty and 0 not ... Four Judge example Credits

In addition to the resource below, there are supporting documents which should be used in combination with this resource. Please see: Holdsworth B, Digital Logic Design, Newnes 2002 Crisp J, Introduction to Digital Systems, Newnes 2001

Logic Equation Simplification

Page 3: Logic Equation Simplification

Often we are given a Boolean expression which could be written in a simplified way or we are presented with a truth table where we have no expression. The process of simplification is the way in which we generated the simplest (shortest) expression for the function. The reason that this is important is that when implementing the expression, the simpler it is the less number of gates, therefore the less number of I.C.s and the smaller the space required.

e.g. Consider the OR gate truth table

A B Y

0 0 0

0 1 1

1 0 1

1 1 1

We have 3 combinations which generate an output:

BABABAY We know that this can be written as:

but how do we get from the first equation to the second?

BAY

Page 4: Logic Equation Simplification

1. 2.

3. 4.

5. 6.

7. 8.

9. 10.

11. 12.

13. 14.

15. 16.

17. 18.

We will look at two methods.1.Boolean Algebra simplification rules

1 AA AAA AAA 0AA

CABACBA )( AA 0

11 A AA 100 A ABBA

ABBA BAAB )(

ABAA ABAA )(

BABAA BABAA )(

BABA BABA

Page 5: Logic Equation Simplification

Examples.

1.

2.

BABABAY

)()()( CBACBACBAF

Boolean Algebra requires the user to:have a good understanding of the rules, experience of reducing equations, a knowledge of where to start a knowledge of when we have reached the simplest

solution.

Logic Equation Simplification

Page 6: Logic Equation Simplification

2. Karnaugh Maps

This method coverts the truth table information into a two-dimensional map. It then converts areas of 1’s on the map into groups. These groups are then identified and this gives us the simplest expression.

Logic Equation Simplification

Page 7: Logic Equation Simplification

11

101

10

000

Y10B AYBA

2-input Karnaugh MapThis has 4 entries on the Truth Table and so the

Karnaugh Map has 4 squares

The top left square is where A = 0 and where B = 0 and so the value of Y for A = 0 and B = 0 would be placed in here.Each entry in the Truth Table has one square in the Karnaugh Map.

Logic Equation Simplification

Page 8: Logic Equation Simplification

STEP ONE

of the simplification process would be to fill in the Karnaugh Map

(Note: we normally only transfer 1’s onto the map.)

Logic Equation Simplification

Page 9: Logic Equation Simplification

STEP TWOis to group the 1’s. Groups are formed using the following rules:

1. Group sizes must be powers of 2 – 1, 2, 4, 8, 16, etc – no other size groups are allowed.

2. Groups must be square of rectangles (1 x 4 or 2 x 2 etc)

3. Groups must be as large as possible (never group 2 groups of 2 if a group of 4 can be made.)

4. All 1’s must be grouped.5. A 1 may be grouped more than once.6. Do not include redundant groups – a redundant

group is a group that contains 1’s which have all been previously grouped.

Logic Equation Simplification

Page 10: Logic Equation Simplification

STEP THREEidentifies the expression for each group. The groups are examined one at a time. For a group the following question is asked for each input one at a time:

For the group:Is the input logic state for every square in the group:

Always 1 – if it is then the input appears in the expression

Always 0 - if it is then the not input appears in the expression

Both 1 and 0 - if it is then the input does not appears in the expression

After each input has been checked, the expression is the AND of the inputs states identified.

Page 11: Logic Equation Simplification

STEP FOUR

identifies the complete expression for the function. The individual group expressions are OR-ed together to give the simplified expression.

Logic Equation Simplification

Page 12: Logic Equation Simplification

Example

The Truth Table and Karnaugh Map are shown below:

BABABAY

A B Y B A 0 1 Y

0 0 0

0 1

1 0 1

1 1

Logic Equation Simplification

Page 13: Logic Equation Simplification

111

1101

010

0100

Y10B AYBA

Logic Equation Simplification

Page 14: Logic Equation Simplification

1111

1101

01011

0100

Y10B AYBA

STEP 1

Logic Equation Simplification

Page 15: Logic Equation Simplification

A B Y B A 0 1 Y

0 0 1 01 1

0 1 0

1 0 1 11

1 1 1

STEP 2

Logic Equation Simplification

Page 16: Logic Equation Simplification

A B Y B A 0 1 Y

0 0 1 01 1

0 1 0

1 0 1 11

1 1 1

STEP 3A always 1 so AB 1 and 0 so no BExpression

A 1 and 0 so no AB always 0 so not BExpression AB

Logic Equation Simplification

Page 17: Logic Equation Simplification

A B Y B A 0 1 Y

0 0 1 01 1

0 1 0

1 0 1 11

1 1 1

STEP 4

Complete expression: BAY

Logic Equation Simplification

Page 18: Logic Equation Simplification

0

3-input Karnaugh MapThis has 8 entries on the Truth Table and so the

Karnaugh Map has 8 squares

111

011

101

001

1110

010

100

Y0110C B000

1100AYCBA

Logic Equation Simplification

Page 19: Logic Equation Simplification

Note there is one additional rule for grouping 1’s on this map and larger maps:

Rule: 1’s may be grouped between the left hand column and the right hand column.

Logic Equation Simplification

Page 20: Logic Equation Simplification

ExampleA function F has the truth table shown below. Determine the simplest Boolean Expression for the function.

A B C F A 0 0 1 1

0 0 0 1 C B

0 1 1 0 F

0 0 1 0 0

0 1 0 0

0 1 1 1 1

1 0 0 1

1 0 1 1

1 1 0 1

1 1 1 1Logic Equation Simplification

Page 21: Logic Equation Simplification

1111

1011

1101

1001111

11110

0010111

00100

F0110C B

1000

1100AFCBA

Logic Equation Simplification

Page 22: Logic Equation Simplification

1111

1011

1101

1001111

11110

0010111

00100

F0110C B

1000

1100AFCBA

Logic Equation Simplification

Page 23: Logic Equation Simplification

1111

1011

1101

1001111

11110

0010111

00100

F0110C B

1000

1100AFCBA

A always 1 so AB 1 and 0 so no BC 1 and 0 so no CExpression

A 1 and 0 so no AB always 1 so BC always 1 so CExpression

A

CB

A 1 and 0 so no AB always 0 so not BC always 0 so not CExpression

CB

Page 24: Logic Equation Simplification

1111

1011

1101

1001111

11110

0010111

00100

F0110C B

1000

1100AFCBA

Complete expression

CBCBAF

Logic Equation Simplification

Page 25: Logic Equation Simplification

ExampleThree judges A, B and C vote: 1 guilty and 0 not guilty. Design a logic circuit using NAND only which will allow a majority decision (F) to be found. e.g. A = 1, B = 0, C = 0 gives an output of 0 (not guilty)

A B C F A 0 0 1 1

0 0 0 C B

0 1 1 0 F

0 0 1 0

0 1 0

0 1 1 1

1 0 0

1 0 1

1 1 0

1 1 1Logic Equation Simplification

Page 26: Logic Equation Simplification

A B C D Y A 0 0 1 1

0 0 0 0 C D B 0 1 1 0 Y

0 0 0 1 0 00 0 1 0

0 0 1 1 0 1

0 1 0 0

0 1 0 1 1 1

0 1 1 0

0 1 1 1 1 0

1 0 0 0

1 0 0 1

1 0 1 0

1 0 1 1

1 1 0 0

1 1 0 1

1 1 1 0

1 1 1 1

4-inputKarnaugh Map

This has 16 entries on the Truth Table and so the Karnaugh Map has 16 squares

Logic Equation Simplification

Page 27: Logic Equation Simplification

1111

0111

1011

0011

1101

0101

1001

0001

1 01110

0110

1 11010

0010

0 11100

0100

0 0

1000

Y0110C D B0000

1100AYDCBA

Note there is one additional rule for grouping 1’s on this map and larger maps:Rule: 1’s may be grouped between the top row and the bottom row.

Logic Equation Simplification

Page 28: Logic Equation Simplification

ExampleFour judges A, B, C and D vote: 1 guilty and 0 not

guilty. Obtain a Boolean Expression that will allow a majority decision to be found. In the case of a split decision the vote of A determines the outcome Y.

Logic Equation Simplification

Page 29: Logic Equation Simplification

11111

10111

11011

10011

11101

10101

11001

0000111

1 011110

00110111

1 101010

0001011

0 101100

001001

0 0

01000

Y0110C D B00000

1100AYDCBA

Logic Equation Simplification

Page 30: Logic Equation Simplification

11111

10111

11011

10011

11101

10101

11001

0000111

1 011110

00110111

1 101010

0001011

0 101100

001001

0 0

01000

Y0110C D B00000

1100AYDCBA

Now form groups

Logic Equation Simplification

Page 31: Logic Equation Simplification

11111

10111

11011

10011

11101

10101

11001

0000111

1 011110

00110111

1 101010

0001011

0 101100

001001

0 0

01000

Y0110C D B00000

1100AYDCBA

Identify groups

A always 1 so AB 1 and 0 so no BC always 1 so CD 1 and 0 so no DExpression

CA

CA

A always 1 so AB 1 and 0 so no BC 1 and 0 so no CD always 1 so DExpression DA

A always 1 so AB always 1 so BC 1 and 0 so no CD 1 and 0 so no DExpression

BA

A 1 and 0 so no AB always 1 so BC always 1 so CD always 1 so DExpression

DCB

Page 32: Logic Equation Simplification

11111

10111

11011

10011

11101

10101

11001

0000111

1 011110

00110111

1 101010

0001011

0 101100

001001

0 0

01000

Y0110C D B00000

1100AYDCBA

CA

Boolean Expression

DCBDACABAY

Logic Equation Simplification

Page 33: Logic Equation Simplification

ExampleTwo 2-bit numbers (A,B) and (C,D) are to be

compared.

If (A,B) > (C,D) then the G (greater than) output is to equal 1

If (A,B) < (C,D) then the L (less than) output is to equal 1

If (A,B) = (C,D) then the E (Equal to) output is to equal 1

e.g. A = 1, B = 0, C = 1, D = 1 10 (2) is less than 11 (3) so L = 1

Logic Equation Simplification

Page 34: Logic Equation Simplification

1111

0111

1011

0011

1101

0101

1001

0001

1 01110

0110

1 11010

0010

0 11100

0100

0 0

1000

G0110C D B0000

1100AELGDCBA

Logic Equation Simplification

Page 35: Logic Equation Simplification

A 0 0 1 1  

C D B

0 1 1 0 L 

0 0

0 1

1 1

1 0

A 0 0 1 1  

C D B 0 1 1 0 E  

0 0

0 1

1 1

1 0

Expression G

Expression L

Expression E

Logic Equation Simplification

Page 36: Logic Equation Simplification

This resource was created by the University of Wales Newport and released as an open educational resource through the Open Engineering Resources project of the HE Academy Engineering Subject Centre. The Open Engineering Resources project was funded by HEFCE and part of the JISC/HE Academy UKOER programme.

© 2009 University of Wales Newport

This work is licensed under a Creative Commons Attribution 2.0 License.

The JISC logo is licensed under the terms of the Creative Commons Attribution-Non-Commercial-No Derivative Works 2.0 UK: England & Wales Licence.  All reproductions must comply with the terms of that licence.

The HEA logo is owned by the Higher Education Academy Limited may be freely distributed and copied for educational purposes only, provided that appropriate acknowledgement is given to the Higher Education Academy as the copyright holder and original publisher.

The name and logo of University of Wales Newport is a trade mark and all rights in it are reserved. The name and logo should not be reproduced without the express authorisation of the University.

Logic Equation Simplification