public void Um32_Nand() { Um32 um32 = BuildUm32(); uint aIndex = 0; uint bIndex = 1; uint cIndex = 7; um32.AssignRegister(aIndex, 0); // A um32.AssignRegister(bIndex, 6); // B um32.AssignRegister(cIndex, 5); // C var platter = new Platter(0) .SetOperation(OperatorConstants.NotAnd) .SetRegisterA(aIndex) .SetRegisterB(bIndex) .SetRegisterC(cIndex); um32.DischargeOperator(platter); Assert.AreEqual((uint)7, um32.ReadRegister(aIndex)); }
public void Um32_ConditionalMove_False() { Um32 um32 = BuildUm32(); uint aIndex = 0; uint bIndex = 1; uint cIndex = 7; um32.AssignRegister(aIndex, 0); // A um32.AssignRegister(bIndex, 23); // B um32.AssignRegister(cIndex, 0); // C var platter = new Platter(0) .SetOperation(OperatorConstants.ConditionalMove) .SetRegisterA(aIndex) .SetRegisterB(bIndex) .SetRegisterC(cIndex); um32.DischargeOperator(platter); Assert.AreEqual((uint)0, um32.ReadRegister(aIndex)); }