public final class BitsHelper
extends java.lang.Object
| Constructor and Description |
|---|
BitsHelper() |
| Modifier and Type | Method and Description |
|---|---|
static int |
countBits(byte v)
各ビット列の立っているビット数を数える
|
static int |
countBits(int v)
各ビット列の立っているビット数を数える
|
static int |
countBits(long v)
各ビット列の立っているビット数を数える
|
static int |
countBits(short v)
各ビット列の立っているビット数を数える
|
static int |
LSB(byte v)
最小有効ビット数LSB(Least Significant Bit)を取得
立っているビットの最小ビット位置
|
static int |
LSB(int v)
最小有効ビット数LSB(Least Significant Bit)を取得
立っているビットの最小ビット位置
|
static int |
LSB(long v)
最小有効ビット数LSB(Least Significant Bit)を取得
立っているビットの最小ビット位置
|
static int |
LSB(short v)
最小有効ビット数LSB(Least Significant Bit)を取得
立っているビットの最小ビット位置
|
static int |
MSB(byte v)
最大有効ビット数MSB(Most Significant Bit)を取得
|
static int |
MSB(int v)
最大有効ビット数MSB(Most Significant Bit)を取得
|
static int |
MSB(long v)
最大有効ビット数MSB(Most Significant Bit)を取得
立っているビットの中での最大ビット位置
|
static int |
MSB(short v)
最大有効ビット数MSB(Most Significant Bit)を取得
|
static int |
squareBits(byte v)
指定した値をよりも大きいか等しい最小の2のべき乗数を求める
|
static int |
squareBits(int v)
指定した値をよりも大きいか等しい最小の2のべき乗数を求める
|
static int |
squareBits(long v)
指定した値をよりも大きいか等しい最小の2のべき乗数を求める
|
static int |
squareBits(short v)
指定した値をよりも大きいか等しい最小の2のべき乗数を求める
|
public static int countBits(byte v)
v - public static int countBits(short v)
v - public static int countBits(int v)
v - public static int countBits(long v)
v - public static int MSB(byte v)
v - public static int MSB(short v)
v - public static int MSB(int v)
v - public static int MSB(long v)
v - public static int LSB(byte v)
v - public static int LSB(short v)
v - public static int LSB(int v)
v - public static int LSB(long v)
v - public static int squareBits(byte v)
v - public static int squareBits(short v)
v - public static int squareBits(int v)
v - public static int squareBits(long v)
v -