The output is determined by

Example

Digital clocks display a new time on each clock pulse (once per second). The new time depends on the previous time so the clock has to "remember" what the time is. Here is a system diagram of a digital clock.