C
Chad Miller
The only example I was able to find was written in PHP. Can anyone convert
to VB? Or give an example of how to perform this operation?
$x = 9124 ;
$n = 1 ;
while ( $x > 0 ) {
if ( $x & 1 == 1 ) {
echo $n, "\n" ;
}
$n *= 2 ;
$x >>= 1 ;
}
// Will output...
// 4
// 32
// 128
// 256
// 512
// 8192
to VB? Or give an example of how to perform this operation?
$x = 9124 ;
$n = 1 ;
while ( $x > 0 ) {
if ( $x & 1 == 1 ) {
echo $n, "\n" ;
}
$n *= 2 ;
$x >>= 1 ;
}
// Will output...
// 4
// 32
// 128
// 256
// 512
// 8192