Computer Logic - PowerPoint PPT Presentation

1 / 26
About This Presentation
Title:

Computer Logic

Description:

Boole approached logic in a new way reducing it to a simple algebra, ... You can only get into the night club if you have a coloured suit. True. Get into Club ... – PowerPoint PPT presentation

Number of Views:15
Avg rating:3.0/5.0
Slides: 27
Provided by: chak1
Category:

less

Transcript and Presenter's Notes

Title: Computer Logic


1
Computer Logic Logic Gates
  • Justin Champion

2
IITCT
  • Contents
  • Introduction to Logic
  • Look at the different Logic Gates
  • Summary

3
IITCT - Logic
George Boole 1815 to 1864
Boole approached logic in a new way reducing it
to a simple algebra, incorporating logic into
mathematics. He also worked on differential
equations, the calculus of finite differences and
general methods in probability.
4
IITCT - Logic
  • Boolean Logic
  • Something is either
  • True or False
  • 1 or 0
  • Correct or Wrong
  • Computers use this to make decisions
  • A computer is basically a large number of
    switches
  • Each of these can be either in the state of on
    (1) or off (0)
  • We do use this kind of logic every single day

5
IITCT
  • You can only get into the night club if you have
    a coloured suit

True Get into Club
False Refused Entry to Club
6
IITCT
  • Logic
  • As seen you use this all the time
  • If (suit coloured) then
  • Entry to club
  • Else
  • Refused Entry
  • You can also put multiple conditions together
  • Conditional Logic
  • If (Suit Coloured and hat on the head) then
  • Entry to club
  • Else
  • Refused Entry

7
IITCT
  • You can only get into the club if you have a
    coloured suit and a hat on your head!

False Refused
True Accepted
False Refused
False Refused
8
IITCT
  • All of the previous are examples of Boolean Logic
  • Basic Logic Conditions Available
  • AND
  • OR
  • NOT
  • Logic Symbols used in diagrams
  • AND .
  • OR
  • NOT

9
IITCT
  • Use of The Logic Symbols
  • If person wearing a Jacket AND a tie then enter
  • Entry Jacket.Tie
  • If person wearing a jacket which is NOT white AND
    a tie then enter
  • Entry (jacket.white).tie

10
IITCT
  • What you have seen is every day examples of Logic
  • This is exactly what is used inside of computers
    to make decisions
  • The following section will look at the formal
    method describing truth tables
  • This is no more complicated than the previous
    examples
  • It is just a matter of realising this fact

11
IITCT
  • Switches
  • To represent the logic of 1 and 0 we use switches
    which turn off (0) and on (1)
  • These switches are referred to as transistors

Flow
12
IITCT
  • Processors use large numbers of these transistors
    to make decisions
  • AMD 3200 processor has 54.3 Million transistors!

13
IITCT
  • Example Truth Tables

A B A.B AB A AB
0 0 0 0 1 1
0 1 0 1 1 0
1 1 1 1 0 0
1 0 0 1 0 0
AND
OR
NOT
NOT (A or B)
14
IITCT
  • To create a truth table first of all list all of
    the conditions
  • For binary values the number of unique conditions
    will be
  • 2 number of conditions
  • So for this example it will 22 giving 4 unique
    conditions
  • For 3 conditions it will be 23 giving 8 unique
    conditions

A B
0 0
0 1
1 1
1 0
15
IITCT
  • Try a truth table yourself
  • Create a truth table for
  • If man has long hair and not a member entry
    refused

16
IITCT
  • Answer
  • Create a truth table for
  • If person has long hair and not a member entry
    refused

Long Hair Member Not Member Long Hair.Member
0 1 0 Accepted
0 0 1 Accepted
1 1 0 Accepted
1 0 1 Refused
17
IITCT
  • What this logic looks like in electrical circuits
  • First the truth table

A B X
0 0 0
0 1 0
1 0 0
1 1 1
18
IITCT
  • What this logic looks like in electrical circuits
  • X A.B
  • A 0, B 0, X0 Light is off

AND Gate
19
IITCT
  • What this logic looks like in electrical circuits
  • X A.B
  • A 1, B 1, X1 Light is on

AND Gate
20
IITCT
  • The logic used can also be drawn out on a diagram

21
IITCT
  • And Gate - X A.B

22
IITCT
A B X (A.B)
0 0 0
0 1 1
1 0 1
1 1 1
  • Alarm System
  • A Alarm Set
  • B Door Sensor Opened
  • X Alarm Sounding

23
IITCT
  • OR Example
  • X A B

Alarm Set A Window Opened B IR Sensor Detects
movement X Alarm Sounding
A B X
0 0 0
0 1 1
1 0 1
1 1 1
24
IITCT
  • The Boolean logic gates we have discussed are NOT
    exhaustive
  • There are a lot more gates which can be used with
    increasing complexity
  • Example
  • XOR
  • XAND
  • Later on in the course these logic gates will be
    used to carry out mathematical functions

25
IITCT
  • Why we learn this
  • Boolean logic is used in electronics and
    computers to carry out actions
  • Programming Languages use this logic to test
    conditions
  • It is the basis of all computing

26
IITCT
  • Summary of what we have discussed
  • Boolean Logic
Write a Comment
User Comments (0)
About PowerShow.com