CSE 1520 Computer Use: Fundamentals - PowerPoint PPT Presentation

About This Presentation
Title:

CSE 1520 Computer Use: Fundamentals

Description:

Gates and Circuits * What is a gate ? A gate is a device that performs a basic operation on electrical signals What is circuit ? Gates are combined to form ... – PowerPoint PPT presentation

Number of Views:171
Avg rating:3.0/5.0
Slides: 25
Provided by: hof127
Category:

less

Transcript and Presenter's Notes

Title: CSE 1520 Computer Use: Fundamentals


1
  • Week 6 Gates and Circuits PART I
  • READING Chapter 4

2
Gates and Circuits
EECS 1520 -- Computer Use Fundamentals
  • What is a gate?
  • A gate is a device that performs a basic
    operation on electrical signals
  • What is circuit?
  • Gates are combined to form different circuits
    to perform more complicated tasks

3
Gates and Circuits
EECS 1520 -- Computer Use Fundamentals
  • Three notational methods to describe the behavior
    of gates
  • Boolean expressions A form of algebra in which
    variables and functions take on only one of two
    possible values (0 and 1)
  • Logic diagrams graphical representation of a
    circuit
  • Truth tables defines the function of a gate by
    listing all possible input combination and the
    corresponding output.

4
Gates and Circuits
EECS 1520 -- Computer Use Fundamentals
  • A gate or logic gate performs only one logical
    function. Each gate accepts one or more input
    values and produces a single output value.
  • Six types of logic gates
  • NOT
  • AND
  • OR
  • XOR
  • NAND
  • NOR

5
Gates and Circuits NOT Gate
EECS 1520 -- Computer Use Fundamentals
  • Also referred to as an inverter
  • If the input value is 1, the output is 0 if the
    input value is 0, the output is 1

Logic diagram Symbol
Truth Table
Boolean Expression
  • Sometimes the mark is replaced by
    horizontal bar placed over the value

6
Gates and Circuits AND Gate
EECS 1520 -- Computer Use Fundamentals
  • If the two input values are both 1, the output is
    1 otherwise, the output is 0

Logic diagram Symbol
Truth Table
Boolean Expression
  • Sometimes the . mark is replaced by the
    asterisk symbol

7
Gates and Circuits OR Gate
EECS 1520 -- Computer Use Fundamentals
  • If both input values are both 0, the output is 0
    otherwise, the output is 1

Logic diagram Symbol
Truth Table
Boolean Expression
8
Gates and Circuits XOR or exclusive OR Gate
EECS 1520 -- Computer Use Fundamentals
  • If the two inputs are the same, the output is 0
    otherwise, the output is 1

Logic diagram Symbol
Truth Table
Boolean Expression
  • Not the difference between the XOR gate and the
    OR gate they only differ in one input situation
  • When both input signals are 1, OR gate produces a
    1 and the XOR gate produces a 0

9
Gates and Circuits NOR Gate
EECS 1520 -- Computer Use Fundamentals
  • The NOR gate is essentially the opposite of the
    OR gate. That is, the output of a NOR gate is
    the same as if you took the output of an OR gate
    and put it through a NOT gate

Logic diagram Symbol
Truth Table
Boolean Expression
10
Gates and Circuits NAND Gate
EECS 1520 -- Computer Use Fundamentals
  • The NAND gate is the opposite of the AND gate.

Logic diagram Symbol
Truth Table
Boolean Expression
11
Transistors
EECS 1520 -- Computer Use Fundamentals
  • How do we implement the gates?
  • A gate uses one or more transistors to establish
    how the input values map to the output value
  • A transistor acts like a switch.
  • It either turns on to conduct electricity or
    turns off to block the flow of electricity

12
Transistors
EECS 1520 -- Computer Use Fundamentals
  • A transistor has three terminals source, base
    and emitter

source
output
base
emitter
  • When an electrical signal is grounded, it has 0
    volts!
  • If the source signal is pulled to ground, the
    output signal is low output is 0
  • If the source signal remains high, the output
    signal is high output is 1

13
Transistors NOT Gate
EECS 1520 -- Computer Use Fundamentals
  • The output is determined by the base electrical
    signal.

source
Vout
Vin Vout
1 0
0 1
base
Vin
emitter
  • If Vin is high, the source is pulled to ground
    and Vout is low (i.e. 0)
  • If Vin is low, the source is not grounded and
    Vout is high (i.e. 1)

