Worksheet Digital Logic

advertisement
Comp 1311 The Computing Professional
Digital Logic Worksheet
[CBPrice. 19-04-15]
Activities
1
The House Alarm Problem
A house alarm has a sensor on the door (A) and a pressure pad inside the house (B). The logical
values of the sensors are
A = 1 means the door is closed, A = 0 means the door is open
B = 1 means someone is on the pressure pad, B = 0 means no-one is on the pressure pad
The alarm sounds when the door is open, or if someone is on the pressure pad, or both
(a) Write down the truth table for the alarm
P
0
0
1
1
Q
0
1
0
1
alarm
mini-terms
(b) Write down the mini-terms for each line of the table where the output is 1
(c) Write down a boolean expression for the behaviour of the alarm by OR-ing your three miniterms.
(d) Use your expression to draw a circuit diagram for the alarm system
2.
Safety-Critical Systems
Some safety critical systems such as aircraft flight controllers use three computers which process
identical information, however it is understood that computers are not infallible and may fail. To
mitigate against this a voting system is often used where the output is used only if two or more
computers agree.
Let’s agree that the computers produce a logical output 0 or 1 and that logical 1 means a “correct”
output.
(a) Build a truth table for the voting system for computers A,B and C.
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
output
mini-terms
(b) Construct mini-terms for each line of the table where the output is 1
(c) Combine the mini-terms using the OR operation to get an expression for the entire system
(d) Construct a digital circuit to represent the expression in (c) and check its truth table agrees with
yours.
3.
A Very Strange Alarm System
An alarm manufacturer has installed an alarm according to a rather strange specification of the
customer. There are three switches A,B, and C which when pressed according to the following
rules will set off the alarm:
Rule1: A must be pressed
Rule2: A and B cannot be both pressed together
Rule3: Either B is pressed or C is not.
Rule4: Rule1 and Rule2 and Rule3 must all be true.
(a) Construct a truth table for this system
A
0
0
0
0
1
1
1
1
B
0
0
1
1
0
0
1
1
C
0
1
0
1
0
1
0
1
output
mini-terms
(b) Write down the mini-terms for any row which has an output of 1.
(c) Write an expression for the whole system by OR-ing all the mini-terms
(d) Build and test the digital circuit.
Download