Skip to main content

12-hour digital clock

Short answer

A 12-hour digital clock uses mod-60 seconds and minutes counters. The hours counter has a mod-10 units and a single toggle flip-flop for tens. After 12, the next pulse gives 13; a NAND gate detecting T·U1·U0=1 clears the tens flip-flop and resets units to 0001 (01). BCD outputs drive 7447 decoders and displays.

Design 12-Hr. digital clock.

A 12-hour digital clock shows time from 01:00:00 to 12:59:59 (often with an AM/PM indicator). The seconds and minutes sections are mod-60 counters; the special part is the hours counter, which must count 01 → 12 and then return to 01 (not 00).

Overall block diagram

 AC 50 Hz -> [Shaper] -> [÷10] -> [÷5] -> 1 Hz
                                          |
   +--------------------------------------+
   v            SECONDS (00-59)
 [÷10 units] -----> [÷6 tens] -------+ 1 pulse/min
   |                   |             |
 [7447 dec]        [7447 dec]        |
 [7-seg disp]      [7-seg disp]      |
   +---------------------------------+
   v            MINUTES (00-59)
 [÷10 units] -----> [÷6 tens] -------+ 1 pulse/h
   |                   |             |
 [7447 dec]        [7447 dec]        |
 [7-seg disp]      [7-seg disp]      |
   +---------------------------------+
   v            HOURS (01-12)
 [÷10 units] -----> [tens FF] <--- reset/load logic
   |                   |
 [7447 dec]        [decoder]
 [7-seg disp]      [7-seg disp]

Seconds and minutes (÷60 each)

  • A 1 Hz signal is obtained from 50 Hz mains by a Schmitt trigger and a ÷50 divider (÷10, ÷5).
  • Units: mod-10 counter (0–9). Its Q3Q_3 falling edge (9 → 0) clocks the tens counter.
  • Tens: mod-6 counter (0–5), cleared at 6 (0110) by a NAND of Q2Q_2, Q1Q_1. Its reset gives 1 pulse per minute (from seconds) or 1 pulse per hour (from minutes).

Hours counter (01 to 12)

  • Units: mod-10 counter with outputs U3U2U1U0U_3U_2U_1U_0.
  • Tens: a single JK flip-flop (J = K = 1) with output T, clocked by U3U_3 when units go 9 → 0. So 09 → 10.
  • Recycle logic: after 12 the next pulse gives 13 (T = 1, units 0011). With T = 1 the units only reach 0, 1, 2, 3, so 13 is the first state with T=U1=U0=1T = U_1 = U_0 = 1. A 3-input NAND gate detects it:
LOAD‾=T U1 U0‾\overline{LOAD} = \overline{T\,U_1\,U_0}

Its low output clears the tens flip-flop and units bits U3,U2,U1U_3, U_2, U_1, and presets U0U_0, so the display jumps from 13 straight to 01.

 1 pulse/h (from minutes section)
      |
      v
 +-----------+  U3 (9->0)  +---------+
 | Hours     |------------>| Tens FF |  T
 | units     |             | (J=K=1) |
 | MOD-10    |             +---------+
 +-----------+                  |
  U3 U2 U1 U0                   |
       |  |                     |
   U1--+  +--U0     T ----------+
       v  v         v
      [   NAND (T.U1.U0)  ]--o--> CLR tens FF,
                                  CLR U3 U2 U1,
                                  PRESET U0

Hours sequence

PulseTU (BCD)Display
start0000101
80100109
91000010
101000111
111001012
121 → 00011 → 000113 → 01

Display

Each BCD output feeds a BCD-to-7-segment decoder (7447) and display. The hours tens digit shows only "1" or blank, so segments b and c can be driven directly from T. An extra flip-flop toggled at 11 → 12 can drive an AM/PM indicator.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Digital Logic chapter 8 questions →