Language:EN
Pages: 3
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
and are all values represented twos complement not

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.

Opcode Operand

Description

1 RXY

LOAD the register R with the bit pattern found in the memory cell whose address is XY. Example: 14A3 would cause the contents of the memory cell located at address A3 to be placed in register

2 RXY
3 RXY
4 0RS

Example: 40A4 would cause the contents of register A to be copied into register 4.

5 RST

ADD the bit patterns in registers S and T as though they were two's complement representations and leave the result in register R.

6 RST
7 RST

Example: 7CB4 would cause the result of ORing the contents of registers B and 4 to be placed in register C.

8 RST

AND the bit patterns in registers S and T and place the result in register R.

9 RST
A R0X
B RXY

JUMP to the instruction located in the memory cell at address XY if the bit pattern in register R is equal to the bit pattern in register 0. Otherwise, continue with the normal sequence of execution. (The jump is implemented by copying XY into the program counter during the execute phase.)

Example: B43C would first compare the contents of register 4 with the contents of register 0. If the two were equal, the pattern 3C would be placed in the program counter so that the next instruction executed would be the one located at that memory address. Otherwise, nothing would be done and program execution would continue in its normal sequence.

C 000

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Mark Bailey

PageId: DOCB818742