public void And(byte a, byte b, byte expected) { var expectedFlags = new FlagRegister(expected == 0, false, true, false); var reg = new Register <byte> { Value = a }; var flags = new FlagRegister(); Instructions.And(reg, b, flags); Assert.AreEqual(expected, reg.Value); AssertFlags(expectedFlags, flags); }