Combi Problems

download Combi Problems

of 19

Transcript of Combi Problems

  • 8/20/2019 Combi Problems

    1/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    COMBINATIONAL LOGIC 

    Outcome 1

    (a) Convert the following decimal numbers into 8-bit binary:

    (i) 10 (ii) 59 (iii) 10 (iv) 18

    (b) Convert the following 8-bit binary numbers to decimal:

    (i) 10101010 (ii) 11100011 (iii) 00111110 (iv) 10010011

    (c) Convert the following he!adecimal numbers to 8-bit binary:

    (i) "# (ii) $ (iii) %8 (iv) 0"

    (d) Convert the following 8-bit binary numbers to he!adecimal:

    (i) 00111011 (ii) 11011000 (iii) 01001110 (iv) 10010111

    (e) Convert the following decimal numbers into two-digit he!adecimal

    numbers:

    (i) % (ii) 5 (iii) 51 (iv) 19

    (f) Convert the following he!adecimal numbers into decimal:

    (i) &C (ii) "' (iii) 5% (iv) $$

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1##

    3 earning and *eaching 2cotland 00'

    ?1

  • 8/20/2019 Combi Problems

    2/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    (a) *here a number of different ways in which decimal to binary

    conversion can be done4 *he uic6est and sim7lest is to use an

    engineering calculator that lets you convert between bases4 ven

    the windows-based calculator su77orts base conversion4 iven

     below is an illustration of how this is done using the windows

    calculator4

    $lternatively we can calculate the binary value of a decimal number

    using the binary weightings for 8 bits as shown below4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1#'

    3 earning and *eaching 2cotland 00'

    ?1

    Only 6 binary digits appear as this is all that is required to represent 59 in binary,however to convert to an 8-bit representation just add two eros, i!e! ""111"11

    #inary weighting e$pressed as power o% &

  • 8/20/2019 Combi Problems

    3/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    "inally we can calculate the result using the divide by techniue4

    $gain using 59 as an e!am7le:

    ( i) 10 converts to 00001010

    (ii) 59 converts to 00111011 (see above)

    (iii) 10 converts to

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1#5

    3 earning and *eaching 2cotland 00'

    '(#

    '(#

    )(#

    )(#

  • 8/20/2019 Combi Problems

    4/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (iv) 18 converts to

    (b) (i)

    (ii)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1#%

    3 earning and *eaching 2cotland 00'

    #inary weighting e$pressed as power o% &

    #inary weighting e$pressed as power o% &

    )(#

    '(#

  • 8/20/2019 Combi Problems

    5/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (iii)

    (iv)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1#;

    3 earning and *eaching 2cotland 00'

    #inary weighting e$pressed as power o% &

    #inary weighting e$pressed as power o% &

  • 8/20/2019 Combi Problems

    6/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (c)

  • 8/20/2019 Combi Problems

    7/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (ii) "or $:

    > 0010 $ > 1010

    so the binary re7resentation for $ is 001010104

    ( ii i) "or %8

    % > 0110 8 > 1000

    so the binary re7resentation for %8 is 011010004

    (iv) "or 0"

    0 > 0000 " > 1111

    so the binary re7resentation for 0" is 000011114

    (d) *he 7rocess of converting from binary to he!adecimal is sim7ly a

    case of reversing the 7revious 7rocess4 /ivide the binary 7attern

    into grou7s of four bits and read off the euivalent he!adecimal

    digit4

    .n e!am7le (i) 00111011is bro6en into 0011 > # and 1011 > &4

    *he he!adecimal re7resentation of 00111011 is #&4

    (ii) 11011000 > 1101 1000 > /8

    (iii) 01001110 > 0100 1110 > '

    (iv) 10010111 > 1001 0111 > 9;

    Note: if te !in"#$ %"tte#n &oe' not &i(i&e into )#ou%' of fou# !it'

    "&& *' to te left+"n& 'i&e, i-e- te MSB 'i&e until te %"tte#n &oe'

    &i(i&e-

    .o# e/"m%le, 11**1 onl$ cont"in' fi(e !in"#$ &i)it' 0!it'- If 2e "&&

    t#ee *' to te left+"n& 'i&e 2e &o not "ffect te ("lue !ut 2e c"n

    no2 &i(i&e te %"tte#n into )#ou%' of fou# !it':

    ***11**1 3 14 in e/"&ecim"l

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1#9

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    8/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (e) *here are three methods that we can use to convert decimal to

    he!adecimal4

    *he sim7lest of all is to use an engineering calculator that has the

    facility to convert between bases4 $gain if we loo6 at the

    calculator 7rovide in icrosoft ?indows we can see how this is

    done4

    *he second method is to convert the decimal number into binary

    and then convert the binary number into he!adecimal4 $ll of this

    has been demonstrated in the 7revious e!am7les (a) @ (d)4

    *he third method involves conversion using a table containing the

    weighted values of the he!adecimal digits4 *his is similar to the

    conversion between binary and decimal4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1'0

    3 earning and *eaching 2cotland 00'

    *e$adeci+al digit position

    *e$adeci+al digit weighting

  • 8/20/2019 Combi Problems

    9/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (ii) Convert the decimal number 5 into he!adecimal4

    (iii) Convert decimal number 51 into he!adecimal4

    (iv) Convert the decimal number 19 to he!adecimal4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1'1

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    10/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (f) (i) Convert the he!adecimal number &C to decimal4

    (ii) Convert the he!adecimal number "' to decimal4

    (iii) Convert the he!adecimal number 5% to decimal4

    (iv) Convert the he!adecimal number $$ to decimal4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1'

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    11/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (a) Aerform the following additions in 8-bit binary4 Convert bac6 to

    decimal to chec6 your answer4

    (b) Aerform the following subtractions in binary4 Convert bac6 todecimal to chec6 your answer4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1'#

    3 earning and *eaching 2cotland 00'

    ?&

  • 8/20/2019 Combi Problems

    12/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    (a) *he decimal numbers in this uestion have already been converted

    to binary in 2$B 14

    *he rules a77lied to binary addition are identical to those a77lied

    to decimal e!ce7t that we must always remind ourselves that we

    are wor6ing in binary4

    (i)

    (ii)

    (iii)

    (iv)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1''

    3 earning and *eaching 2cotland 00'

    ?&

  • 8/20/2019 Combi Problems

    13/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (b) *he decimal numbers in this uestion have already been converted

    to binary in 2$B 14

    *he rules a77lied to binary subtraction are identical to those

    a77lied to decimal e!ce7t that we must always remind ourselves

    that we are wor6ing in binary4

    (i)

    (ii)

    (iii)

    (iv)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1'5

    3 earning and *eaching 2cotland 00'

    1 1 "

    . & 1

    & cannot besubtracted %ro+ "there%ore a 1 isborrowed %ro+ thene$t colu+n! /hisupper digit is now &

    & 1 1

  • 8/20/2019 Combi Problems

    14/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (a) +e7resent the following numbers as s com7lement 8-bit binary

    numbers:

    (i) @10 (ii) 10 (iii) 59 (iv) @59

    (v) 10 (vi) @10

    (b) !7lain why the decimal numbers 18 and @18 cannot be

    re7resented using 8-bit s com7lement re7resentation4

    (c) Aerform the following calculations using 8-bit s com7lement

     binary re7resentation:

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1'%

    3 earning and *eaching 2cotland 00'

    ?.

  • 8/20/2019 Combi Problems

    15/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    (a) s com7lement is a binary method of re7resenting negative

    numbers4 .n s com7lement re7resentation the 2& is used as a

    sign bit with 1 indicating a negative number and 0 re7resenting a

     7ositive number4

    ?e will use (i) to illustrate the s com7lement system4

    (i) *o re7resent @10 sim7ly write down the binary value for 10:

    ?e then invert all the bits:

    *hen we add 1 to this value:

    *he answer is the s com7lement re7resentation of @10:

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1';

    3 earning and *eaching 2cotland 00'

    ?.

  • 8/20/2019 Combi Problems

    16/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    .t is difficult to tell the value of this 8-bit s com7lement

    number sim7ly by loo6ing at it4 *o chec6 the value of a

    negative number sim7ly re7eat the 7revious o7erations= i4e4invert all bits and add 1:

    (ii)

     otice that there is no difference in re7resentation= i4e4 this

    loo6s li6e a standard 8-bit binary re7resentation of 104

    (iii)

    (iv)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1'8

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    17/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (v)

    (vi)

    (b) .f we use 8-bit s com7lement re7resentation then the sign bit

    effectively reduces the sie of the number to ; bits4 .n s

    com7lement form the range of numbers that can be re7resented is:

    $s can be seen= 18 and @18 fall outwith this range and so cannot

     be re7resented using 8-bit s com7lement4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1'9

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    18/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (c) (i)

    (ii)

    (iii)

    (iv)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 150

    3 earning and *eaching 2cotland 00'

    0% a carry is generated into the ninth bit si+ply ignore the 8-bit answer will be correct

  • 8/20/2019 Combi Problems

    19/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Outcome 5

    (a) .dentify the $2. standard logic symbols shown and com7lete the

    truth tables in "ig 2$B 1 (i)4

    2ig (34 1i

    (b) /raw the &ritish 2tandard symbols for the logic gates shown "ig

    2$B 1(i)4

    (c) ?rite down the &oolean e!7ression for each of the gates shown in

    "ig 2$B 1(i)4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 151

    3 earning and *eaching 2cotland 00'

    ?1

  • 8/20/2019 Combi Problems

    20/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    (a)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 15

    3 earning and *eaching 2cotland 00'

    ?1

  • 8/20/2019 Combi Problems

    21/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (b)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 15#

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    22/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    "or the $2. logic gates given in "ig 2$B :

    (a) write down the logic e!7ression

    (b) write down the logic out7ut for the in7uts shown4

    2ig (34 &

    "or the &2 logic gates given in "ig 2$B #:

    (a) write down the logic e!7ression

    (b) write down the logic out7ut for the in7uts shown4

    2ig (34 .

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 15'

    3 earning and *eaching 2cotland 00'

    ?&

    ?.

  • 8/20/2019 Combi Problems

    23/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    (a)= (b)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 155

    3 earning and *eaching 2cotland 00'

    ?&

  • 8/20/2019 Combi Problems

    24/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    (a)= (b)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 15%

    3 earning and *eaching 2cotland 00'

    ?.

  • 8/20/2019 Combi Problems

    25/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Outcome 6

    (a) "or the circuit shown in "ig 2$B 1(i) write down the &oolean

    e!7ression for D4

    (b) sing the integrated circuit diagram sheet identify the .ntegrated

    Circuits used in this circuit and 7lace a77ro7riate 7in numbers

     beside the gates4

    (c) Com7lete the truth table in "ig 2$B 1(ii)4

    2ig (34 1i

    2ig (34 1ii

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 15;

    3 earning and *eaching 2cotland 00'

    ?1

  • 8/20/2019 Combi Problems

    26/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    (a)= (b)

    2ig (34 1i

    (c)

    2ig (34 1ii

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 158

    3 earning and *eaching 2cotland 00'

    ?1

  • 8/20/2019 Combi Problems

    27/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (a) "or the circuit shown in "ig 2$B (i) write down the &oolean

    e!7ression for D4

    (b) sing the integrated circuit diagram sheet identify the .Cs used in

    this circuit and 7lace a77ro7riate 7in numbers beside the gates4

    (c) Com7lete the truth table in "ig 2$B 1(ii)4

    2ig (34 &i

    2ig (34 &ii

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 159

    3 earning and *eaching 2cotland 00'

    ?&

  • 8/20/2019 Combi Problems

    28/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    (a)= (b)

    (c)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1%0

    3 earning and *eaching 2cotland 00'

    ?&

  • 8/20/2019 Combi Problems

    29/45

  • 8/20/2019 Combi Problems

    30/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    (i) ?or6ing from the out7ut bac6wards:

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1%

    3 earning and *eaching 2cotland 00'

    ?.

  • 8/20/2019 Combi Problems

    31/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    (ii)

    (b)

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1%#

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    32/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    *he truth table for a two-in7ut logic circuit is shown in "ig 2$B '4

    (a) "rom the truth table derive the &oolean e!7ression that describes

    this table4

    (b) sing $2. symbols draw the logic circuit that meets the

    reuirements of this table4 Eour schematic should clearly show

    .Cs used and 7in numbers4

    2ig (34 7

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1%'

    3 earning and *eaching 2cotland 00'

    ?7

  • 8/20/2019 Combi Problems

    33/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    .n this 7roblem you are trying to generate a circuit from a truth table4

    *o do this consider each in7ut combination that 7rovides a logic 1

    out7ut and wor6 out how this could be achieved using an $/ gate4

    *hese combinations are indicated by arrows in the diagram below4

    *o illustrate consider the first combination= $ > 0 and & > 04 .n order

    to generate a logic 1 at the out7ut an $/ gate needs all its in7uts to be

    logic 1 therefore we need to invert $ and &:

    .f we follow this argument for the second combination= $ > 0 and & > 1=

    we need to invert $ only to obtain a 1 from the $/ gate out7ut:

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1%5

    3 earning and *eaching 2cotland 00'

    ?7

  • 8/20/2019 Combi Problems

    34/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    *he final ste7 is to combine all the $/ combinations into an ,+ gate4

    +ecall that the ,+ gate will generate a logic 1 out7ut when either of its

    in7uts are logic= which is e!actly what is needed for this circuit4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1%%

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    35/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    *he truth table for a three-in7ut logic circuit is shown in "ig 2$B 54

    (a) "rom the truth table derive the &oolean e!7ression that describes

    this table4

    (b) sing $2. symbols draw the logic circuit that meets the

    reuirements of this table4 Eour schematic should clearly show

    .Cs used and 7in numbers4

    2ig (34 5

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1%;

    3 earning and *eaching 2cotland 00'

    ?5

  • 8/20/2019 Combi Problems

    36/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    *he only difference between this 7roblem and 2$B ' is the number of

    in7uts4 *he way in which we solve the 7roblem is identical4

    .dentify the in7ut combinations that give a logic 1 out7ut and wor6 out

    how a logic 1 could be achieved using an $/ gate:

    *he first combination is $&C > 0014 $s we have three in7uts we will

    reuire a three-in7ut $/ gate4 *o obtain a logic 1 out7ut for this

    combination we need to invert $ and &:

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1%8

    3 earning and *eaching 2cotland 00'

    ?5

  • 8/20/2019 Combi Problems

    37/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    *he second combination is $&C > 1004 *o obtain a logic 1 out7ut for

    this combination we need to invert & and C:

    $s before the final ste7 is to combine all the $/ combinations into an

    ,+ gate4 +ecall that the ,+ gate will generate a logic 1 out7ut when

    either of its in7uts are logic 1:

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1%9

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    38/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Outcome 7

    $ sim7le logic control system for a central heating system has the

    following in7uts:

    timer cloc6 (C) 0 > outwith time 7eriod for central heating to be on

    1 > within time 7eriod for central heating to be on

    room thermostat (*) 0 > room tem7erature above the set value

    1 > room tem7erature below set value

    fros t 7rotection (") 0 > room tem7erature above 'FC

    1 > room tem7erature below 'FC

    ?hen the out7ut from the control system > 1 then the boiler will be

    ignited= allowing the system to 7roduce heat4 *he frost 7rotection will

    override the timer cloc6 and the room thermostat should the

    tem7erature fall below 'FC4

    /esign the logic control system to meet the above reuirements4 Eour

    design should include the following:

    • truth table

    • &oolean logic e!7ression

    • logic diagram using $2. symbols (this diagram must include .C

    identification and 7in numbering)4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1;0

    3 earning and *eaching 2cotland 00'

    ?1

  • 8/20/2019 Combi Problems

    39/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    *his outcome advances the combinational design 7rocesses one ste7

    further4 .n this outcome we are given a s7ecification for a digital

    system and from that a 7ractical circuit must be designed4

    *he first ste7 in this 7rocess is to generate a truth table4 *his 7roblem has three

    in7uts= C= * and "= therefore we need a three-in7ut truth table4 ach in7ut

    condition must be carefully considered before 7lacing a 1 or 0 in the out7ut

    column4

    / 2 O/" " " " Output will be " as %rost setting is above 7: and ti+er outwith

    O; period!

    " " 1 1 Output will be 1 as the %rost setting is indicating that thete+perature is below 7:! /his overrides everything else!

    " 1 " " Output will be " as the %rost setting is above 7: and ti+eroutwith O; period! ;ote it doesn

  • 8/20/2019 Combi Problems

    40/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    *he remaining ste7s are identical to those carried out in ,utcome #= i4e4

    generate an $/ e!7ression for each ,* > 1 condition and then ,+

    all of these $/ e!7ression together:

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1;

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    41/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1;#

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    42/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1;'

    3 earning and *eaching 2cotland 00'

  • 8/20/2019 Combi Problems

    43/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    *he control logic for a sim7le alarm system in a house has three in7uts

    and a single out7ut= which activates an alarm4 *he three in7uts are:

    • windows sensor 

    • doors sensor 

    • master 6ey4

    *he sensors o7erate as follows:

    window sensor (?) 0 > all windows closed

    1 > a window is o7en

    door sensor (/) 0 > all doors closed

    1 > a door is o7ened

    master 6ey (G) 0 > alarm system is disarmed

    1 > alarm system is armed

    .f the alarm system is disarmed then the logic signals from the sensors

    are ignored and the alarm will not sound4 *he alarm is activated by a

    logic 1 from the out7ut of the control logic4

    /esign the circuit to meet the reuirements of this control logic4 Eour

    design should include the following:

    • truth table

    • &oolean logic e!7ression

    • logic diagram using $2. symbols (this diagram must include .C

    identification and 7in numbering)4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1;5

    3 earning and *eaching 2cotland 00'

    ?&

  • 8/20/2019 Combi Problems

    44/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS

    Solution

    $s with the 7revious e!am7le a truth table must be generated and all

    in7ut 7ermutations carefully considered4 *he reuired out7ut and

    associated reasons are shown below4

    = > O/" " " " 3lar+ is disar+ed so it doesn 1 condition and then ,+

    all of these $/ e!7ressions together to create the &oolean e!7ression

    that fully describes the reuirements of the truth table4

    C*+,.C $/ C*+.C$ "/$*$2 (.* ) 1;%

    3 earning and *eaching 2cotland 00'

    ?&

  • 8/20/2019 Combi Problems

    45/45

    COMBINATIONAL LOGIC: EXEMPLAR QUESTIONS AND SOLUTIONS