+ All Categories
Home > Documents > Basic Logical Operations...

Basic Logical Operations...

Date post: 14-Oct-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
10
James Tam Basic Logical Operations (fascinating) In this section you will learn what are the basic logical operations and how to evaluate different expressions
Transcript
Page 1: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Basic Logical Operations (fascinating)

In this section you will learn what are the basic logical operations and how to evaluate different expressions

Page 2: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Logical AND

Truth table

TrueTrueTrue

FalseFalseTrue

FalseTrueFalse

FalseFalseFalse

X AND Y

YX

Logic gate

Truth table

111

001

010

000

X AND YYX

Page 3: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Logical OR

Truth table

TrueTrueTrue

TrueFalseTrue

TrueTrueFalse

FalseFalseFalse

X OR YYX

Truth table

111

101

110

000

X OR YYX

Logic gate

Page 4: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Logical NOT

Truth table

FalseTrue

TrueFalse

YX

Logic gate

Truth table

01

10

YX

Page 5: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Logical NANDTruth table

True

False

False

False

X AND Y

False

True

True

True

X NAND Y

TrueTrue

FalseTrue

TrueFalse

FalseFalse

YX

Logic gate

Truth table

1000

X AND Y

0111

X NAND Y

11011000

YX

Page 6: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Logical NORTruth table

True

True

True

False

X OR Y

False

False

False

True

X NOR Y

TrueTrue

FalseTrue

TrueFalse

FalseFalse

YX

Truth table

1110

X OR Y

0001

X NOR Y

11011000YX

Logic gate

Page 7: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Logical Exclusive OR (XOR)

Truth table

FalseTrueTrue

TrueFalseTrue

TrueTrueFalse

FalseFalseFalse

X XOR YYX

Logic gate

Truth table

000

101

110

000

X XOR YYX

Page 8: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Why Bother With Logic (Gates And Computers)?

Bill Gates, Chairman and Chief Software Architect of Microsoft™

Page 9: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Reasons For Learning About Logic

Hardware perspective

The computer is built using logic circuits

User perspective

Logic is used everyday

Page 10: Basic Logical Operations fascinatingpages.cpsc.ucalgary.ca/~tamj/2002/231P/notes/numbers/logic.pdf · Y X Y Logic gate Truth table 1 1 1 1 0 0 0 1 0 0 0 0 X Y X AND Y. James Tam Logical

James Tam

Summary

The different types of logical operations that a computer may perform• AND• OR• NOT• NAND• NOR• XOR

How logic gates form an important part of computers


Recommended