The CD4017B is a 5-stage Johnson decade counter with ten spike-free decoded active HIGH outputs (Ooto O9), an active LOW output from the most significant flip-flop (O5-9),active HIGH and active LOW clock inputs (CP0,CP1) and an overriding asynchronous master reset input (MR).The counter is advanced by either a LOW to HIGH transition at CP0 while CP1 is LOW or a HIGH to LOW transition atCP1 while CP0 is HIGH (see also function table).When cascading counters, theO 5.9 output, which is LOW while the counter is in states 5, 6, 7, 8 and 9, can be used to drive the CP0 input of the next counter.A HIGH on MR resets the counter to zero(Oo=O5-9= HIGH; O1to O9= LOW) independent of the clock inputs (CP0,CP1).Automatic code correction of the counter is provided by an internal circuit: following any illegal code the counter returns to a proper counting mode within 11 clock pulses. Schmitt-trigger action in the clock input makes the circuit highly tolerant to slower clock rise and fall times..