public class BitShifter extends Object
Shifts bits circularly.
Constructor and Description |
---|
BitShifter() |
Modifier and Type | Method and Description |
---|---|
static int |
lshift(int value,
int shift,
byte length)
shifts bits circularly left.
|
static int |
rshift(int value,
int shift,
byte length)
shifts bits circularly right.
|
public static int rshift(int value, int shift, byte length)
shifts bits circularly right.
value
- the value to be shiftedshift
- the number of positions to be shiftedlength
- the length of the circular bufferpublic static int lshift(int value, int shift, byte length)
shifts bits circularly left.
value
- the value to be shiftedshift
- the number of positions to be shiftedlength
- the length of the circular bufferCopyright © 2023. All rights reserved.