flip 1

Upload: preetish1234

Post on 05-Apr-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Flip 1

    1/20

    Flip-Flops and LatchesAn SR latch is shown in figure13.3. The latch Truth table is shown in the following table.

    The two inputs, S and R denote ``set'' and ``reset'' respectively. The latch has memory, and

    the present output is dependent on the state of the latch. Thus the output at instant,

    denoted by is dependent on output at instant, denoted by .

    Figure 13.3: Construction of a latch from NOR gates

    Students should verify the veracity of the truth table from the figure 13.3.

    S R

    1 0 1 0

    0 1 0 1

    1 1 0 0

    0 0

    Note that in state, both and are 0, which seems absurd. Thus,conventionally, the state is said to be ``not allowed''.

    A similar latch, known as latch is constructed using NAND gates (as opposed to NOR

    gates for latch). The students should again check that the working of the latch coheres

    with that of the truth table.

    Figure 13.4: Construction of a latch from NAND gates

    0 1 1 0

    1 0 0 1

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3
  • 8/2/2019 Flip 1

    2/20

    0 0 1 1

    1 1

    To avoid ``race'' between the inputs, to have a control on when the input affects the latch,

    the circuit13.5 is often implemented.

    Figure 13.5: Circuit to avoid ``race'' condition

    The inputs have an effect on the latch only when , otherwise, the previous state is

    maintained. The input may be a clock, so that whatever transitions in and take place

    before the clock changes to do not affect the outputs, and only when the inputs have

    become stable is the system affected.

    Digital CircuitsBoolean Operators:Single Input Single Output: Operation A and B take binary (0,1) values.

    eg. NOT operation12.1.

    Figure 12.1: A NOT gate

    Multiple Inputs Single Output:

    Eg 1. OR operation 12.2.if either of ``or'' is

    The truth table is as follows:

    AB

    C

    0 0 0

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.6http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.1http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.1http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.2http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.6http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.1http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.2
  • 8/2/2019 Flip 1

    3/20

    01

    1

    10

    1

    11

    1

    Truth table for OR gate

    Figure 12.2: An OR gate

    Eg 2. AND operation is shown in figure 12.3

    Figure 12.3: An AND gate

    AB

    C

    00

    0

    01

    0

    10

    0

    11

    1

    Truth table for AND gate

    These were basic gates which are implemented using transistor and other devices.

    The transistor implementation is shown if figure 12.4

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.4http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.4http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.4
  • 8/2/2019 Flip 1

    4/20

    Figure 12.4: Implementation using a BJTIC based gates are shown in figure12.5

    Figure 12.5: IC based gates

    Other functions

    NAND: Not + AND

    Figure 12.6: NAND gate

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.4http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.4http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.4http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.5http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.5http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.5http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node26.html#15.5
  • 8/2/2019 Flip 1

    5/20

    AB

    C

    00

    1

    0 1 1

    10

    1

    11

    0

    Truth table for NAND gate

    NOR gateNot+OR gate

    Figure 12.7: NOR gate

    AB

    C

    00

    1

    0

    1

    0

    10

    0

    11

    0

    Truth table for NOR gate

    X-OR gate

    Exclusive-OR gate

    Figure 12.8: X-OR gate

    A B C

  • 8/2/2019 Flip 1

    6/20

    00

    0

    01

    1

    10

    1

    11

    0

    Truth table for X-OR gate

    X-NOR gate

    Exclusive NOR

    Figure 12.9: X-NOR gate

    AB

    C

    00

    1

    01

    0

    10

    0

    11

    1

    Truth table for X-NOR gate.

    Using NAND gates

    NOT

    Figure 12.10: Realizing a NOT gate using a NAND gate

    OR The following statements are calledDeMorgan's Theorems and can be easily verifiedand extended for more than two variables.

    (12.

    1)

  • 8/2/2019 Flip 1

    7/20

    (12.

    2)

    (12.

    3)(12.

    4)

    In general:(12.

    5)

    Thus :(12.

    6)

    Now it is easy to see that , which can be checked from the truth tableeasily. The resulting realization of OR gate is shown in12.11

    Figure 12.11: Realization of OR gate by NAND gates

    AND gate

    Figure 12.12: Realization of AND gate by NAND gates

    X-OR gate

    (12.7)

    Clearly, this can be implemented using AND, NOT and OR gates, and hence can beimplemented using universal gates.

    Figure 12.13: X-OR gate

    X-NOR gate

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node28.html#15.11http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node28.html#15.11http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node28.html#15.11
  • 8/2/2019 Flip 1

    8/20

    (12.8)

    Again, this can be implemented using AND, NOT and OR gates, and hence can be

    implemented using universal gates, i.e., NAND or NOR gates.

    Figure 12.14: X-NOR gate

    Boolean ExpressionsA general realization of a Boolean expression is shown in 12.15

    Figure 12.15: Realization of a Boolean Expression: shown as a black box

    Example:In a car, we have the following components:

    ADay-night sensor: Day-1, Night-0

    B

    Lamps on: On-1, Off-0

    CIgnition on: On-1, Off-0

    D

    Warning light for lamps-onIn this case, the truth table for the logic D would be

    A B C D

    0 0 0 00 0 1 1

    0 1 0 1

    0 1 1 0

    1 0 0 0

    1 0 1 0

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node29.html#15.15http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node29.html#15.15
  • 8/2/2019 Flip 1

    9/20

    1 1 0 1

    1 1 1 1

    Therefore,

    , which can be written as in the sum of product form. We arrive at this bylooking at the combinations when the outout is one.

    We can alternatively, express this in the product of sums form by looking at the

    combinatins when the outout is low as

    Using SOP and POS, it can be implemented as follows:

    Next, we will try to reduce the number of gates by combining terms suitably.

  • 8/2/2019 Flip 1

    10/20

    We can get the above by clubbing the s in the k-map shown.

    Now, if we club the zeroes together in the k-map,

    Check that we get the same expression by simplifying the product of sums expression (byusing (X+Y)(X+Z)=X+YZ)

    Multiplexer

  • 8/2/2019 Flip 1

    11/20

    The truth table for the multiplexer is as follows:

    0 0

    0 1

    1 0

    1 1

    Multiplexers (MUX)For logic function realizations, instead of logic gates, Multiplexers can also be used

    Consider a boolean function f={1,2,6,7}. Here input variables are A,B,C.

    Multiplexer schematic for multiplexer is shown in figure 13.1

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node31.html#16.1http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node31.html#16.1
  • 8/2/2019 Flip 1

    12/20

    Figure 13.1: ( ) multiplexer implementation of logic function

    Depending on the contorl input combination specfic input is connected to the single output

    of multiplexer.

    (13.1)

    When multiplexer is used to implement the above function. We connect boolean logic

    '1' at the inputs corresponding to control inputs ABC= 1, 2, 4, and 6. For all other inputboolean logic '0' is connected.

    In case we take a multiplexer we can make as control input and then determinewhat should be connected at the inputs of multiplexer as shown below.

    (13.2)

    (13.3)

    (13.

    4)

    (13.

    5)

    Multiplexers (MUX)For logic function realizations, instead of logic gates, Multiplexers can also be used

    Consider a boolean function f={1,2,6,7}. Here input variables are A,B,C.

  • 8/2/2019 Flip 1

    13/20

    Multiplexer schematic for multiplexer is shown in figure 13.1

    Figure 13.1: ( ) multiplexer implementation of logic function

    Depending on the contorl input combination specfic input is connected to the single outputof multiplexer.

    (13.1)

    When multiplexer is used to implement the above function. We connect boolean logic'1' at the inputs corresponding to control inputs ABC= 1, 2, 4, and 6. For all other input

    boolean logic '0' is connected.

    In case we take a multiplexer we can make as control input and then determinewhat should be connected at the inputs of multiplexer as shown below.

    (13.

    2)

    (13.

    3)

    (13.

    4)

    (13.5)

    The realization is shown in figure 13.2 using a Mux.

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node31.html#16.1http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node31.html#16.2http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node31.html#16.1http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node31.html#16.2
  • 8/2/2019 Flip 1

    14/20

    Figure 13.2: Multiplexer ( ) Implementation

    Flip-Flops and LatchesAn SR latch is shown in figure13.3. The latch Truth table is shown in the following table.The two inputs, S and R denote ``set'' and ``reset'' respectively. The latch has memory, and

    the present output is dependent on the state of the latch. Thus the output at instant,

    denoted by is dependent on output at instant, denoted by .

    Figure 13.3: Construction of a latch from NOR gates

    Students should verify the veracity of the truth table from the figure 13.3.

    S R

    1 0 1 0

    0 1 0 1

    1 1 0 0

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.3
  • 8/2/2019 Flip 1

    15/20

    0 0

    Note that in state, both and are 0, which seems absurd. Thus,

    conventionally, the state is said to be ``not allowed''.A similar latch, known as latch is constructed using NAND gates (as opposed to NOR

    gates for latch). The students should again check that the working of the latch cohereswith that of the truth table.

    Figure 13.4: Construction of a latch from NAND gates

    0 1 1 0

    1 0 0 1

    0 0 1 1

    1 1

    To avoid ``race'' between the inputs, to have a control on when the input affects the latch,

    the circuit13.5 is often implemented.

    Figure 13.5: Circuit to avoid ``race'' condition

    The inputs have an effect on the latch only when , otherwise, the previous state is

    maintained. The input may be a clock, so that whatever transitions in and take place

    before the clock changes to do not affect the outputs, and only when the inputs have

    become stable is the system affected.

    Sequential circuits

    http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.6http://nptel.iitm.ac.in/courses/Webcourse-contents/IIT-KANPUR/esc102/node32.html#16.6
  • 8/2/2019 Flip 1

    16/20

    In the above circuit, we have the problem of multiple tranistions when the clock is active.

    Master Slave Flip-Flop (S-R)

    When , , and are both 1. Therefore, it is an undefined condition. Thiscan be eliminated by proper feedback.

    for the above circuit, the truth table is

  • 8/2/2019 Flip 1

    17/20

    1 1

    0 1 0

    1 0 1

    0 0

    The problem with the circuit shown above is that when clock =1, the feedback will causeoscillatinons and when clock goes zero, the predicting the ouput state is difficult. On the

    other hand, master slave configuration does not allow oscillation.

    Edge triggered Flip-Flop

    The above diagram shows a positive edge triggered flip-flop. The truth table is as follows

  • 8/2/2019 Flip 1

    18/20

    0 1 0 1

    1 0 1 0

    0 0

    1 1

  • 8/2/2019 Flip 1

    19/20

  • 8/2/2019 Flip 1

    20/20