CA Lecture 5a: Digital Logic - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

CA Lecture 5a: Digital Logic

Description:

The digital logic level the computer's real hardware are constructed from logic gates. ... e.g. a vending machine controller. 5. Combinational Logic Unit ... – PowerPoint PPT presentation

Number of Views:90
Avg rating:3.0/5.0
Slides: 21
Provided by: spa951
Category:

less

Transcript and Presenter's Notes

Title: CA Lecture 5a: Digital Logic


1
CA Lecture 5a Digital Logic
  • Combinational Logic,
  • Truth table,
  • Logic gates
  • Read Appendix A of textbook p441 p447

2
Digital logic level
  • The digital logic level the computers real
    hardware are constructed from logic gates.
  • Logic gates are actually made from transistors,
    capacitors and wires etc. see diagrams in next
    slide.
  • A circuit is a combination of logic gates.
  • Different combinations of logic gates can make up
    circuits for doing arithmetic, CPUs and memory
    units.
  • This subject is on the boundary of computer
    science and electrical engineering.

3
Inside logic gates
4
Definitions
  • Combinational logic a digital logic circuit in
    which logical decisions are based only on
    combinations of the current inputs.
  • Sequential logic a digital logic circuit in
    which logical decisions are based on combinations
    of the current inputs as well as the past history
    of inputs, e.g. a memory unit.
  • Finite state machine a circuit which has an
    internal state, and whose outputs are functions
    of both current inputs and its internal state.
    e.g. a vending machine controller.

5
Combinational Logic Unit
  • A combinational logic unit (CLU) translates a set
    of inputs into a set of outputs according to one
    or more mapping functions.
  • Inputs and outputs for a CLU normally have two
    distinct (binary) values high and low, 1 and 0,
    0 and 1, or 5 V and 0 V for example.
  • The outputs of a CLU are strictly functions of
    the inputs, and the outputs are updated
    immediately after the inputs change.

6
Combinational Logic Unit Cont.
  • A set of inputs i0 - in are presented to the CLU,
    which produces a set of outputs according to
    mapping functions f0 - fm.

7
Truth Table
  • Developed in 1854 by George Boole and further
    developed by Claude Shannon at Bell laboratory.
  • A truth table captures logical relationships in a
    tabular form. Outputs are computed for all
    possible input combinations.
  • In a truth table, all possible input combinations
    of binary variables are enumerated and a
    corresponding output value of 0 and 1 is assigned
    for each input combination.

8
Truth Table Cont.
  • Consider a room with two light switches.
  • Truth table of the switches A, B, and the light
    Z.

9
Truth Table Cont.
  • An alternate assignment of the outputs and the
    truth table.

10
Truth Table Cont.
  • We can make the assignment of output values to
    input combinations any way that we want to
    achieve the desired input-output behaviour.
  • In general, for n inputs, there are 2n input
    combinations, and 22n possible assignments of
    output values to input combinations.

11
Logic Gates
  • If we enumerate all possible assignments of
    switch settings for two input variables, we will
    obtain 16 assignments, shown in next slide.
  • The assignments are referred to as Boolean logic
    functions.
  • In a Boolean logic function, 1 means true and 0
    means false.

12
Truth Tables Showing All Possible Functions of
Two Binary Variables
13
Logic Gates Cont.
  • The AND function is true only when A and B are
    true. Denoted as AB.
  • The OR function is true when A or B is true or
    when both A and B are true. Denoted as A B.
  • The False function is always false.
  • The True function is always true.
  • A variables complement is true if the variables
    value is false and vice versa. Denoted as

14
Logic Gates Cont.
  • The NAND and NOR are the complements of AND and
    OR.
  • The XOR (exclusive-OR) function is true when
    either of its inputs, but not both, is true. In
    general, XOR produces a 1 at its output whenever
    the number of 1s at its inputs is odd.
  • The XNOR is the complement XOR.

15
Logic Gates Cont.
  • A logic gate is a physical device (see slide 3)
    that implements a simple Boolean function.
  • Each logic gate has a symbol. For each functions,
    A and B are binary inputs and F is the output.
  • The buffer simply copies its input to its output.
  • A NOT gate is also called an inverter. The circle
    at the output of the NOT gate denotes the
    complement operation.

16
Logic Gates Cont.
17
Logic Gates Cont.
18
Logic Gates Cont.
19
Common Notations Used at Circuit Intersections
20
Tutorial four questions
  • There exist 4 boolean functions of a single
    binary variable and 16 functions of 2 binary
    variables. How many functions of 3 binary
    variables?
  • Use a truth table to show that
  • P (P and Q) OR (P and NOT Q)
  • Textbook appendix A A.4, A.6, A.7
Write a Comment
User Comments (0)
About PowerShow.com