JAVA中移位预算与与运算
2013-02-25 19:46
302 查看
import java.io.BufferedOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; public class IOTest { /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException { //移位操作符 System.out.println( 18>>> 1); System.out.println( 18>>> 2); System.out.println( 18>>> 3); System.out.println( 18>>> 4); //同>>>移位操作符 System.out.println( 18>> 1); System.out.println( 18>> 2); System.out.println( 18>> 3); System.out.println( 18>> 4); /** * 0001 * 0110 * =0111 * =7 */ System.out.println( 1^6); /** * 0100 * 0010 * =0110 * =6 */ System.out.println( 4^2); } }
相关文章推荐
- Java移位运算机制
- java 移位运算 "<<"、">>"、">>>"
- java移位运算
- JAVA移位运算
- java的位运算与移位运算实例研究
- java的移位运算
- 移位运算实现加减乘除详解以及java源码实现
- java中的移位运算
- java 移位运算
- JAVA移位运算与进制转换
- java的位运算与移位运算实例研究
- Java中移位操作符的运算规则
- 二分查找 与 Java移位运算
- Java中的位运算符、移位运算
- java的位运算与移位运算实例研究
- JAVA的移位运算
- 关于java移位运算
- Java中的位运算符、移位运算详细介绍
- Java的运算符号(逻辑与、或、非、移位运算)
- JAVA二进制.位运算.移位运算