NOT Gate needs 1 transistor
14
Transistors NAND Gate
EECS 1520 -- Computer Use Fundamentals
source
Vout
Vin1 Vin2 Vout
0 0 1
0 1 1
1 0 1
1 1 0
Vin1
Vin2
emitter
  • If Vin1 and Vin2 are high, the source is pulled
    to ground and Vout is low (i.e. 0)
  • If Vin1 and Vin2 are low, the source is not
    grounded and Vout is high (i.e. 1)
  • If either Vin1 or Vin2 is low, the source is not
    grounded and Vout is high (i.e. 1)

NAND Gate needs 2 transistors
15
Transistors NOR Gate
EECS 1520 -- Computer Use Fundamentals
source
Vin1 Vin2 Vout
0 0 1
0 1 0
1 0 0
1 1 0
Vout
Vin1
Vin2
emitter
emitter
  • If Vin1 and Vin2 are high, the source is pulled
    to ground and Vout is low (i.e. 0)
  • If Vin1 and Vin2 are low, the source is not
    grounded and Vout is high (i.e. 1)
  • If either Vin1 or Vin2 is low, the source is
    grounded and Vout is low (i.e. 0)

NOR Gate needs 2 transistors
16
Transistors OR Gate
EECS 1520 -- Computer Use Fundamentals
  • Since OR gate is the opposite of NOR gate, how
    many transistors would you think will be required
    to implement the OR gate?

OR Gate needs 3 transistors
17
Combinational Circuits
EECS 1520 -- Computer Use Fundamentals
  • Gates are combined into circuits by using the
    output of one gate as the input for another gate.
  • For example

18
Combinational Circuits
EECS 1520 -- Computer Use Fundamentals
  • For example

Logic diagram Symbol
Truth Table
  • Since there are 3 inputs, there are 8 possible
    outcomes

19
Combinational Circuits
EECS 1520 -- Computer Use Fundamentals
  • For example

Logic diagram Symbol
Boolean expression
  • D A B
  • E AC
  • X AB AC

20
Combinational Circuits
EECS 1520 -- Computer Use Fundamentals
  • Now, we want to investigate the following Boolean
    expression

X A(BC)
  • How do we want to create the logic diagram
    (called circuit 2) of the above Boolean
    expression?

- We have an inner function which consists of an
OR gate between B and C - We then have an
outer function which is an AND gate between
A and (BC)
Logic diagram Symbol (circuit 2)
A(BC)
BC
21
Combinational Circuits
EECS 1520 -- Computer Use Fundamentals
  • We have the following

X A(BC)
Boolean expression
Logic diagram Symbol
A(BC)
BC
A B C BC A(BC)
0 0 0
0 0 1
0 1 0
0 1 1
1 0 0
1 0 1
1 1 0
1 1 1
A B C BC A(BC)
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 1
A B C BC A(BC)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
Truth table
22
Combinational Circuits
EECS 1520 -- Computer Use Fundamentals
  • Circuit 1
  • Circuit 2

A(BC)
BC
A B C BC A(BC)
0 0 0 0 0
0 0 1 1 0
0 1 0 1 0
0 1 1 1 0
1 0 0 0 0
1 0 1 1 1
1 1 0 1 1
1 1 1 1 1
A B C D E X
0 0 0 0 0 0
0 0 1 0 0 0
0 1 0 0 0 0
0 1 1 0 0 0
1 0 0 0 0 0
1 0 1 0 1 1
1 1 0 1 0 1
1 1 1 1 1 1
  • Their results are identical!

23
Combinational Circuits
EECS 1520 -- Computer Use Fundamentals
  • We have therefore demonstrated circuit equivalence
  • That is, both circuits produce the same results
    for each input combination
  • Boolean algebra allows us to apply provable
    mathematical principles to help us design logical
    circuits
  • From the previous example

X AB AC A(BC)
24
Properties of Boolean Algebra
EECS 1520 -- Computer Use Fundamentals
  • DeMorgans law, in particular, is very useful in
    Boolean algebra.
  • For instance, it means that

___ ___ ___
1 NAND gate is equivalent to 2 NOT gates with an
OR gate
Write a Comment
User Comments (0)
About PowerShow.com