Assignment overview

This is a group assignment which you must complete and submit. Maximum three students in group and they should be in the same lecture section. There are 3 questions in total of which you must answer all and the results will contribute 20% of your coursework mark. All assignment submissions must be handwritten (in legible handwriting) and include a cover page. No binding or plastic cover is necessary (just staple)

Question 1 [7 marks]

A classic logic puzzle is as follows:

A farmer wants to cross a river and take with him a wolf, a goat, and a cabbage. There is a boat that can fit himself plus either the wolf, the goat, or the cabbage only. If the wolf and the goat are alone on any shore, the wolf will eat the goat. If the goat and the cabbage are alone on any shore, the goat will eat the cabbage. Only the farmer can drive the boat.

How can the farmer bring the wolf, the goat, and the cabbage across the river?

Your goal is to design an alarm circuit that will let the farmer know if a condition is violated so that the farmer can safely transport all three objects across the river without losing any of them. Assuming that your alarm circuit operates when the items are on the banks of the river (and not during the trips back and forth) complete the following requirements:

a)Identify the four inputs to the circuit from the scenario above (the output is the alarm itself – so you only have one output) and draw a truth table to show when the alarm will trigger based on the inputs. Use the binary conditions of 0 to signify when an object is on one bank of the river and 1 when it is on the other.

b)Write the boolean expression derived from the truth table in (a)

c)Simplify the boolean expression obtained (you may use any method you prefer)

d)Draw the final logic circuit for the simplified expression above.

Question 2 [7 marks]

You are to design a combinational circuit that controls the lights in a room with multiple switches. The requirements are as follows

  • There are 3 switches in the room at different sides – one at the front door (A), one at the side door (B) and another at the back door (C)
  • In the initial state, the room lights are OFF. Additionally the switch at the front door is ON whilst the others are OFF.
  • From the initial state, flipping any switch position will turn the lights ON. Flipping any switch position again will turn the lights OFF and so on.

Draw the truth table for the inputs and outputs above and derive the final boolean expression from the truth table. Simplify your boolean expression (if possible) and then draw the logic circuit for the switch controls in the room

Question 3 [6 marks]

You wish to design a magnitude comparator circuit for 2-bit binary numbers A and B with the following conditions

  • The two 2-bit binary numbers have A=A1A0 and B=B1B0 bits respectively.
  • The circuit will have two possible outputs X and Y.
  • The outputs of the comparator, X=1 if A>=B and Y=1 if A<B. For all other conditions, the outputs are 0.

a)Draw the truth table of the comparator, indicating the different conditions for A1,A0, B1,B0,X and Y

b)From the truth table, determine the functions for X and Y

c)Using a 4-to-16 line decoder implement the comparator design you obtained above

PDS0101-T2/2014.15/WKS