Boolean Word Problems With Explanation
Boolean Word Problems With Explanation
addressed or solved using a combination of logic gates. It outlines the conditions and
desired outcomes, which can be translated into a logical circuit using appropriate gates.
The problem statement serves as the basis for designing a digital circuit that meets the
specified criteria.
Design a security system logic circuit for a storage room that triggers an alarm under two
conditions: either when motion is detected inside the room, or when the door is opened
without a security code being entered. However, the alarm should not sound if the correct
computer science and digital electronics, these expressions are used to represent the
function of logic gates and circuits. Here are some characteristics of Logic Expressions.
branch of algebra that deals with true and false values, typically represented as 1
and 0, respectively.
• Use of Logical Operators | These expressions employ operators such as AND (⋅), OR
(+), NOT (¬), NAND, NOR, XOR, and XNOR to combine one or more logic variables.
represent inputs and outputs of logic gates, and constants (0 for false, 1 for true).
• Represent Logic Circuits | Every logic circuit can be described by a logic expression,
For a simple AND gate with two inputs A and B, the logic expression is:
Expression: Y = A AND B
In Boolean Notation: Y = A ⋅ B
• Based on Binary System | Logic circuits operate using binary numbers (0s and 1s),
• Composed of Logic Gates | These are the basic building blocks of logic circuits. Gates
like AND, OR, NOT, NAND, NOR, XOR, and XNOR process binary inputs to produce a
binary output.
• Can Be Simple or Complex | They range from basic circuits with a single gate to
• Used in Computing and Digital Electronics | Logic circuits form the basis of the
A truth table is a mathematical table used to determine whether a logic statement is true
or false. In the context of digital electronics and computer science, it is primarily used to
represent the output of a logic circuit for every possible combination of inputs.
As can be seen on the previous page each logic can be represented with their own truth
table. The first thing you should notice is that the input values are listed in a logical
binary order, this ensures that you do not make any mistakes when creating the input
values and helps maintain consistency so all truth tables are easy to read. For n inputs,
Notice the pattern when listing binary, the left-hand column will always read down 1 zero
then 1 one, the next column will be 2 zeros’ then 2 one's the third column 4 zero's then 4
ones, this pattern continues as you add column. The other reason to list the binary this way
is if you convert the binary value to normal numbers then you are simply counting from
Zero upwards. You can also work out the total possible input combinations by doing
'Number of inputs ^2'. For example, the logic gate in the diagram above has 2 inputs so
NOTE: MANY STUDENTS LOSE MARKS OR GET THE ANSWER WRONG BECAUSE THEY DO
Creating a logic circuit involves several steps, from understanding the problem to
what the circuit is supposed to achieve. Identify the inputs and the desired output.
2. Determine the Required Logic | Based on the scenario, decide which logical
operations (AND, OR, NOT, etc.) are needed to achieve the desired output.
3. Select the Appropriate Gates | Choose the logic gates that will fulfil the required
logical operations.
4. Draw the Circuit Diagram | Sketch a diagram of the circuit. Place the gates in the
correct arrangement and connect them with lines representing the flow of inputs
and outputs.
5. Label Inputs and Outputs | Clearly label all inputs and the output in the diagram.
6. Create a Truth Table | This is a table showing all possible combinations of inputs
circuit.
7. Test and Validate | Check if the circuit works as intended for all input
Create a circuit that turns on a light (output) when it is either night-time (input A) or the
1. Understand the Scenario | You need a circuit with two inputs (night-time and
2. Determine the Required Logic | The light should be on if either one condition is
4. Draw the Circuit Diagram | Draw a diagram with two inputs leading to an XOR
5. Label Inputs and Outputs | Label the inputs as A (night-time) and B (room
O O O
O 1 1
1 O 1
1 1 O
7. Test and Validate | Check the circuit against all possible input combinations to ensure
it works correctly.
The above example is a simple solution to a simple problem statement that only requires
the use of one logic gate. In the next example we look at a slightly more complex problem
statement and provide tips on how to break down the problem to create a logic circuit and
truth table.
Design a security system for a storage room that triggers an alarm under two conditions:
either when motion is detected inside the room, or when the door is opened without a
security code being entered. However, the alarm should not sound if the correct security
• Override Condition | If the correct security code is entered, the alarm should not be
INPUTS
OUTPUT
Alarm (A): The alarm system. (1 if the alarm should be triggered, 0 if it should not)
• Logic Needed | The alarm should trigger if either motion is detected or the door is
opened.
• Reasoning | An OR gate outputs 1 (true) if either of its inputs is 1. This matches our
need to trigger the alarm if either motion is detected (M = 1) or the door is opened
(D = 1).
• Logic Expression | M OR D
• Logic Needed | The alarm should not trigger if the correct security code is entered.
NOT gate will output 0, indicating that the alarm should not trigger.
• Logic Needed | The alarm should trigger based on motion or door status, but this
• Reasoning | An AND gate outputs 1 only if both its inputs are 1. By connecting the
output of the OR gate (M OR D) and the output of the NOT gate (NOT C) to an AND
gate, the alarm will trigger only if there is motion or the door is opened and the
Notice in the logic diagram above A and B have been added as intermediate values, doing
this is good practice as it allows you to methodically label and trace the circuit in a truth
table.
Create a Truth Table | The truth table below is a method of visually displaying the
X - ALARM
M D C A (M OR D) B (NOT C)
(A AND B)
O O O O 1 O
O O 1 O O O
O 1 O 1 1 1
O 1 1 1 O O
1 O O 1 1 1
1 O 1 1 O O
1 1 O 1 1 1
1 1 1 1 O O
When listing binary values for the inputs in a truth table, it's important to follow a logical
and systematic order. For a scenario with three inputs, you should list the binary values
starting from 000 and incrementing up to 111. This sequence follows the standard binary
counting method, ensuring that all possible combinations of inputs are covered
systematically. Be aware that failing to list the binary values in this correct order could
result in your answer being marked incorrect. This methodical approach is essential for
Design a control system for a specialized manufacturing robot. The robot should activate a
specific function (X) based on the following conditions: The function should be active if
either the safety sensor (A) is not triggered or the manual override (B) is engaged, but not
if the system is in maintenance mode (C). Additionally, this function should also be active if
both the safety sensor is triggered and the system is not in maintenance mode, but not if
INPUTS
if not).
OUTPUT
• Logic Needed | Check if the safety sensor is not triggered or the manual override is
• Gate Used | NOT gate for A / OR gate for NOT A and B / NOR gate combining the
• Logic Needed | Check if both the safety sensor is triggered and the system is not in
• Gate Used | AND gate for A and C / NOR gate combining the output of the AND gate
with B.
• Logic Needed | First Part NAND Second Part. Combine the two conditions: (1) safety
sensor not triggered/manual override engaged, not in maintenance, and (2) safety
• Gate Used | NAND gate combining the outputs of the two NOR gates.
The truth table below represents the circuit - remember to list the intermediate values (D,
Design a digital system for a library's automated lighting and security system. The lights
should turn on if either it is dark outside (D) or if there are people in the library (P). The
security alarm should be activated if it is dark and the library is supposed to be closed (C),
INPUTS
OUTPUTS
TASKS