Stairwell

An open stairwell has four floors amd one switch per floor to control the light. If all switches are off, the light is off; any single change in the position of any switch changes the state of the light. Design a circuit the controls the light based on the position of the four switches.

Specification

module stairwell(switches, light);
    input [3:0] switches;
    output light;

Input

Output

Problem information

Author: Jordi Cortadella

Generation: 2026-07-14T06:43:54.171Z

© Jutge.org, 2006–2026.
https://jutge.org