Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 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.

LOGIC CIRCUITS and SWITCHI G TH!OR" Logic System Specification# In the previous section we introduced the function of a number of logic gates 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 let s 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 stage is to identify the type of inputs 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

Logic System Specification

'ight ,ensor (A)


Logic System
4ulse 5enerator (B)

7arning 'amp 1Q)

/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 B that 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, 4ulse 5enerator 1B2 3 ( 3 0ff, 0utput 1Q2 0ff 'ight ,ensor 1A2 3 & 3 Dar", 4ulse 5enerator 1B2 3 ( 3 0ff, 0utput 1Q2 0ff 'ight ,ensor 1A2 3 ( 3 Daylight, 4ulse 5enerator 1B2 3 & 3 0n, 0utput 1Q2 0ff 'ight ,ensor 1A2 3 ( 3 Dar", 4ulse 5enerator 1B2 3 & 3 0n, 0utput 1Q2 0n

A close e!amination of the 0utput column reveals that the truth table is 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.
Light Sensor (A) A B Pulse Generator (B) Q Warning Lamp (Q)

LOGIC CIRCUITS and SWITCHI G TH!OR" In this case the solution has wor"ed out to be $uite simple, however let us reconsider this problem again with a different specification for the 'ight sensor. 7hat if this had been given as follows%

The light sensor produces a logic ( in the dar", and 'ogic & in daylight.
In this scenario we would have to redefine our truth table, so lets do that now. Input A ( ( & & Input B ( & ( & 0utput Q ( ( & (

-omments
'ight ,ensor 1A2 3 ( 3 Dar", 4ulse 5enerator 1B2 3 ( 3 0ff, 0utput 1Q2 0ff 'ight ,ensor 1A2 3 & 3 Daylight, 4ulse 5enerator 1B2 3 ( 3 0ff, 0utput 1Q2 0ff 'ight ,ensor 1A2 3 ( 3 Dar", 4ulse 5enerator 1B2 3 & 3 0n, 0utput 1Q2 0n 'ight ,ensor 1A2 3 ( 3 Daylight, 4ulse 5enerator 1B2 3 & 3 0n, 0utput 1Q2 0ff

-areful consideration of the 0utput -olumn now reveals that it is no longer the output of a simple logic gate. The output is on when A is a 'ogic ( and B is a 'ogic &. In Boolean terms we would write this as Q = A.B . 0ur system diagram will now have changed slightly to incorporate the changes determined above so that we now have%
Light Sensor (A) A A A B Pulse Generator (B)

Warning Lamp (Q)

6ow let us increase the comple!ity of the system a little bit.


*ngr. +ulius ,. -ansino 4

Logic System Specification $rob%em (: A mar"et gardener wants to install an automatic watering system for his green 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%
Moisture Sensor (A)

Light Sensor (B )

Logic System

Water On (Q)

Door Sensor (C)

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

LOGIC CIRCUITS and SWITCHI G 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 A is 'ogic (, A6D B is 'ogic & A6D C is 'ogic ( or in Boolean Algebra terms this can be written as % Q =A.B.C . The complete system diagram therefore now becomes the following%

*ngr. +ulius ,. -ansino

Logic System Specification

Moisture Sensor (A)

Light Sensor (B )

Water On (Q)

Door Sensor (C )

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%

Moisture Sensor (A)

Light Sensor (B)

Water On (Q)

Door Sensor (C)

,pend a few minutes convincing you that these two designs are indeed the same. 6ow it s time for you to have a go.

LOGIC CIRCUITS and SWITCHI G TH!OR" )esign $rob%em *# An e!pensive painting in an art gallery is protected by a modest security system. 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% 4icture 4ressure 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

Logic System Specification Input A ( Input B ( Input C ( 0utput Q

-omments
4ressure ,ensor 1A2 3 ( 3 4icture 4resent, 'ight ,ensor 1B2 3 ( 3 Daytime, Door ,ensor 1C2 3 ( 3 'oc"ed, 0utput 1Q2 3 ;;;;;; 4ressure ,ensor 1A2 3 & 3 4icture 8issing, 'ight ,ensor 1B2 3 ( 3 Daytime, Door ,ensor 1C2 3 ( 3 'oc"ed, 0utput 1Q2 3 ;;;;;; 4ressure ,ensor 1A2 3 ( 3 4icture 4resent, 'ight ,ensor 1B2 3 & 3 6ight<time, Door ,ensor 1C2 3 ( 3 'oc"ed, 0utput 1Q2 3 ;;;;;; 4ressure ,ensor 1A2 3 & 3 4icture 8issing, 'ight ,ensor 1B2 3 & 3 6ight<time, Door ,ensor 1C2 3 ( 3 'oc"ed, 0utput 1Q2 3 ;;;;;; 4ressure ,ensor 1A2 3 ( 3 4icture 4resent, 'ight ,ensor 1B2 3 ( 3 Daytime, Door ,ensor 1C2 3 & 3 =n<loc"ed, 0utput 1Q2 3 ;;;;;; 4ressure ,ensor 1A2 3 & 3 4icture 8issing, 'ight ,ensor 1B2 3 ( 3 Daytime, Door ,ensor 1C2 3 & 3 =n<loc"ed, 0utput 1Q2 3 ;;;;;; 4ressure ,ensor 1A2 3 ( 3 4icture 4resent, 'ight ,ensor 1B2 3 & 3 6ight<time, Door ,ensor 1C2 3 & 3 =n<loc"ed, 0utput 1Q2 3 ;;;;;; 4ressure ,ensor 1A2 3 & 3 4icture 8issing, 'ight ,ensor 1B2 3 & 3 6ight<time, Door ,ensor 1C2 3 & 3 =n<loc"ed, 0utput 1Q2 3 ;;;;;;

&

&

&

&

&

&

&

&

&

&

&

&

7rite down the conditions needed to sound the alarm% >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Boolean *$uation% >>>>>>>>>>>>>>>

LOGIC CIRCUITS and SWITCHI G 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

&(

Logic System Specification

Input A (

Input B (

Input C (

0utput Q (

-omments
4ressure ,ensor 1A2 3 ( 3 4icture 4resent, 'ight ,ensor 1B2 3 ( 3 Daytime, Door ,ensor 1C2 3 ( 3 'oc"ed, 0utput 1Q2 3 0ff 4ressure ,ensor 1A2 3 & 3 4icture 8issing, 'ight ,ensor 1B2 3 ( 3 Daytime, Door ,ensor 1C2 3 ( 3 'oc"ed, 0utput 1Q2 3 0ff 1-leaning in progress2 4ressure ,ensor 1A2 3 ( 3 4icture 4resent, 'ight ,ensor 1B2 3 & 3 6ight<time, Door ,ensor 1C2 3 ( 3 'oc"ed, 0utput 1Q2 3 0ff 4ressure ,ensor 1A2 3 & 3 4icture 8issing, 'ight ,ensor 1B2 3 & 3 6ight<time, Door ,ensor 1C2 3 ( 3 'oc"ed, 0utput 1Q2 3 0n 4ressure ,ensor 1A2 3 ( 3 4icture 4resent, 'ight ,ensor 1B2 3 ( 3 Daytime, Door ,ensor 1C2 3 & 3 =n<loc"ed, 0utput 1Q2 3 0ff 4ressure ,ensor 1A2 3 & 3 4icture 8issing, 'ight ,ensor 1B2 3 ( 3 Daytime, Door ,ensor 1C2 3 & 3 =n<loc"ed, 0utput 1Q2 3 0n 4ressure ,ensor 1A2 3 ( 3 4icture 4resent, 'ight ,ensor 1B2 3 & 3 6ight<time, Door ,ensor 1C2 3 & 3 =n<loc"ed, 0utput 1Q2 3 0ff 4ressure ,ensor 1A2 3 & 3 4icture 8issing, 'ight ,ensor 1B2 3 & 3 6ight<time, Door ,ensor 1C2 3 & 3 =n<loc"ed, 0utput 1Q2 3 0n

&

&

&

&

&

&

&

&

&

&

&

&

&

&

&

6ow there are three possible conditions that cause the alarm to sound% i. A on A6D B on A6D C off 0A ii. A on A6D B off A6D C on 0A iii. A on A6D B on A6D C on. In Boolean terms this would be written as%
Q =A.B.C +A.B.C +A.B.C

This does however ma"e the logic diagram for the alarm much more complicated as shown on the following page.

LOGIC CIRCUITS and SWITCHI G TH!OR"

Pressure Sensor (A)

Light Sensor (B)

Door Sensor (C)

Alarm On (Q)

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 B 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

&.

Logic System Specification

Pressure Sensor (A) Alarm On (Q) Light Sensor (B)

Door Sensor (C)

-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.

LOGIC CIRCUITS and SWITCHI G 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" B &.... B 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 B 5ood 'uc"@

*ngr. +ulius ,. -ansino

&4

Logic System Specification Se%f !va%'ation Revie+


8y personal review of these ob?ectives%

Learning Objectives
Translate a specification into a truth table. Design and test a system, with up to 4 inputs from a specification. Targets% &.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

..

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

You might also like