logic gates & boolean algebra. introduction certain components (called logic elements) of the...

6
Logic gates & Boolean Algebra

Upload: joanna-lester

Post on 11-Jan-2016

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric

Logic gates & Boolean Algebra

Page 2: Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric

Introduction

• Certain components (called logic elements) of the computer combine electric pulses using a set of rules.

• Electric pulses are called digital signal.

• Digital signals have 2 voltage levels: HIGH (binary 1) and LOW (binary 0).

• Binary 1 = true or on.

• Binary 0 = false or off.

Page 3: Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric

Primary logic gates• OR gate

– Output is 1 if any of its input is 1

• AND gate– Output is 1 if all of its input is 1

• NOT gate– Output is the reverse of the input. Has one input and one output.

A B Y

0 0 0

0 1 1

1 0 1

1 1 1

Truth Table

A B Y

0 0 0

0 1 0

1 0 0

1 1 1

Truth Table

A Y

0 1

1 0Truth Table

Y = A + B

Y = A . B

Y = Ā

Page 4: Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric

Secondary logic gates• NOR gate

– Output is 1 if all of its input is 0

• NAND gate– Output is 0 if all of its input is 1

• EXOR gate– Output is 1 if the inputs are different.

A B Y

0 0 1

0 1 0

1 0 0

1 1 0

Truth Table

A B Y

0 0 1

0 1 1

1 0 1

1 1 0

Truth Table

Truth Table

Y = A + B

Y = A . B

Y = A B

A B Y

0 0 0

0 1 1

1 0 1

1 1 0

Page 5: Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric

Boolean algebra & logic simplification

• Logic circuits can be simplified by Boolean algebra.

• Boolean theorems are used to simplify circuits.

• Basic theorems:OR NOTAND

A + 0 = A

A + 1 = 1

A + A = A

A + Ā = 1

A . 0 = 0

A . 1 = A

A . A = A

A . Ā = 0

A = A

Page 6: Logic gates & Boolean Algebra. Introduction Certain components (called logic elements) of the computer combine electric pulses using a set of rules. Electric

• Other theorems:A + B = B + A

A . B = B . A

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

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

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

A + A . B = A

• Operator Precedence– ( ), NOT, AND, OR

– Example, A + B . C = A + (B . C)

– Example, Ā . Ī = (Ā) . (Ī)

• DeMorgan’s theorem– A + B = A . B For 3 variables:- A + B + C = A . B . C

– A . B = A + B For 3 variables:- A . B . C = A + B + CA B A + B A . B A + B A B A . B A + B A . B

0 0 0 0 1 1 1 1 1 1

0 1 1 0 0 1 0 0 1 1

1 0 1 0 0 0 1 0 1 1

1 1 1 1 0 0 0 0 0 0