logic circuits in today’s lesson we will look at: the symbols for not, and, or and eor using truth...

10
Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators – NAND and NOR using equivalence to simplify

Upload: mitchell-freeman

Post on 24-Dec-2015

215 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

Logic Circuits

In today’s lesson we will look at:

• the symbols for NOT, AND, OR and EOR

• using truth tables to represent logic circuits

• two new operators – NAND and NOR

• using equivalence to simplify circuits

• the “half-adder” circuit

Page 2: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

Logic Circuits

• You might sometimes see diagrams that look like electrical circuits, but which contain symbols for Boolean operators – these are called logic circuits.

• Each logical operation has its own symbol:

NOT

Page 3: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

Example Circuit• Symbols are combined and

inputs labelled:

• Output can be shown using truth tables:

D

NOT

AND

OR

A B C D

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

Page 4: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

NAND and NOR

• With logic circuits, there are two new operators that you might come across – NAND and NOR:

• Their names are short for NOT AND and NOT OR, which reminds us what they do.

• NAND behaves like AND with a NOT after it, and NOR behaves like an OR with a NOT after it - i.e. the results are the opposite of a normal AND and OR.

Page 5: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

Truth Table - NOR

The NOR operator gives a false result if any of the input values is true, e.g.

a b a OR b

0 0 0

0 1 1

1 0 1

1 1 1

a NOR b

1

0

0

0

Page 6: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

Truth Table - NAND

The NAND operator gives a false result if both of the input values are true, e.g.

a b a AND b

0 0 0

0 1 0

1 0 0

1 1 1

a NAND b

1

1

1

0

Page 7: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

Why Use NAND and NOR?

• Remember DeMorgan’s Duals from last week?

– NOT(a OR b) = NOT a AND NOT b

– NOT(a AND b) = NOT a OR NOT b

• The left-hand part of those equivalences are NOR and NAND, so they can be used to make logic circuits simpler.

• Also, NAND is easy to manufacture because a single transistor behaves like a NAND gate, so circuits using NAND can be both logically and physically simpler and more efficient.

Page 8: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

Simplification

• Look at this circuit – it uses three components:

• It represents the operation

Y = NOT A OR NOT B

• However, from the previous slide, we know that:

NOT(a AND b) = NOT a OR NOT b

• We also know that NOT(a AND b) is the same as a NAND b, so the wholecircuit can be simplified toa single NAND gate:

YB

A

Page 9: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

Another Example

A B C Output

0 0 0

0 0 1

0 1 0

0 1 1

1 0 0

1 0 1

1 1 0

1 1 1

AND

NAND

OR• What is the output of this logic circuit?

Page 10: Logic Circuits In today’s lesson we will look at: the symbols for NOT, AND, OR and EOR using truth tables to represent logic circuits two new operators

Half-Adder

A B D E S C

0 0

0 1

1 0

1 1

• What is the outputof this circuit?

• This circuit performs binary addition (C = carry)

• It also has a simpler equivalent: