close

public class OPDemo4
{
     public static void main(String[] args)
     {
      int v1=0370,v2=20,v3=1,v4=1;
     System.out.println(" ~v2 = " + (~v2));
     System.out.println(" v1=0370 前面多0會自動變八進位 " + v1);

      }
}

//Ans: v2=-21;

v2 00010100
取補數 11101011
+1 00010101
Ans: -21

arrow
arrow
    全站熱搜

    wealthy 發表在 痞客邦 留言(0) 人氣()