Skip to main content
tyrennar
Associate II
Jun 24, 2003 8:09 AM UTC
Question

Test bit by bit

Posted on June 24, 2003 at 10:09

Test bit by bit

This topic has been closed for replies.

3 replies

tyrennar
tyrennarAuthor
Associate II
Jun 24, 2003 6:28 AM UTC
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
Jun 24, 2003 6:48 AM UTC
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
tyrennarAuthor
Associate II
Jun 24, 2003 8:09 AM UTC
Posted on June 24, 2003 at 10:09

oki thanks for the help !

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