Example #1
0
        static void Main()
        {
            ALU23bits alu1 = new ALU23bits();

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Form1(alu1));
            return;
        }
Example #2
0
        public static bool[] ConvertBoolToNegativeBool(bool[] value)
        {
            if (value.Length != 23)
            {
                throw new Exception("Value given must be have a word of length 23");
            }

            bool[] valueToReturn = new bool[23];

            for (int i = 0; i < value.Length; i++)
            {
                valueToReturn[i] = !value[i];
            }

            bool[] numToSum = new bool[23];
            numToSum[0] = true;
            bool[] opCode = { false, false, true };

            bool      ca;
            ALU23bits aluAux = new ALU23bits();

            valueToReturn = aluAux.Run(valueToReturn, numToSum, opCode[0], opCode[1], opCode[2], false, out ca);
            return(valueToReturn);
        }