8-bit bidirectional binary counter