AMIS30543 | Data-Sheet understanding Status register I was reading the data Sheet of AMIS-30543 stepper motor driver and I was not able to understand how to combine the result of the Micro step position status register MSP[8:0]. I know that its a 9 bit value . Help me understand how to get the value.
In the data sheet it is given like

in SR3 -&gt; MSP[8:2], and in SR4 -&gt; MSP[6:0]. How I am I suppose to get the 9 bit out of these.

In the library I have seen that , (sr3&lt;&lt;2) | (sr4 &amp; 3)  . I don't understand why they are doing and &amp; here.
Please explain . also If there was no library how am I suppose to know how to combine these registers from the dataSheet .
Link to DataSheet
Most of the data is duplicated between the registers. Both registers contain MSP[6:2].
If MSP contains 111001001 the registers (ignoring the MSB &quot;PAR&quot; bit) would look like:
SR3: 1110010
SR4: 1001001

If we line those up it's then like:
SR3: 1110010
SR4    1001001

You can now see the overlap.
So taking SR3 and shifting it left two places (sr3 &lt;&lt; 2) gives you:
SR3:   1110010
&lt;&lt;2: 111001000

Taking the lowest two bits of SR4 with &amp; 3 gives you:
SR4:   1001001
&amp; 3:   0000001

Then ORing the two results together:
SR3&lt;&lt;2: 111001000
SR4 &amp;3: 000000001
-----------------
MSP   : 111001001