And are all values represented twos complement notation
Computer Organizations – Assignment Two
Due Friday 1 June 2012
while (count < 6)
(print the value assigned to count and
then (Z Y + W)
else (Z Y + X)
else (if (W=2)
then (Y 7)
4.[5 Marks] The factorial of 0 is defined to be 1.
The factorial of a positive integer is defined to be the product of that integer times the factorial of the next smaller nonnegative integer.
7.[5 Marks] Design an algorithm that, given a list of numbers, finds the largest number in the list. Determine what your solution does if there are several “largest” numbers in the list. In particular, what would your algorithm do if all the numbers would be the same?
8.[14 Marks] The Excel Worksheet “Assignment 2 Data.xlsm” provides data about harddrive capacities and prices over the last 30 years. There is only one problem: The date in Column A is in the format “1980 December” or “1980 December 1” which cannot easily be converted to an Excel date format using a single function. For that purpose, you have to implement a custom function ConvertTextToDate(). The skeleton of this function and a macro for testing it is provided in the Module “DateConversion”. When the function works correctly, the dates in Column B should all be valid and the graphs should show meaningful data.
|
|---|
| 1 | RXY |
|
|---|
| 2 | RXY | |
|---|---|---|
| 3 | RXY | |
| 4 | 0RS |
|
| 5 | RST |
|
|---|
| 6 | RST |
|---|
| 7 | RST |
|
|---|
| 8 | RST |
|
|---|
| 9 | RST |
|---|
| A | R0X |
|---|
| B | RXY |
|
|---|
| C | 000 |
|---|


