test3.11

来源:互联网 发布:掏耳朵 知乎 编辑:程序博客网 时间:2024/06/05 09:34
/*target:process right remove to a hex value 
 * methods:the value has 1 as first value,remove until it has 0 only
 */
public class Test11 {
public static void main(String[] args) {
int n=0x7;
System.out.println(Integer.toBinaryString(n));
while(n!=0)
{n>>=1;
System.out.println(Integer.toBinaryString(n));
}
}
}
0 0