Lock-in correlation is scanned across sample length and reference choice. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.

highlighted = computed this step

A matching reference adds one product per sample

With four matching samples, every product is one and the correlation sum is four.

1+1+1+1=41+1+1+1=4
Matching lock-in sourceProducts, correlation, and accepted bit are checked.signal=1,-1,1,-1reference=1,-1,1,-1products=1,1,1,1correlation=4acceptedBit=1 bit

A longer matching run raises the correlation sum

When the reference matches every sample, correlation grows with the number of visible products.

nproductscorraccepted2(1,1)214(1,1,1,1)416(1,1,1,1,1,1)61\begin{array}{c|c|c|c}n&\text{products}&\text{corr}&\text{accepted}\\2&\left(1,1\right)&2&1\\4&\left(1,1,1,1\right)&4&1\\6&\left(1,1,1,1,1,1\right)&6&1\\\end{array}

A wrong reference can cancel or invert the sum

Length is fixed at four here. Changing only the reference changes the product row and the accepted bit.

nproductscorraccepted4(1,1,1,1)414(1,1,1,1)004(1,1,1,1)40\begin{array}{c|c|c|c}n&\text{products}&\text{corr}&\text{accepted}\\4&\left(1,1,1,1\right)&4&1\\4&\left(1,1,-1,-1\right)&0&0\\4&\left(-1,-1,-1,-1\right)&-4&0\\\end{array}
Reference contrast scanThe matching row is the checked source diagram.signal=1,-1,1,-1reference=1,-1,1,-1products=1,1,1,1correlation=4acceptedBit=1 bit