Logic Gates (report).pptx

download Logic Gates (report).pptx

of 19

Transcript of Logic Gates (report).pptx

  • 7/30/2019 Logic Gates (report).pptx

    1/19

  • 7/30/2019 Logic Gates (report).pptx

    2/19

    an electronic component that is

    capable of directing the flow ofelectricity in a circuit, based on

    signals from the computer that

    corresponds to logical relationships,

    such as AND, NOT, and OR.

  • 7/30/2019 Logic Gates (report).pptx

    3/19

    A logic gate receives two

    incoming electric currents,

    compares them, and then sends it

    on a new, outgoing electric current

    depending on what it finds.

    A logic gate is a bit like a doorman

    or bouncer who is allowed to let

    people into a nightclub only if they

    pass certain tests.

  • 7/30/2019 Logic Gates (report).pptx

    4/19

  • 7/30/2019 Logic Gates (report).pptx

    5/19

    TRUTH TABLEInput

    OutputA B

    0 0 0

    0 1 0

    1 0 0

    1 1 1

  • 7/30/2019 Logic Gates (report).pptx

    6/19

    Suppose you go to a nightclub where the doorman's

    job is to enforce a simple rule: "Everyone in your

    group must wear a tie to come in". You go along witha friend one night. If you're both wearing ties, you'll

    get in. If only one of you is wearing a tie, or if neither

    of you is, neither of you will get in. An AND logic gate

    works the same way with two electrical inputs. If

    both inputs are switched on (that is, carry a number

    1), the output will be 1 as well. Otherwise the output

    will be 0.

  • 7/30/2019 Logic Gates (report).pptx

    7/19

    TRUTH TABLE

    Input Output

    0 1

    1 0

  • 7/30/2019 Logic Gates (report).pptx

    8/19

    So far, you've failed to get into either of the clubs. But there's one

    last hope: you know a friend is having a party a few streets away.

    The only trouble is, there's a really argumentative and contrary

    person on the door. He talks to each person in turn as they

    approach him. If you're nice and polite, he shouts abuse at you

    and turns you away. But if you're rude to him, he likes that for

    some reason and lets you in. In other words, he does exactly the

    opposite of what you'd expect! In electronics, there's a logic gatethat works in the same, contrary way and it's called a NOT gate or

    invertor. Unlike AND and OR gates, it has only one input and one

    output. The output is exactly the opposite of the input, so if the

    input is a 0, the output is a 1 and vice versa.

  • 7/30/2019 Logic Gates (report).pptx

    9/19

    TRUTH TABLE

    InputOutput

    A B

    0 0 00 1 1

    1 0 1

    1 1 1

  • 7/30/2019 Logic Gates (report).pptx

    10/19

    You're not wearing a tie, so you go to another club

    further down the street. Here, the person on the door is

    enforcing a different rule: "A group of people can comein if any one of them is a member". If either you or your

    friend is a member, or if you both are members, you can

    both come in. If neither of you is a member, you're both

    left out in the cold. An OR logic gate works this way withtwo electrical inputs. If either input is switched on (that

    is, carries a number 1), the output will be 1 as well.

    Otherwise the output will be 0.

  • 7/30/2019 Logic Gates (report).pptx

    11/19

  • 7/30/2019 Logic Gates (report).pptx

    12/19

    NAND is just like AND,

    only the end result isswapped over (so where

    AND produces an output

    of 1, NAND produces an

    output of 0).

  • 7/30/2019 Logic Gates (report).pptx

    13/19

    NOR is like OR

    with the end

    result swapped

    over in the same

    way.

  • 7/30/2019 Logic Gates (report).pptx

    14/19

    XOR (Exclusive OR)is like an OR, but it

    switches off if

    both the inputs

    are switched on.

  • 7/30/2019 Logic Gates (report).pptx

    15/19

    Calculators use different

    combinations of logic gates. Logic

    gates controls how the displayworks in a calculator figures out

    the results of calculations.

    Calculators

  • 7/30/2019 Logic Gates (report).pptx

    16/19

    Each segment of

    the display is

    switched on and

    off by a series of

    logic gates that

    are connectedtogether.

  • 7/30/2019 Logic Gates (report).pptx

    17/19

    Consider this as an example.

    * The other six segments of each digit are controlled

    by other combinations of logic gates.

  • 7/30/2019 Logic Gates (report).pptx

    18/19

  • 7/30/2019 Logic Gates (report).pptx

    19/19