Question:

After ADI 01H when A = FFH, the accumulator and carry flags are :

Show Hint

$FFH$ is the maximum value for an 8-bit register (255). Adding even $1$ to it will always cause it to "roll over" to $00H$ and set the Carry flag.
Updated On: Jun 6, 2026
  • A = 00H, CY = 0
  • A = 00H, CY = 1
  • A = 01H, CY = 1
  • A = FEH, CY = 1
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is B

Solution and Explanation

The ADI (Add Immediate) instruction adds an immediate 8-bit value to the contents of the accumulator. 1. Performing the Addition: Initial Accumulator (A) = $FFH = 1111 \ 1111_2$ Immediate value = $01H = 0000 \ 0001_2$ $1111 \ 1111$ (FFH)
$+ 0000 \ 0001$ (01H)
$(1) \ 0000 \ 0000$ (00H) 2. Result in Accumulator: The 8-bit result is 00H. The bits that exceed the 8-bit capacity of the register are captured by the carry flag. 3. Setting the Carry Flag (CY): Since the addition of $FFH + 01H$ results in $100H$ (256 in decimal), an overflow from the 7th bit (the MSB) into the carry position occurs. Therefore, the Carry Flag (CY) = 1. The final status is: Accumulator = 00H, Carry = 1.
Was this answer helpful?
0
0

Top CUET PG Data Science A.I Cyber Security and Computer Sci. Questions

View More Questions

Top CUET PG Microprocessors and Interfacing Questions

View More Questions