Int binary : Binary Bit « Data Types « C# / C Sharp






Int binary

   

using System;
class MainClass
{
    static void Main()
    {
        int a = 0x0c;
        a ^= 0x06;
        Console.WriteLine("0x{0:x8}", a);
        bool b = true;
        b ^= false;
        Console.WriteLine(b);
    }
}

   
    
    
  








Related examples in the same category

1.Using the Bitwise Complement Operators with Various Data TypesUsing the Bitwise Complement Operators with Various Data Types
2.Obtaining the Most Significant or Least Significant Bits of a NumberObtaining the Most Significant or Least Significant Bits of a Number
3.Binary Data TestBinary Data Test
4.Binary Network Byte OrderBinary Network Byte Order
5.Get hash code for a byte array
6.Clone a byte array
7.Count the number of bit
8.Bit Helper
9.Bit shifting for int and long value
10.Returns how many bits are necessary to hold a certain number