public class BitUtilities extends Object
Modifier and Type | Field and Description |
---|---|
static int[] |
MSB_BYTES
Array of output of mostSignficantBit(byte) for quicker lookups
|
Constructor and Description |
---|
BitUtilities() |
Modifier and Type | Method and Description |
---|---|
static int |
mostSignficantBit_Loop(int x)
Returns the most significant bit for any positive integer, 0 for -1.
|
static int |
mostSignificantBit(byte x)
Returns the most significant bit for any byte value.
|
static int |
mostSignificantBit(int x)
Returns the most significant bit for any positive integer.
|
public static final int[] MSB_BYTES
public static int mostSignficantBit_Loop(int x)
public static int mostSignificantBit(int x)
public static int mostSignificantBit(byte x)
Terrier 4.0. Copyright © 2004-2014 University of Glasgow