DU Computer Science Bootcamp: Systems Assignment 4

Due: Friday October 30 at 11:59pm


For this assignment you will be translating functions from C++ to assembly. After writing the specified functions, you will submit them via the department's Git server.

The functions

You will need to implement the following functions:

  1. uint32_t doubleFloatAsm(uint32_t in);
    This function pretends the argument is a 32-bit float and doubles the value. Assume IEEE floating point.
  2. int popCountAsm(uint32_t in);
    This function will return the number of bits set in the input parameter.

To aid your work, working C++ versions of the above are provided as part of the starting code.

Testing

Some testing code has been provided for you. Similar to assignment 2, functions to test the entire 32-bit parameter space is provided (testAllDouble and testAllPop). Additionally there are functions that will test for specific sets of values (testSpecifiedDouble and testSpecifiedPop). The testing strategy is oracle testing by comparing your assembly versions with their corresponding C++ versions.

Starting Code

Start with this code. You should only need to modify the assembly blocks in the two functions mentioned above. If any other problems pop up, please email Will.

Submission

Your work must be submitted via the department's Git server. To do so, perform the following steps:

  1. Use the existing "bootcamp" repository you created for Systems Assignment 1
  2. Create a "systems_assignment4" directory and place your source code in it
  3. Commit your changes and push them to the department's server
  4. When complete you should verify the files are present by using the web interface.
If you have any questions or problems with the submission system, email Will.