Skip to main content
Visitor II
June 24, 2003
Question

Test bit by bit

  • June 24, 2003
  • 3 replies
  • 997 views
Posted on June 24, 2003 at 10:09

Test bit by bit

    This topic has been closed for replies.

    3 replies

    tyrennarAuthor
    Visitor II
    June 24, 2003
    Posted on June 24, 2003 at 08:28

    I want to test a word of 8 bits , bit by bit but the problem I can't do this in C except if I use a masking .

    but instead of changing my masking each time is what I a shift of bit can do on my masking ?

    http://burns.thefinaldimension.org/kao/cactus/kyoro.gif

    Visitor II
    June 24, 2003
    Posted on June 24, 2003 at 08:48

    while(some_condtion)

    {

    data >>= 1;

    if(data &0x01)

    func();

    }

    Your problem is not much clear but hope this helps

    PraveenG
    tyrennarAuthor
    Visitor II
    June 24, 2003
    Posted on June 24, 2003 at 10:09

    oki thanks for the help !

    http://www.freeadpower.org/~mrsmiles/kao/cactus/saboline_s.gif