Yes, this is the right one.

See this thread:

Decoding quadrature encoders
http://www.picbasic.co.uk/forum/showthread.php?t=1552

Luciano