logic system specifications-worded problems

Upload: jocansino4496

Post on 04-Jun-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 Logic System Specifications-WORDED Problems

    1/15

    Logic System Specification

    Learning Objectives:

    At the end of this topic you will be able to;

    Translate a specification into a truth table.

    Design and test a system, with up to 4 inputs from a specification.

  • 8/13/2019 Logic System Specifications-WORDED Problems

    2/15

    LOGIC CIRCUITS and SWITCHIG TH!OR"

    Logic System Specification#

    In the previous section we introduced the function of a number of logicgates that are available for us to use in electronic system design. In this

    section we will be developing the process needed to convert the design brief

    of a problem into a truth table. Before we can start we must have a problem

    that needs to be solved so lets begin with something fairly simple to e!plain

    the process.

    $rob%em &:

    A warning light is to be placed on a s"ip at night to warn any approaching

    drivers that there is a ha#ard in the road. The light should only operate in

    the dar" and the light should be flashing.

    So%'tion :

    In any problem of this nature the first stageis to identify the type ofinputs needed to convert e!ternal factors e.g. light or temperature into an

    electrical signal that can be processed to perform the function re$uired in

    the design brief.In our problem two input systems are re$uired, a light

    sensor and a pulse generator. In a real situation you would design the light

    sensor to give the output characteristics you would need for the system you

    have designed. In all problems you will be given the characteristics of the

    light sensor to enable the system to be constructed so for now we will assume

    the following %

    The light sensor produces a logic & in the dar", and 'ogic ( in daylight.

    The pulse generator will be producing a continuous series of on ) off or

    'ogic & ) 'ogic ( pulses as soon as the power is switched on.

    A simple bloc" diagram of the system can now be constructed.

    *ngr. +ulius . -ansino

  • 8/13/2019 Logic System Specifications-WORDED Problems

    3/15

    Logic System Specification

    /ou will notice that the two inputs have now been given a letter so that

    we can identify them in a truth table. In this case there are only two inputs,

    and therefore there will be four possible combinations of A and Bthat we

    have to consider. The ne!t stage is to construct a truth table to show all the

    possible input conditions and for each set of inputs determine when an output

    is re$uired.

    Input A Input B 0utput Q -omments

    ( ( ( 'ight ensor 1A2 3 ( 3 Daylight, ulse5enerator 1B2 3 ( 3 0ff, 0utput 1Q2 0ff

    ( & ('ight ensor 1A2 3 & 3 Dar", ulse

    5enerator 1B2 3 ( 3 0ff, 0utput 1Q2 0ff

    & ( ('ight ensor 1A2 3 ( 3 Daylight, ulse

    5enerator 1B2 3 & 3 0n, 0utput 1Q2 0ff

    & & &'ight ensor 1A2 3 ( 3 Dar", ulse

    5enerator 1B2 3 & 3 0n, 0utput 1Q2 0n

    A close e!amination of the 0utput column reveals that the truth tableis that of a simple A6D gate. i.e. Q = A.B so the only logic gate we need is a

    single A6D gate and our system diagram can now be redrawn as shown below.

    'ight

    ensor(A)

    7arning

    'amp 1Q)

    Logic

    System

    ulse

    5enerator(B)

    Light

    Sensor (A)

    Warning

    Lamp (Q)

    Pulse

    Generator (B)

    A

    BQ

  • 8/13/2019 Logic System Specifications-WORDED Problems

    4/15

  • 8/13/2019 Logic System Specifications-WORDED Problems

    5/15

    Logic System Specification

    $rob%em (:

    A mar"et gardener wants to install an automatic watering system for hisgreen houses to ensure that his pri#ewinning plants do not suffer from a lac"

    of water. The system however, must have some safeguards whereby plants

    should only be watered in daylight, when the soil is dry and the door to the

    greenhouse is closed.

    The following sensors are available%

    A moisture sensor 1A2 which outputs a 'ogic ( when dry, and 'ogic &

    when wet.

    A light sensor 1B2 which outputs a 'ogic & in daylight, and 'ogic ( at

    night.

    A door switch 1C2 which outputs a 'ogic ( when closed and 'ogic & when

    open.

    An overview of the system is therefore as shown below%

    The ne!t stage is to construct a truth table for this system, as shown

    on the ne!t page.

    Moisture

    Sensor (A)

    Water

    On (Q)Logic

    System

    Light Sensor

    (B)

    Door Sensor

    (C)

  • 8/13/2019 Logic System Specifications-WORDED Problems

    6/15

    LOGIC CIRCUITS and SWITCHIG TH!OR"

    Input A Input B Input C 0utput Q -omments

    ( ( ( (8oisture ensor 1A2 3 ( 3 Dry,'ight ensor 1B2 3 ( 3 6ight,

    Door ensor 1C2 3 ( 3 -losed,

    0utput 1Q2 3 0ff

    ( ( & (

    8oisture ensor 1A2 3 & 3 7et,

    'ight ensor 1B2 3 ( 3 6ight,

    Door ensor 1C2 3 ( 3 -losed,

    0utput 1Q2 3 0ff

    ( & ( &

    8oisture ensor 1A2 3 ( 3 Dry,

    'ight ensor 1B2 3 & 3 Daylight,

    Door ensor 1C2 3 ( 3 -losed,

    0utput 1Q2 3 0n

    ( & & (

    8oisture ensor 1A2 3 & 3 7et,

    'ight ensor 1B2 3 & 3 Daylight,

    Door ensor 1C2 3 ( 3 -losed,

    0utput 1Q2 3 0ff

    & ( ( (

    8oisture ensor 1A2 3 ( 3 Dry,

    'ight ensor 1B2 3 ( 3 6ight,

    Door ensor 1C2 3 & 3 0pen,

    0utput 1Q2 3 0ff

    & ( & (

    8oisture ensor 1A2 3 & 3 7et,

    'ight ensor 1B2 3 ( 3 6ight,Door ensor 1C2 3 & 3 0pen,

    0utput 1Q2 3 0ff

    & & ( (

    8oisture ensor 1A2 3 ( 3 Dry,

    'ight ensor 1B2 3 & 3 Daylight,

    Door ensor 1C2 3 & 3 0pen,

    0utput 1Q2 3 0ff

    & & & (

    8oisture ensor 1A2 3 & 3 7et,

    'ight ensor 1B2 3 & 3 Daylight,

    Door ensor 1C2 3 & 3 0pen,

    0utput 1Q2 3 0ff

    -areful study of the truth table shows that the output must come on

    when Ais 'ogic (, A6D Bis 'ogic & A6D Cis 'ogic ( or in Boolean Algebra

    terms this can be written as % CBAQ ..= .

    The complete system diagram therefore now becomes the following%

    *ngr. +ulius . -ansino 9

  • 8/13/2019 Logic System Specifications-WORDED Problems

    7/15

    Logic System Specification

    An alternative design that does the same thing can be formed if only

    two input A6D gates are available, by combining two such units together as

    shown below%

    pend a few minutes convincing you that these two designs are indeed the

    same.

    6ow its time for you to have a go.

    Moisture

    Sensor (A)

    Water

    On (Q)

    Light Sensor

    (B)

    Door Sensor

    (C)

    Moisture

    Sensor (A)

    Water

    On (Q)

    Light Sensor

    (B)

    Door Sensor

    (C)

  • 8/13/2019 Logic System Specifications-WORDED Problems

    8/15

    LOGIC CIRCUITS and SWITCHIG TH!OR"

    )esign $rob%em *#

    An e!pensive painting in an art gallery is protected by a modest securitysystem. The picture is protected by a pressure switch which is normally

    closed when the picture is in place, but opens if the picture is removed from

    the wall. Design a system to sound the alarm if the picture is removed from

    the wall only when the gallery is closed at night.

    The specification for the available sensors are as follows%

    icture ressure sensor 1A2 which outputs a 'ogic ( when picture is in

    place, and 'ogic & when the picture is removed.

    A light sensor 1B2 which outputs a 'ogic ( during the day, and 'ogic & at

    night.

    A door switch 1C2 which outputs a 'ogic ( when loc"ed and 'ogic & when

    unloc"ed.

    -omplete the following system diagram%

    6ow complete the truth table opposite.

    *ngr. +ulius . -ansino :

  • 8/13/2019 Logic System Specifications-WORDED Problems

    9/15

    Logic System Specification

    Input A Input B Input C 0utput Q -omments

    ( ( (

    ressure ensor 1A2 3 ( 3 icture resent,

    'ight ensor 1B2 3 ( 3 Daytime,

    Door ensor 1C2 3 ( 3 'oc"ed,

    0utput 1Q2 3

    ( ( &

    ressure ensor 1A2 3 & 3 icture 8issing,

    'ight ensor 1B2 3 ( 3 Daytime,

    Door ensor 1C2 3 ( 3 'oc"ed,

    0utput 1Q2 3

    ( & (

    ressure ensor 1A2 3 ( 3 icture resent,

    'ight ensor 1B2 3 & 3 6ight

  • 8/13/2019 Logic System Specifications-WORDED Problems

    10/15

    LOGIC CIRCUITS and SWITCHIG TH!OR"

    6ow draw a suitable arrangement of logic gates to meet the needs of

    your system.

    If

    we reconsider the specification for the alarm that you have ?ust designed,

    you should have realised that it is a pretty poor design for an alarm, since if

    someone wal"ed in during the day and removed the picture from the wall no

    alarm would sound.

    This is clearly an unacceptable position and a better system would sound

    the alarm every time the picture was removed from the wall. The owner of

    the gallery was not happy with this suggestion as once a wee" the picture was

    removed for cleaning, and the alarm should not sound during this period. The

    owner stated that when cleaning was ta"ing place, the gallery was closed, and

    only too" place during daytime hours.

    The modified truth table opposite shows the modifications needed to

    meet the demands of this enhanced alarm system.

    -hec" through the table carefully to see if you agree @

    *ngr. +ulius . -ansino &(

  • 8/13/2019 Logic System Specifications-WORDED Problems

    11/15

    Logic System Specification

    Input A Input B Input C 0utput Q -omments

    ( ( ( (ressure ensor 1A2 3 ( 3 icture resent,'ight ensor 1B2 3 ( 3 Daytime,

    Door ensor 1C2 3 ( 3 'oc"ed,

    0utput 1Q2 3 0ff

    ( ( & (

    ressure ensor 1A2 3 & 3 icture 8issing,

    'ight ensor 1B2 3 ( 3 Daytime,

    Door ensor 1C2 3 ( 3 'oc"ed,

    0utput 1Q2 3 0ff 1-leaning in progress2

    ( & ( (

    ressure ensor 1A2 3 ( 3 icture resent,

    'ight ensor 1B2 3 & 3 6ight

  • 8/13/2019 Logic System Specifications-WORDED Problems

    12/15

    LOGIC CIRCUITS and SWITCHIG TH!OR"

    This is $uite a comple! system for what is essentially $uite a straight

    forward system. Imagine what this would loo" li"e if only two input gates

    were available@ It would appear that system design is going to become very

    complicated surely there must be an easier way C

    7ell you will be pleased to "now that there are some additional

    techni$ues we can use to ma"e our designs a little bit more straight forward

    Indeed this system that we have ?ust designed can be reduced to the system

    shown opposite.

    *ngr. +ulius . -ansino &

    PressureSensor (A)

    Alarm

    On (Q)

    Light Sensor

    (B)

    Door Sensor

    (C)

  • 8/13/2019 Logic System Specifications-WORDED Problems

    13/15

    Logic System Specification

    -omplete the truth table below and compare it with the one on page &&.

    Input A Input B Input C 0utput Q

    ( ( (

    ( ( &

    ( & (

    ( & &

    & ( (

    & ( &

    & & (

    & & &

    All we need do now is find out how this dramatic simplification can ta"e

    place, as this design is significantly easier to build than the original.

    Pressure

    Sensor (A)

    Alarm

    On (Q)

    Light

    Sensor (B)

    Door

    Sensor (C)

  • 8/13/2019 Logic System Specifications-WORDED Problems

    14/15

    LOGIC CIRCUITS and SWITCHIG TH!OR"

    7e will stop loo"ing at system design for the moment even though we

    have not considered 4 input systems as suggested in the learning ob?ectives,because these would inevitably lead to very comple! designs if we used the

    techni$ues introduced so far in this section.

    Before considering such large systems we must have the tools re$uired

    to simplify our design after wor"ing out the conditions needed for an output

    to operate from the system specification.

    0ur ne!t topic of wor" &.. Boolean Algebra will provide us with a

    set of rules we can use to simplify the logic system.

    ystem design will temporarily be put on hold while we learn the

    simplification techni$ues of Boolean Algebra 5ood 'uc"@

    *ngr. +ulius . -ansino &4

  • 8/13/2019 Logic System Specifications-WORDED Problems

    15/15