Saturday, July 28, 2012

Scan for a bit pattern in a stream of bits

We need to scan for a 16 bit word in a bit stream. It is not guaranteed to be aligned on byte or word boundaries.
There are various brute force methods; using tables and/or shifts.But what is the best way to do this ?

1 comment:

  1. usually, simple and error free method is the best.
    state diagram is the best

    ReplyDelete