We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47dbe81 commit a99231dCopy full SHA for a99231d
src/me/ramswaroop/bits/SubBit.java
@@ -19,8 +19,7 @@ public class SubBit {
19
* @return
20
*/
21
public static int getSubBits(int num, int start, int end) {
22
- num = num << (32 - end) >>> (start - end + 31); // more intuitive (start - 1 + 32 - end)
23
- return num;
+ return num << (32 - end) >>> (start - end + 31); // more intuitive (start - 1 + 32 - end)
24
}
25
26
public static void main(String a[]) {
0 commit comments