A burglar alarm system has four inputs: W = Window sensor triggered (1 = yes) D = Door sensor triggered (1 = yes) A = Alarm is armed (1 = yes) O = Override ...

Assessment: Computer Science 0478 | Paper 1 Mock 01 | Computer Systems Subject: Computer Science - 0478

Question 1 Report

A burglar alarm system has four inputs:

  • W = Window sensor triggered (1 = yes)
  • D = Door sensor triggered (1 = yes)
  • A = Alarm is armed (1 = yes)
  • O = Override switch active (1 = yes)

The alarm sounds (Z = 1) when the alarm is armed AND (a window or door sensor is triggered) AND the override switch is NOT active.

(a) Write the Boolean expression for Z.

[2]

(b) Complete the truth table for the case where A = 1 and O = 0, showing all combinations of W and D.

WDAOW OR DNOT OZ
0010   
0110   
1010   
1110   

[4]

(c) State the output Z when W=1, D=0, A=1, O=1. Explain your answer in the context of the alarm system.

[2]

(d) Draw a logic circuit using AND, OR and NOT gates that implements the Boolean expression from part (a).

[3]

(e) The homeowner wants to add a panic button (P) that always sounds the alarm when pressed, regardless of other inputs. Write the modified Boolean expression.

[2]

Answer Details

(a) Write the Boolean expression for Z. [2]

The alarm sounds when all three conditions are met simultaneously: the alarm is armed (A), a sensor is triggered (W or D), and the override is not active (NOT O). The expression is:

Z = A AND (W OR D) AND (NOT O) [1 for AND with sensor OR, 1 for NOT O]

(b) Complete the truth table for A = 1, O = 0. [4]

With A = 1 and O = 0, NOT O = 1. The output depends entirely on whether any sensor fires:

WDAOW OR DNOT OZ
0010010
0110111
1010111
1110111

When no sensor is triggered (row 1), W OR D = 0, so Z = 1 AND 0 AND 1 = 0 (alarm stays silent). In all other rows at least one sensor is active, so Z = 1 (alarm sounds). [1 per row]

(c) State the output Z when W=1, D=0, A=1, O=1. [2]

Z = 1 AND (1 OR 0) AND (NOT 1) = 1 AND 1 AND 0 = 0. [1]

In context: the window sensor has been triggered and the alarm is armed, but the override switch is active. The override disables the alarm, so it does not sound even though a breach has been detected. [1]

(d) Draw the logic circuit. [3]

The circuit requires three gates connected as follows:

  1. A NOT gate takes input O and produces NOT O. [1]
  2. An OR gate takes inputs W and D and produces W OR D. [1]
  3. An AND gate (with three inputs, or two cascaded two-input AND gates) takes A, the output of the OR gate, and the output of the NOT gate, producing the final output Z. [1]

(e) Write the modified Boolean expression with a panic button P. [2]

The panic button must always sound the alarm regardless of other inputs. This is achieved by ORing P with the original expression:

Z = (A AND (W OR D) AND (NOT O)) OR P

When P = 1, the OR guarantees Z = 1 no matter what the other inputs are. When P = 0, the expression reverts to the original behaviour. [1 for OR with P, 1 for preserving original expression]

Download The App On Google Playstore

Everything you need to excel in your exams

Green Bridge CBT Mobile App
Personalized AI Learning Chat Assistant
200,000+ Exam Questions Across IGCSE, JAMB, WAEC & NECO
Over 3,900 Lesson Notes
Offline Support - Learn Anytime, Anywhere
Green Bridge Timetable
Literature Summaries & Potential Questions
Track Your Performance & Progress
In-depth Explanations for Comprehensive Learning