Here you can find the source of clearBitsUpToLS(int n, int i)
public static int clearBitsUpToLS(int n, int i)
//package com.java2s; /*// ww w . j a v a 2 s .c o m * MIT Licensed * Copyright 2014 REM <rami.developer@gmail.com>. */ public class Main { public static int clearBitsUpToLS(int n, int i) { return n & ~(-1 >> (31 - i)); } }