In this part, the goal was to extend the logic to calculate additional metrics based on the final state of the register. The new metrics provide further insights into the operations performed.
To tackle this problem, I followed these steps:
1. Reuse Previous Logic: I reused the state machine logic from Part 1 to maintain consistency.
2. Calculate Additional Metrics: I added logic to compute the new metrics based on the final state of the register.
3. Output: Finally, I printed the additional metrics alongside the final state of the register.
This approach builds on the previous logic while adding the complexity of calculating new metrics.