Code
using System;
namespace _02_12
{
class Class_02_12
{
public static void Main(String[] args)
{
bool x;
x = (true && false);
Console.WriteLine("x = {0}", x);
x = (false || true);
Console.WriteLine("x = {0}", x);
x = (!false);
Console.WriteLine("x = {0}", x);
int y = 0x000f0005, z = 0x00f0f003;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
y = ~y;
z = ~z;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
y = y & z;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
y = y | z;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
y = y ^ z;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
}
}
}
using System;
namespace _02_12
{
class Class_02_12
{
public static void Main(String[] args)
{
bool x;
x = (true && false);
Console.WriteLine("x = {0}", x);
x = (false || true);
Console.WriteLine("x = {0}", x);
x = (!false);
Console.WriteLine("x = {0}", x);
int y = 0x000f0005, z = 0x00f0f003;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
y = ~y;
z = ~z;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
y = y & z;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
y = y | z;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
y = y ^ z;
Console.WriteLine("y = 0x{0:x8}, z = 0x{1:x8}", y, z);
}
}
}