4. computer maths and logic 4.2 boolean logic 4.2.3 simplifying boolean expressions

Post on 05-Jan-2016

214 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

4. Computer Maths and Logic

4.2 Boolean Logic

4.2.3 Simplifying Boolean Expressions

Complex expressions can be constructed using the operators e.g. (A B) • (C + D), which is equivalent to writing (A xor not B) and (neither C nor D nor both).

In the exam, you will not have to consider more than 3 inputs

Complex Expressions

To evaluate a complex Boolean expression, break it down to smaller parts then use a truth table e.g. firstly (A B):

Complex Expressions

1011

0101

0010

1100

(A B)BBA

OutputIntermediate

Inputs

Complex Expressions

There’s a worksheet to help you evaluate the rest of the expression

Draw similar truth tables for A + B and A • B.

Truth tables can be used as a means of checking if two expressions are equivalent.

Complex Expressions

Complex expressions can often be reduced to simpler ones

This is similar to work you have done in algebra in maths

Look out for the following expressions which are always true

Simplifying Expressions

A • 0 = 0 A + 1 = 1

Simplifying Expressions

A • 1 = A A + 0 = A

Simplifying Expressions

A + A = A A • A = A

Simplifying Expressions

A • B = B • A A + B = B + A (the commutative law)

Simplifying Expressions

A • (B • C) = (A • B) • C = A • B • C

(the associative law)

Simplifying Expressions

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

(the associative law)

Simplifying Expressions

A • (B + C) = A•B + A•C

(A + B) • (A + C) = A•A + A•C + B•A + B•C

(the distributive law) Verify these with truth tables

Simplifying Expressions

A + A = 1 A • A = 0

(De Max's laws)

Simplifying Expressions

A + B = A • B A + B = A • B

De Morgen's lawVerify these with truth tables

Simplifying Expressions

anything in brackets is done first

• is done before +

Simplifying Expressions

top related