Re: finding color of bits
- From: pete <pfiland@xxxxxxxxxxxxxx>
- Date: Mon, 09 Jun 2008 04:13:30 -0400
harryos wrote:
The book continues to point out that 'bits in each octect can be got
by shifting it and ANDing with a constant'.Being new to bit
manipulation etc i couldn't quite write the code.if someone can help
pls do.
Least Bit == octet >> 0 & 1
Next bit == octet >> 1 & 1
Next next bit == octet >> 2 & 1
or
Least Bit == (octet & 1) != 0
Next bit == (octet & 2) != 0
Next next bit == (octet & 4) != 0
--
pete
.
- References:
- finding color of bits
- From: harryos
- finding color of bits
- Prev by Date: [ot]Re: Re-use the argument?
- Next by Date: Re: Re-use the argument?
- Previous by thread: finding color of bits
- Next by thread: Re: finding color of bits
- Index(es):