Basic bits operation

Discussion in 'C Programming' started by philbo30, Aug 19, 2007.

  1. philbo30

    philbo30 Guest

    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 ??
    philbo30, Aug 19, 2007
    #1
    1. Advertising

  2. philbo30

    philbo30 Guest

    On Aug 19, 3:56 pm, philbo30 <> wrote:
    > 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
    philbo30, Aug 19, 2007
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. GGG
    Replies:
    10
    Views:
    12,518
    Donar
    Jul 6, 2006
  2. sarmin kho
    Replies:
    2
    Views:
    819
    A. Lloyd Flanagan
    Jun 15, 2004
  3. Miki Tebeka
    Replies:
    1
    Views:
    435
    Marcin 'Qrczak' Kowalczyk
    Jun 14, 2004
  4. sergey

    "casting" bits to bits?

    sergey, Nov 8, 2006, in forum: VHDL
    Replies:
    1
    Views:
    692
    sergey
    Nov 8, 2006
  5. philbo30

    Basic bits operation

    philbo30, Aug 12, 2007, in forum: C Programming
    Replies:
    28
    Views:
    850
    Richard Bos
    Aug 23, 2007
Loading...

Share This Page