Digital Logic Introduction - PowerPoint PPT Presentation

1 / 27
About This Presentation
Title:

Digital Logic Introduction

Description:

... of the German U-Boats, using the 'Colossus' machine, created by Max Newman. ... The equation is read Z = A AND B. There is no limit to the number of inputs that ... – PowerPoint PPT presentation

Number of Views:67
Avg rating:3.0/5.0
Slides: 28
Provided by: bryand1
Category:

less

Transcript and Presenter's Notes

Title: Digital Logic Introduction


1
Digital Logic Introduction
  • Bryan Duggan

2
Background
  • Digital logic is at the core of all digital
    computers, from Microwaves to Mainframes, from
    the 1940s onwards
  • Much of the pioneering work was done in Blechley
    Park, by Alan Turing, Max Newman, Freddie
    Williams etc. It came out of Turings 1936 paper
    On Computable Numbers with an application to the
    Entscheidungsproblem. Turing created the idea of
    the Universal Turing Machine
  • Was used to crack the Enigma coded messages of
    the German U-Boats, using the Colossus machine,
    created by Max Newman.
  • Much of the work was destroyed, but some of the
    mathematicians went on to make the Mark 1
    computer in Manchester, the first digital
    computer created by Tom Kilburn
  • To learn more http//www.computer50.org/

3
Background Continued
  • Digital logic and the two valued number system is
    at the core of all digital computers, and yet
    it's entirely based on three fundamental
    operations, designated AND, OR, and NOT
  • There are many different ways to implement
    logical functions electronically, valves, relays,
    mercury tubes, mechanical but now exclusively
    transistors and ICs (Integrated circuits).
  • Applications in programming, hardware etc.
  • All programming languages have a concept of true
    and false, conditional evaluations, the IF
    statement. It is useful to know digital logic as
    it will make you better programmers and thinkers.

4
Background
  • Everything in the digital world is based on the
    binary number system. Numerically, this involves
    only two symbols 0 and 1. Logically, we can use
    these symbols or we can equate them with others
    according to the needs of the moment. Thus, when
    dealing with digital logic, we can specify
    that0 false no1 true  yes
  • Using this two-valued logic system, every
    statement or condition must be either "true" or
    "false" it cannot be partly true and partly
    false
  • The essential reason for basing logical
    operations on the binary number system is that it
    is easy to design simple, stable electronic
    circuits that can switch back and forth between
    two clearly-defined states, with no ambiguity
    attached. It is also possible to design and build
    circuits that will remain indefinitely in one
    state unless and until they are deliberately
    switched to the other state. This makes it
    possible to construct a machine (the computer)
    which can remember sequences of events and adjust
    its behavior accordingly. It would be difficult
    to design circuits with 10 or more states
    required to represent 0 -9 or A- Z

5
Introduction
  • At an abstract level, any digital logic system
    may be regarded as a black box, with inputs and
    outputs, (GIGO). Each input and output may be
    either 1 or 0. Voltages are used to represent
    these values. A low voltage (0V) for false and a
    high voltage for true (5V). This is because of
    the way transistors work

Digital Logic System
Outputs
Inputs
6
Introduction
  • Digital logic may be divided into two classes
    combinational logic, in which the logical outputs
    are determined by the logical function being
    performed and the logical input states at that
    particular moment and sequential logic, in which
    the outputs also depend on the prior states of
    those outputs. In other words the history of the
    inputs. Sequential logic systems are also known
    as Finite State Machines.
  • Both classes of logic are used extensively in all
    digital computers. Since both types of logic
    circuits begin with logic gates to combine
    logical input signals in various ways to produce
    the desired outputs, we will be seeing how the
    basic logic gates work.

7
Sequential Logic circuit
Combinatorial Logic
Inputs
Outputs
Memory
8
1. The Buffer Gate
  • Input of A and an output of Z
  • Although the use of the circuit is not
    immediately apparent, it is in fact widely
    used.Truth Table

Z A
A
Z
A Z 0 0 1 1
9
2. The Not Gate
  • With a not gate, the value of the input is the
    inverse or complement of the value of the input
  • It always has exactly one input as well as one
    output. Whatever logical state is applied to the
    input, the opposite state will appear at the
    output.The NOT function, as it is called, is
    necessary in many applications and highly useful
    in others. A practical verbal application might
    beThe door is NOT locked You may enter
  • The NOT function is denoted by a horizontal bar
    over the value to be invertedZ A

A
Z
10
2. The NOT Gate Continued
  • Truth TableA Z 0 1 1 0
  • The logical symbol for the NOT gate consists of
    two parts, a triangle and a circle, or bubble as
    it is called. The triangle means the element
    consists of a buffer the bubble indicates it is
    followed by an inverter. The simplicity of the
    NOT gate hides its importance, without it many
    digital logic systems would be impossible.

11
3. The And Gate
  • The AND gate implements the AND function. With
    the gate shown, both inputs must have logic 1
    signals applied to them in order for the output
    to be a logic 1. With either input at logic 0,
    the output will be held to logic 0.
  • The equation is read Z A AND B. There is no
    limit to the number of inputs that may be applied
    to an AND function, so there is no functional
    limit to the number of inputs an AND gate may
    have. The number of inputs can be increased to n
    to give an n input AND gate. The generalised
    equation then becomesZ A.B.C...

