Concept:
• ADI (Add Immediate) is an 8-bit addition instruction.
• If the result of the addition exceeds 255 (\(FFH\)), the 8-bit accumulator wraps around to zero, and the carry flag is set to 1.
Step 1: Perform hexadecimal addition
Current Accumulator \(A = FFH = 255_{10}\)
Add immediate value \(01H = 1_{10}\)
Sum = \(FFH + 01H = 100H = 256_{10}\)
Step 2: Analyze the 8-bit result
In binary:
\(FFH = 1111 \ 1111_2\)
\(01H = 0000 \ 0001_2\)
Sum = \(1 \ 0000 \ 0000_2\)
Step 3: Determine register values
• The 8-bit accumulator stores the lower 8 bits: \(0000 \ 0000_2 = 00H\).
• The 9th bit is the carry out, which sets the Carry Flag (\(CY = 1\)).