4-bit synchronous counter created using JK flip flops where mode, M=0 is the up counter and M=1 is the down counter.