A car's warning light system uses the following logic: The warning light comes on if the fuel level is low OR the engine temperature is high The light also ...

Assessment: Computer Science 0478 | Paper 2 Mock 01 | Algorithms, Programming and Logic Subject: Computer Science - 0478

Question 1 Report

diagram

A car's warning light system uses the following logic:

  • The warning light comes on if the fuel level is low OR the engine temperature is high
  • The light also comes on if the door is open AND the car is moving
  • Either condition triggers the light

Let F = fuel low, T = engine temperature high, D = door open, M = car moving, and W = warning light.

(a) Write the Boolean expression for W. [3]

(b) Complete the truth table for the following selected input combinations. [3]

FTDMF OR TD AND MW
0000
1000
0011
0110
1111

(c) State the value of W when the fuel is not low, the temperature is normal, the door is open, but the car is stationary. [2]

(d) State how many logic gates would be needed to build this circuit. Name each gate type. [2]

(e) Write the Boolean expression for the output of the circuit shown above. [2]

(f) Complete the truth table for a logic circuit with three inputs A, B and C that outputs 1 only when at least two inputs are 1. [3]

Answer Details

(a) Boolean expression for the warning light W: [3]

W = (F OR T) OR (D AND M)

[1] for F OR T (fuel low or temperature high), [1] for D AND M (door open and car moving), [1] for combining both with OR.

The warning light activates if either condition is met: a fuel/temperature problem, or a door-while-moving situation. The OR at the top level means satisfying either sub-condition is enough.

(b) Completed truth table: [3]

FTDMF OR TD AND MW
0000000
1000101
0011011
0110101
1111111

[1] for F OR T column correct, [1] for D AND M column correct, [1] for W column correct.

Row 1: no problems, W=0. Row 2: fuel low, W=1. Row 3: door open while moving, W=1. Row 4: engine hot (temperature), W=1. Row 5: all problems present, W=1.

(c) When fuel is not low (F=0), temperature is normal (T=0), door is open (D=1), car is stationary (M=0): [2]

W = (0 OR 0) OR (1 AND 0) = 0 OR 0 = 0

The warning light is OFF. [1] Neither condition is triggered: fuel and temperature are fine, and although the door is open, the car is not moving so D AND M = 0. [1]

(d) Number of logic gates needed: 3 gates [1]

  • 1 OR gate for F OR T
  • 1 AND gate for D AND M
  • 1 OR gate to combine both results into W [1]

(e) The output expression for the described circuit is: Z = (A AND B) OR (NOT C) [1 for correct operators, 1 for correct structure].

(f) Truth table where the output is 1 when at least two inputs are 1: [3]

ABCOutput
0000
0010
0100
0111
1000
1011
1101
1111

[1] for rows where output is 0 (fewer than two 1s), [1] for rows with exactly two 1s giving output 1, [1] for the row with all three 1s also giving output 1. This is known as a majority function.

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