Alignment of 2 bits vectors and counting the number of errors
First bits vector (as output: realigned with b2)
Second bits vector (as output: realigned with b1)
Number of errors (in bits) between the 2 realigned vectors
Bit Error Rate
Try to find the best correlation between the 2 bit vectors and count the number of errors (ignoring the 2 first bits and 2 last bits).