This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Treating a 9-bit binary in a 8-bit accumulator

I am aware that during addition/subtraction in the accumulator, if a 9-bit value is resulted the carry bit is set, but what if this is used:

mov A,-200

-200 is a 9-bit value in 2's compliment form. what's going to happen if I move it to accumulator?
Is the extra bit going to drop off or go set the carry?

Parents
  • A is an 8-bit register.

    But -200 is not an eight-bit value. When clipped to 8 bits, it's the value 56 - and 56 is well within range.

    In this case, an assembler could decide to convert -200 to +56. Or it could decide to produce a warning/error that -200 doesn't make sense in an 8-bit assign.

Reply
  • A is an 8-bit register.

    But -200 is not an eight-bit value. When clipped to 8 bits, it's the value 56 - and 56 is well within range.

    In this case, an assembler could decide to convert -200 to +56. Or it could decide to produce a warning/error that -200 doesn't make sense in an 8-bit assign.

Children
No data