Está en la página 1de 45

Seminario: lgebra de Boole y simplificacin lgica

Automtica Industrial Grado en Ingeniera Qumica Universidad de Santiago de Compostela

Funciones bsicas
Boolean functions : NOT, AND, OR,
exclusive OR(XOR) : odd function exclusive NOR(XNOR) : even function(equivalence)

Funciones bsicas
AND
Z=X Y or Z=XY Z=1 if and only if X=1 and Y=1, otherwise Z=0

OR
Z=X + Y Z=1 if X=1 or if Y=1, or both X=1and Y=1. Z=0 if and only if X=0 and Y=0

NOT
Z=X or Z=1 if X=0, Z=0 if X=1

Funciones bsicas

Operaciones booleanas
Boolean Addition
Logical OR operation
Ex 4-1) Determine the values of A, B, C, and D that make the sum term A+B+C+D Sol) all literals must be 0 for the sum term to be 0 A+B+C+D=0+1+0+1=0 A=0, B=1, C=0, and D=1

Boolean Multiplication
Logical AND operation
Ex 4-2) Determine the values of A, B, C, and D for ABCD=1 Sol) all literals must be 1 for the product term to be 1

ABCD=1010=1 A=1, B=0, C=1, and D=0

Identidades bsicas

Propiedades del lgebra de Boole


Propiedad commutativa El orden de los literales no importa
A+B=B+A

AB=BA

Propiedades del lgebra de Boole


Propiedad asociativa:
A + (B + C) = (A + B) + C (=A+B+C)

A(BC) = (AB)C (=ABC)

Propiedades del lgebra de Boole


Propiedad distributiva : A(B + C) = AB + AC

Propiedades del lgebra de Boole


(A+B)(C+D) = AC + AD + BC + BD

Teorema de DeMorgan
Teorema de

DeMorgan F(A,A, , + , 1,0) = F(A, A, + , ,0,1)

(A B) = A + B and (A + B) = A B

Teorema de DeMorgan

Anlisis de circuitos lgicos


Expresin Booleana de un circuito lgico:

Tabla de verdad de un circuito lgico


A(B+CD)=AB(C+C) (D+D) +A(B+B)CD =ABC(D+D) +ABC(D+D) +ABCD+ABCD =ABCD+ABCD+ABCD+ABCD +ABCD+ABCD =ABCD+ABCD+ABCD+ABCD +ABCD
A(B+CD)=m11+m12+m13+m14+m15 =(11,12,13,14,15)
A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 Input B C 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 Output A(B+CD) 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1

Simplificacin usando lgebra Booleana


Usando lgebra Booleana , simplificar la expresin: AB+A(B+C)+B(B+C) Sol) AB+AB+AC+BB+BC =B(1+A+A+C)+AC=B+AC

Mapas de Karnaugh (*)


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

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

2-input Karnaugh Map This has 4 entries on the Truth Table and so the Karnaugh Map has 4 squares A 0 0 1 1 B 0 1 0 1 Y 0 B A 0 1 Y

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.
(*) Fuente: Logic Equation Simplification. University of Wales, Newport

STEP ONE of the simplification process would be to fill in the Karnaugh Map (Note: we normally only transfer 1s onto the map.)

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

STEP TWO is to group the 1s. 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 1s 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 1s which have all been previously grouped.
(*) Fuente: Logic Equation Simplification. University of Wales, Newport

STEP THREE identifies 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.
(*) Fuente: Logic Equation Simplification. University of Wales, Newport

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

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

Y A B A B A B
The Truth Table and Karnaugh Map are shown below: A B Y B A 0 1 Y

Example

0 0 1 1

0 1 0 1

0
1

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0
0 1

B 0
1 0

Y 1
0 1

B A 0 0
1

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0
0 1

B 0
1 0

Y 1
0 1

B A 0 0
1 1

1
1 1

STEP 1

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0
0 1 1

B 0
1 0 1

Y 1
0 1 1

B A 0
1

0
1

1
1 1

STEP 2

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0
0 1 1

B 0
1 0 1

Y 1
0 1 1

B A 0
1

0
1

1
1 1

STEP 3

A 1 and 0 so no A B always 0 so not B Expression B

A always 1 so A B 1 and 0 so no B Expression

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0
0 1 1

B 0
1 0 1

Y 1
0 1 1

B A 0
1

0
1

1
1 1

STEP 4 Complete expression:

Y A B

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

