Basic bits operation

P

philbo30

Should be an easy question; I'm 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 ??
 
P

philbo30

Should be an easy question; I'm 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 ??

Ignore Message Above - Reposted as New Topic
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,206
Latest member
SybilSchil

Latest Threads

Top