Construct an ASM chart for a digital system that counts the number of people in a room. People enter the room from one door with a photocell that changes a signal x from 1 to 0 when the light is interrupted.
They leave the room from a second door with a similar photocell with a signal y. Both x and y are synchronized with the clock, but they may stay on or off for more than one clock-pulse period.
The data-processor subsystem consists of an up-down counter with a display of its contents.