A
Z
B
Z A.B
12
3. The AND gate Continued
  • The Truth table for an AND gate looks like this
  • It has 3 columns, one for each input A and B and
    one for the output Z. There are 4 rows, since
    there are 22 4 combinations of the inputs A and
    B. The output Z will only be 1 when all the
    inputs are 1
  • Question 1 How many rows would there be for a 3
    input AND gate?
  • Question 2 How can you implement a NOT gate with
    an AND gate? (2 answers)

13
4. The OR Gate
  • The output of the OR gate is true, when either of
    the inputs A OR B is true, or when both are true.
    It looks like this
  • The OR gate is sort of the reverse of the AND
    gate. The OR function, like its verbal
    counterpart, allows the output to be true (logic
    1) if any one or more of its inputs are true.
    Verbally, we might say, "If it is raining OR if I
    turn on the sprinkler, the lawn will be wet."
    Note that the lawn will still be wet if the
    sprinkler is on and it is also raining. This is
    correctly reflected by the basic OR function.
  • As with the AND function, the OR function can
    have any number of inputs.

A
Z
B
Z A B
14
4. The OR Gate Continued
  • The truth table for an OR gate looks like this
  • The OR gate can also be generalised into the
    formZ A B CIn this case, the output Z
    is true when any of the inputs is true

15
  • Any logic circuit, no matter how complex may be
    completely described using the Boolean operations
    previously defined, because the OR gate, the AND
    gate and the NOT circuit are the basic building
    blocks of digital systems. The above operations
    are useful on their own, but are usually combined
    to make memory units, calculation units,
    registers etc
  • Question Derive the truth table for this
    circuit.

A
A.B
B
Z A.B C
C
16
Truth Table for A.B C
17
Circuits containing invertors
  • Whenever an inverter is present in a logic
    -circuit diagram, its output is simply the input
    expression with a bar over it. Question Draw
    the truth table for the following

A
Z A B
B
A
B
Z A B
18
Evaluating a Boolean Expression
  • You can evaluate a Boolean expression by
    substitution. For example, A 0, B 0, C 1,
    D 1 E 1Z D (A B)C . E
  • (72)
  • General rule for substitutions are1. Perform
    all inversions for single terms first2. Then
    perform all operations within parenthesis3.
    Perform ANDs before Ors, unless parenthesis
    dictate otherwise4. If an expression has a bar
    over it, perform the operations of the expression
    first and then invert the result.

19
Implementing a circuit from a Boolean expression
  • If the operation of a circuit is defined by a
    Boolean expression, a logic circuit diagram can
    be implemented directly from the expression. For
    example if we needed a circuit which was defined
    by the expression Z A . B . C, we would know
    that all we needed was a three input AND
    gate.What would we need for thisZ A B
  • Question Construct a circuit whose output is Z
    AC BC ABC
  • Hint This Boolean expression contains 3 terms
    which are ORed together, so we need a 3 input OR
    gate, with inputs which equal to AC, BC and ABC
    (74)

20
5. The NAND Gate
  • The NAND gate implements the NAND function, which
    is exactly inverted from the AND function you
    already examined. Both inputs must have logic 1
    signals applied to them in order for the output
    to be a logic 0. With either input at logic 0,
    the output will be held to logic 1.
  • The circle at the output of the NAND gate denotes
    the logical inversion, just as it did at the
    output of the inverter. Note that the overbar is
    a solid bar over both input values at once. This
    shows that it is the AND function itself that is
    inverted, rather than each separate input.

A
Z A . B
B
21
5. The NAND Gate Continued
22
6. The NOR Gate
  • The NOR gate is an OR gate with the output
    inverted. Where the OR gate allows the output to
    be true (logic 1) if any one or more of its
    inputs are true, the NOR gate inverts this and
    forces the output to logic 0 when any input is
    true.
  • In symbols, the NOR function is designated with a
    plus sign (), with an overbar over the entire
    expression to indicate the inversion. In logical
    diagrams, the symbol to the left designates the
    NOR gate. As expected, this is an OR gate with a
    circle to designate the inversion

A
Z A B
B
23
6 . The NOR Gate Continued
24
6. And finally...the XOR Gate
  • The Exclusive-OR, or XOR function is an
    interesting and useful variation on the basic OR
    function. Verbally, it can be stated as, "Either
    A or B, but not both." The XOR gate produces a
    logic 1 output only if its two inputs are
    different. If the inputs are the same, the output
    is a logic 0.
  • The XOR symbol is a variation on the standard OR
    symbol. It consists of a plus () sign with a
    circle around it. The logic symbol, as shown
    here, is a variation on the standard OR symbol.
  • Unlike standard OR/NOR and AND/NAND functions,
    the XOR function always has exactly two inputs,
    and commercially manufactured XOR gates are the
    same

A
Z A B
B
25
6. The XOR Gate
26
The Universality of NAND gates
27
The Universality of NOR gates
Write a Comment
User Comments (0)
About PowerShow.com