Question.5
A protocol parser contains this code:
uint16_t reg = received_word; uint16_t sync = 0x00F0; for (int i = 0; i < 16; i++) { if (reg == sync) return i; reg = (reg << 1) | (reg >> 15); }
What technique is this code demonstrating?
Select Answer
Bit reversal — flipping the bit order of received_word
Circular pattern matching — checking if the received word is a rotation of the sync pattern
Hamming distance calculation — measuring bit differences between two values
CRC validation — checking the integrity of the received data