3-input Karnaugh Map This has 8 entries on the Truth Table and so the Karnaugh Map has 8 squares A 0 0 0 0 1 1 1 1 B 0 0 1 1 0 0 1 1 C 0 1 0 1 0 1 0 1 Y 0 1 A 0 C B 0 0 1 1 1 1 0

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

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

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

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

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

0 0 0 0 1 1 1 1

0 0 1 1 0 0 1 1

0 1 0 1 0 1 0 1

1 0 0 1 1 1 1 1

C B 0
1

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0 0 0 0 1 1 1 1

B 0 0 1 1 0 0 1 1

C 0 1 0 1 0 1 0 1

F 1 0 0 1 1 1 1 1

A 0 C B 0

0 1

1 1 1 1 1

1 0

F 1
1

0
1

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0 0 0 0 1 1 1 1

B 0 0 1 1 0 0 1 1

C 0 1 0 1 0 1 0 1

F 1 0 0 1 1 1 1 1

A 0 C B 0

0 1

1 1 1 1 1

1 0

F 1
1

0
1

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0 0 0 0 1 1 1 1

B 0 0 1 1 0 0 1 1

C 0 1 0 1 0 1 0 1

F A 0 1 C B 0 0 0 1 0 1 1 1 1 A 1 and 0 so no A 1B always 0 so not B 1C always 0 so not C Expression B C


A 1 and 0 so no A B always 1 so B C always 1 so C Expression BC

0 1

1 1 1 1 1

1 0

F 1
1

A always 1 so A B 1 and 0 so no B C 1 and 0 so no C Expression A

A 0 0 0 0 1 1 1 1

B 0 0 1 1 0 0 1 1

C 0 1 0 1 0 1 0 1

F 1 0 0 1 1 1 1 1

A 0 C B 0

0 1

1 1 1 1 1

1 0

F 1
1

0
1

Complete expression

F A BC BC

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

Example Three 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 0 0 0 0 1 1 1 1

B 0 0 1 1 0 0 1 1

C 0 1 0 1 0 1 0 1

A C B 0
1

0 0

0 1

1 1

1 0

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

B 0 0

C 0 0

D 0 1

A CD B

0 0

0 1

1 1

1 0 Y

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

0 0

0
0 0 0

0
0 1 1

1
1 0 0

0
1 0 1

00
01 11 10

0
0 1 1 1 1 1 1 1 1

1
1 0 0 0 0 1 1 1 1

1
1 0 0 1 1 0 0 1 1

0
1 0 1 0 1 0 1 0 1
(*) Fuente: Logic Equation Simplification. University of Wales, Newport

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

A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1

C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1

D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

A CD B

0 0

0 1

1 1

1 0

00 01 11

10

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

Example Four 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.

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1

C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1

D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

Y 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1

A CD B

0 0

0 1

1 1 1 1

1 0

00
01 11

1 1 1

1 1

10

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1

C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1

D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

Y 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1

A CD B

0 0

0 1

1 1 1 1

1 0

00
01 11

1 1 1

Now form groups

1 1

10

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

AC

A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

B C D Y 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 A 1 and 0 so no A 1 1 0 0 B always 1 so B 1 11so C 1 C1always 0 1 0so D 0 D0always 0 0 1 1 Expression 0 1 0 B1 C D 0 1 1 1 1 0 0 1 1 0 1 1 1 1 0 1 1 1 1 1

A CD B

0 0

0 1

1 1 1 1

1 0

00
01 11

Identify groups
1 1 1

1 1

10

A always 1 so A B 1 and 0 so no B C 1 and 0 so no C D always 1 so D Expression

A D

A always 1 so A B always 1 so B C 1 and 0 so no C D 1 and 0 so no D Expression

A B

A always 1 so A B 1 and 0 so no B C always 1 so C D 1 and 0 so no D Expression

AC

AC

A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1

C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1

D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

Y 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1

A CD B

0 0

0 1

1 1 1 1

1 0

00
01 11

1 1 1

1 1

10

Boolean Expression

Y A B A C A D B C D
(*) Fuente: Logic Equation Simplification. University of Wales, Newport

Example Two 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
(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1

B 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1

C 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1

D 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1

A 0 CD B 0 00

0 1

1 1

1 0

01
11 10

(*) Fuente: Logic Equation Simplification. University of Wales, Newport

A CD B 00 01 11 10

0 0

0 1

1 1

1 0 L

A CD B 00 01 11 10

0 0

0 1

1 1

1 0 E

Expression G Expression L

Expression E
(*) Fuente: Logic Equation Simplification. University of Wales, Newport

También podría gustarte