[SOLVED] CSCI2500 Lab 9- the push_lsb_bit() and pop_lsb_bit()

35.00 $

Programming resource
Digital learning resource
Category:
✓ Practical programming resource
✓ Suitable for guided study and reference
✓ Tutor guidance available when needed

Description

5/5 - (1 vote)
  1. For the first checkpoint, use C to finish implementing the push_lsb_bit() and pop_lsb_bit() Review the print_b32() function, too, though do not change it.

Begin by downloading the lab09.c code, which provides fill-in-the-blank skeletal code for these (and other) functions. Verify that the test cases given in main() provide correct results, but also add additional test cases.

  1. Checkpoint 2: For the second checkpoint, continue to add to the c code by implementing the isolate_bits() function. Uncomment the test cases in main() to test your isolate_bits() function. Further, add additional test cases to be sure your function is correct.
  2. Checkpoint 3: For the third checkpoint, complete the c code by implementing the decode_inst() function. As part of this function, display the decoded instruction opcode using the format shown in the commented code. This function must also display the ALU control lines, when applicable. Uncomment the test cases in main() to test your decode_inst() function. Further, add additional test cases to be sure your function is correct.

As a hint, in addition to the textbook, consider using spim to see what the decoded opcode codes, funct codes, etc. are for various instructions.

Resource details

Understand the Task Before You Use the Resource

Review the requirements, identify the programming concepts involved, study the implementation and test your understanding with your own examples and modifications.