CSCI 255 Homework 8

This assignment must be submitted, as a PIC assembly file, to the Moodle submission page for Homework 8 by 11:00 PM on Thursday, 1 November.

Problem 1 and only

In Lab 8 you wrote a small PIC program to work on the Syracuse problem for 16-bit integers. Your task for this homework assignment is to extend that solution to 32-bit integers.

Here’s a few things you will need to get started.

Once you’ve made those changes, the task isn’t that hard. Find the places in your lab program where your tested, added, and shifted x. Replace those few instructions with 32-bit versions as found in Chapter 5. It’s not that hard. There were about six instructions testing and modifying x in the 16-bit version. Each will be doubled in the 32-bit version.

However, don’t wait too long to get started.

Some test cases

initial x final r