basic gates 1.1 basic digital logic: and, or and not gates ©paul godin created august 2007 last...

Post on 18-Jan-2016

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Basic Gates 1.1

Basic Digital Logic:AND, OR and NOT gates

©Paul GodinCreated August 2007

Last Update Sept 2013

Basic Gates 1.2

Digital Logic: Introduction

◊ The foundation of digital systems is the ability to make logic-based decisions on input states.

◊ Boolean Algebra is a relatively simple mathematic form based on logic functions comprising of two states: true (logic 1) or false (logic 0). It is used to describe output states based on a set of input states.

◊ Boolean mathematics has been around for over a hundred years but much of it is well suited to digital systems.

Boolean logic is used in internet search engines.

Basic Gates 1.3

Truth Tables

Truth tables describe the function of a digital device. They show the output states based on input states.

Input Output

0 0 0

0 1 1

1 0 1

1 1 1

Every possible input combination

Basic Gates 1.4

Basic Digital Logic Functions

Digital logic is based on 3 primary functions (the Basic Gates):

AND

OR

NOT

Basic Gates 1.5

The AND Operation

ANDAll inputs must be True for the output to be True.

◊ Other ways to describe AND:◊ If all inputs are 1 the output is 1◊ If any input is 0, the output is 0◊ “If this input AND this input are 1, the output is 1”

Basic Gates 1.6

AND Logic Symbol

Inputs Output

If all inputs are 1, the output is 1

If any input is 0, the output is 0

Basic Gates 1.7

AND Logic Symbol

Inputs Output

Determine the output

0

0

Basic Gates 1.8

AND Logic Symbol

Inputs Output

Determine the output

0

1

Basic Gates 1.9

AND Logic Symbol

Inputs Output

Determine the output

1

1

Basic Gates 1.10

AND Truth Table

Input Output

0 0 0

0 1 0

1 0 0

1 1 1

AND

Basic Gates 1.11

AND Gates

It is possible to have AND gates with more than 2 inputs. The same logic rule applies – all inputs must be 1 for the output to be 1.

Basic Gates 1.12

AND Gates

◊ IEEE symbol for an AND gate

◊ Boolean equations for an AND gate:A●B = xAB = x

&

The AND operation operates similarly to multiplication.

Basic Gates 1.13

The OR Operation

ORIf any input is True, the output is True

Other ways to describe OR:◊ if any input is 1, the output is 1◊ if all inputs are 0, the output is 0◊ “If this input OR this input is 1, the output is 1”

Basic Gates 1.14

OR Logic Symbol

Inputs Output

If any input is 1, the output is 1

If all inputs are 0, the output is 0

Basic Gates 1.15

OR Logic Symbol

Inputs Output

Determine the output

0

0

Basic Gates 1.16

OR Logic Symbol

Inputs Output

Determine the output

0

1

Basic Gates 1.17

OR Logic Symbol

Inputs Output

Determine the output

1

1

Basic Gates 1.18

OR Truth Table

Input Output

0 0 0

0 1 1

1 0 1

1 1 1

OR

Basic Gates 1.19

OR Gates

It is possible to have OR gates with more than 2 inputs. The same logic rule applies – If any input is 1, the output is 1.

Basic Gates 1.20

OR Gates

◊ IEEE symbol for an OR gate

◊ Boolean equation for an OR gate:A+B = x

≥1

The OR operation operates similarly to Addition.

Basic Gates 1.21

The NOT Operation

NOTThe output is the opposite state of the input.

◊Other ways to describe NOT:◊ If any input is 1, the output is 0◊ If any input is 0, the output is 1

The NOT function is often called INVERTER or COMPLIMENTARY.

Basic Gates 1.22

NOT Logic Symbol

Input Output

If the input is 1, the output is 0

If the input is 0, the output is 1

Note: The “bubble” on the output is considered the NOT function.

Basic Gates 1.23

NOT Logic Symbol

Input Output

Determine the output

0

Basic Gates 1.24

NOT Logic Symbol

Input Output

Determine the output

1

Basic Gates 1.25

NOT Truth Table

Input Output

0 1

1 0

NOT

Basic Gates 1.26

NOT Gates

◊ IEEE symbol for a NOT gate:

◊ Boolean for a NOT function:A = x (overbar symbol)A’ = x (prime symbol)

1

Note: The triangle symbol on the output is considered the NOT function

Basic Gates 1.27

Alternate Symbols

◊ The NOT is the “bubble” on the gate.

◊ Alternate symbols for the NOT gate:

1

Basic Gates 1.28

Review 1

◊ There are 3 basic gates:

◊ AND, where all inputs must be high for a high output

◊ OR, where any input must be high for a high output

◊ NOT, where the output is the opposite (compliment) of the input

Basic Gates 1.29

Review 2

AND Logic Symbol

OR Logic Symbol

NOT (or Inverter) Logic Symbol

Basic Gates 1.30

Review 3

A ● B = Y AB = Y

A + B = Y

A = YA’ = Y

A AND B = Y

A OR B = Y

NOT A = Y

Basic Gates 1.31

Exercise 1

What is the outcome of the following:

1

1

0

1

0

1

1

Basic Gates 1.32

Exercise 2

Complete the sentences:

◊ If all inputs of an OR gate are low, the output is_________

◊ If any input of an AND gate is low, the output is _________

◊ The output of a NOT gate is always the ___________ of the input.

Basic Gates 1.33

Exercise 3

Complete the tablesInput Output

0 0

0 1

1 0

1 1

≥1

Input Output

0 0

0 1

1 0

1 1

&

Basic Gates 1.34

Exercise 4

Draw the logic equivalent of the AND and the OR gates using switches.

Basic Gates 1.35

Exercise 5

A vehicle has 2 proximity sensors and one motor. When triggered, the sensors produce a logic 1.

The motor goes forward with a logic 0 and stops with a logic 1.

If both sensors sense an object, stop. If only one, or none of the sensors sense an object, go forward.

Draw the sensors, motor and the logic needed. (Hint: do a truth table)

Basic Gates 1.36

End

©Paul R. Godinprgodin°@ gmail.com

top related