cancel
Showing results for 
Search instead for 
Did you mean: 

Test bit by bit

tyrennar
Associate II
Posted on June 24, 2003 at 10:09

Test bit by bit

3 REPLIES 3
tyrennar
Associate II
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

parveen
Associate II
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
tyrennar
Associate II
Posted on June 24, 2003 at 10:09

oki thanks for the help !

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