Find the values of the flags(carry, sign, zero, overflow) of the processor status register for the given example of two 12 bit no’s in Hex (AB7 + DEF) and draw the circuit diagram also.
given two 8 bit, no's in Hex are: A7+EF
in order to add those two numbers first convert both of them to binary numbers:
The binary equivalent of A7 is:
1010 0111
and the Binary equivalent of EF is:
1110 1111
the result is: 110010110
carry flag will be set to 1 as the result is having to carry forward
sign flag is set to 1 as the MSB(Most Significant Bit) is 1 so the result is negative
zero flags set to 0 as the result is not all zeros
the overflow flag is set to 1 as the result does not fit in the 8-bit operand
Comments
Leave a comment