Electronics and Communication Engineering - Digital Electronics - Discussion

Discussion Forum : Digital Electronics - Section 20 (Q.No. 47)
47.
Assuming accumulator contain A 64 and the carry is set (1). What will register A and (CY) contain after CMA?
6 AH, 1
6 AH, 0
59 H, 0
9 H, 0
Answer: Option
Explanation:
No answer description is available. Let's discuss.
Discussion:
2 comments Page 1 of 1.

DHARMESH RAMANI said:   5 years ago
No, CMA does not affect the carry flag.

So, answer= 9B H with Carry =1.
(1)

Praveen said:   4 months ago
Let's analyze the given scenario step by step.

Given:
- Register A (Accumulator) contains: 64H (which is `0110 0100` in binary)
- Carry (CY) is set: CY = 1
- Instruction: `CMA (Complement Accumulator)

Understanding the CMA Instruction:
- CMA` (Complement Accumulator) performs bitwise NOT (One’s Complement) operation on the contents of register A.
- This means each bit of A is inverted (`0` becomes 1 and 1 becomes 0).
- Importantly CMA does not affect the Carry (CY) flag.

Step-by-Step Execution:
1. Binary representation of A = 64H:
0110 0100 (64H).

2. After performing CMA (bitwise NOT):
1001 1011 (which is 9BH in hexadecimal)

3. Since CMA does not affect the Carry flag, CY remains 1.

Final Result:
- Register A after CMA = 9BH.
- Carry (CY) remains = 1.

Answer:
After executing CMA,
A = 9BH,
CY = 1.

Post your comments here:

Your comments will be displayed after verification.