P
philbo30
Should be an easy question; I'm still new to bits operations...
I've got the parallel "control" register byte, initially at: 0000 0000
that after receiving an electrical "signal", looks like this:
0000 0110
The signal bits are located as shown below:
0000 0110
^ ^^
SIA
(In the case above, I and A are set to 1 and S is set to Zero.)
The goal is to run the minimal number of operations against the
register to identify the values of S,I,A.
One option would be to compare the actual value against each of the
the known combinations, but perhaps there is a more efficient way ??
I've got the parallel "control" register byte, initially at: 0000 0000
that after receiving an electrical "signal", looks like this:
0000 0110
The signal bits are located as shown below:
0000 0110
^ ^^
SIA
(In the case above, I and A are set to 1 and S is set to Zero.)
The goal is to run the minimal number of operations against the
register to identify the values of S,I,A.
One option would be to compare the actual value against each of the
the known combinations, but perhaps there is a more efficient way ??