How do I sign contract ff12.here it is a negative number but I need to remove all the FF here but if I do that it becomes a positive number.
One definition of "sign contraction" can be found in this online copy of The Art of Assembly, as the opposite of sign-extension like x86 cbw
.
Sign contraction, converting a value with some number of bits to the identical value with a fewer number of bits, is a little more troublesome. Sign extension never fails. Given an m-bit signed value you can always convert it to an n-bit number (where n > m) using sign extension. Unfortunately, given an n-bit number, you cannot always convert it to an m-bit number if m < n. For example, consider the value -448. As a 16-bit hexadecimal number, its representation is $FE40. Unfortunately, the magnitude of this number is too large to fit into an eight bit value, so you cannot sign contract it to eight bits. This is an example of an overflow condition that occurs upon conversion.