hand roll a quadrature decoder @ x4