示例#1
0
文件: Bitwise.cs 项目: wbhart/mpir
 public void IntComplementBit()
 {
     using (var a = new HugeInt("0xA0000000000000000000800000000001"))
     {
         a.ComplementBit(46);
         Assert.AreEqual("A0000000000000000000C00000000001", a.ToString(16));
         a.ComplementBit(47);
         Assert.AreEqual("A0000000000000000000400000000001", a.ToString(16));
         a.ComplementBit(131);
         Assert.AreEqual("8A0000000000000000000400000000001", a.ToString(16));
     }
 }
示例#2
0
 public void IntComplementBit()
 {
     using (var a = new HugeInt("0xA0000000000000000000800000000001"))
     {
         a.ComplementBit(46);
         Assert.AreEqual("A0000000000000000000C00000000001", a.ToString(16));
         a.ComplementBit(47);
         Assert.AreEqual("A0000000000000000000400000000001", a.ToString(16));
         a.ComplementBit(131);
         Assert.AreEqual("8A0000000000000000000400000000001", a.ToString(16));
     }
 }