Esempio n. 1
0
        public static void Test()
        {
            uint a = 0xC0FFEE;
            // uint b = 0x123ABC;
            uint b = a;

            Console.WriteLine("Test-NOR: NOT  = " + (BitLogic.NOT(a) == BitLogicNOR.NOT(a)));
            Console.WriteLine("Test-NOR: OR   = " + (BitLogic.OR(a, b) == BitLogicNOR.OR(a, b)));
            Console.WriteLine("Test-NOR: AND  = " + (BitLogic.AND(a, b) == BitLogicNOR.AND(a, b)));
            Console.WriteLine("Test-NOR: XOR  = " + (BitLogic.XOR(a, b) == BitLogicNOR.XOR(a, b)));
            Console.WriteLine("Test-NOR: NAND = " + (BitLogic.NAND(a, b) == BitLogicNOR.NAND(a, b)));
            Console.WriteLine();
            Console.WriteLine("Test-NAND: NOT  = " + (BitLogic.NOT(a) == BitLogicNAND.NOT(a)));
            Console.WriteLine("Test-NAND: OR   = " + (BitLogic.OR(a, b) == BitLogicNAND.OR(a, b)));
            Console.WriteLine("Test-NAND: AND  = " + (BitLogic.AND(a, b) == BitLogicNAND.AND(a, b)));
            Console.WriteLine("Test-NAND: XOR  = " + (BitLogic.XOR(a, b) == BitLogicNAND.XOR(a, b)));
            Console.WriteLine("Test-NAND: NOR  = " + (BitLogic.NOR(a, b) == BitLogicNAND.NOR(a, b)));
        }
Esempio n. 2
0
 public static uint NAND(uint a, uint b) => BitLogic.NAND(a, b);
Esempio n. 3
0
 public static uint NOR(uint a, uint b) => BitLogic.NOR(a, b);