All Exams Test series for 1 year @ ₹349 only
Question

A staircase light is controlled by two switches, one at the top of the stairs and the other at the bottom of the stairs, such that the light is ON when and only when one of the switches is ON and the other switch is OFF. What will be the logic equation in SOP form?

The correct answer is

A̅B + AB̅

Staircase Light Control Logic Explained

The question describes a common scenario for a staircase light, where the light is controlled by two switches, one at the top and one at the bottom. The key condition given is that the light is ON when and only when one of the switches is ON and the other switch is OFF. This behavior is characteristic of an Exclusive OR (XOR) logic gate.

Let's define our variables for the two switches and the staircase light:

  • Let A represent the state of the first switch (e.g., at the top of the stairs).
  • Let B represent the state of the second switch (e.g., at the bottom of the stairs).
  • Let L represent the state of the staircase light.

We can assign '1' for ON and '0' for OFF for the switches and the light. The condition "light is ON when and only when one of the switches is ON and the other switch is OFF" translates to the following scenarios:

  • If switch A is OFF (0) and switch B is ON (1), the light L is ON (1).
  • If switch A is ON (1) and switch B is OFF (0), the light L is ON (1).
  • If both switches are OFF (0, 0), the light L is OFF (0).
  • If both switches are ON (1, 1), the light L is OFF (0).

Staircase Light Truth Table Analysis

To better visualize this logic and derive the logic equation in SOP form, we can construct a truth table showing all possible combinations of the two switches' states (A and B) and the resulting state of the staircase light (L).

Truth Table for Staircase Light Control
Switch A (Input) Switch B (Input) Light L (Output)
0 (OFF) 0 (OFF) 0 (OFF)
0 (OFF) 1 (ON) 1 (ON)
1 (ON) 0 (OFF) 1 (ON)
1 (ON) 1 (ON) 0 (OFF)

Logic Equation Derivation in SOP Form

The Sum of Products (SOP) form of a Boolean expression is obtained by ORing (summing) the product terms for which the output is '1' in the truth table. From our truth table, the staircase light L is ON (output is '1') in two specific cases:

  • Case 1: Switch A is OFF (0) and Switch B is ON (1). In Boolean algebra, 'OFF' is represented by the complemented variable (e.g., \(\overline{A}\)) and 'ON' by the uncomplemented variable (e.g., B). The product term for this case is \(\overline{A}B\).
  • Case 2: Switch A is ON (1) and Switch B is OFF (0). The product term for this case is \(A\overline{B}\).

To get the final logic equation in SOP form for the staircase light, we sum (OR) these product terms:

\(L = \overline{A}B + A\overline{B}\)

This expression is the standard Boolean equation for an Exclusive OR (XOR) gate, which perfectly matches the described behavior of the staircase light control with two switches.

Logic Equation Options Comparison

Let's compare our derived logic equation with the given options to find the correct SOP form:

  • Option 1: \(A + B\) (OR gate) - This would mean the light is ON if A is ON OR B is ON (or both are ON). This does not match our specific condition where only one switch must be ON.
  • Option 2: \(\overline {A + B}\) (NOR gate) - This means the light is ON only if both A and B are OFF. This contradicts the condition that one switch must be ON.
  • Option 3: \(\overline{A}B + A\overline{B}\) (XOR gate) - This exactly matches our derived SOP form. It correctly represents the scenario where the light is ON when exactly one switch is ON and the other is OFF.
  • Option 4: \(AB\) (AND gate) - This would mean the light is ON only if both A and B are ON. This does not match our condition.

Therefore, the logic equation in SOP form that correctly represents the staircase light control is \(\overline{A}B + A\overline{B}\).

Was this answer helpful?

Important Questions from Logic Gates

  1. A two-input logic gate is giving high output only when both the inputs are high. For all other input conditions, the output is low. Select the correct logic gate.

  2. The output is high only if one of the input is high. The above statement represents _____

  3. The number of gate inputs, required to realize expression ABC + AB̅CD + EF̅ + AD is

  4. Which of the following is logically equivalent?

    A. ¬p → (q → r) and q → (p ∨ r)

    B.  (p → q) → r and p → (q → r)

    C. (p  → q) → (r → s) and (p → r) → (q → s)

    Choose the correct answer from the options given below :

  5. Consider the expression Y = P ⨁ Q ⨁ R where P, Q, R are the input variables and Y is the output variable. Y will be logic 0 if

    (A) an odd number of input variables are 1

    (B) an even number of input variables are 1

    (C) an odd number of inputs variables are 0

    (D) an even number of input variable are 0

    (E) an odd number of input variable between 0 and 1

    Choose the correct answer from the options given below:

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App