[futurebasic] RE: [FB] Bit swapping

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 1999 : Group Archive : Group : All Groups

From: Chris.Young@...
Date: Wed, 20 Oct 1999 09:47:24 -0500
Hans,

How about a bit shift:
' untested
myBits = &X01000000
PRINT myBits >> 5

hth

Chris Young

On Wednesday, October 20, 1999 9:20 AM, hvmaanen@... 
[SMTP:hvmaanen@...] wrote:
> Hi --
> 
> What would be the fastest way to swap eight bits, so that e.g. 64 
becomes 2
> (01000000 <> 00000010) and 192 becomes 3 (11000000 <> 00000011)?
> 
> Can this be done without a loop FOR i = 0 to 3 et cetera?
> 
> Any takers?
> 
> Thanks! --
> 
> Hans van Maanen
> 
> 
> 
> --
> To unsubscribe, send ANY message to 
<futurebasic-unsubscribe@...>
> 
>  << File: [FB] Bit swapping.TXT >>