Programming Question

CSC 261: Computer Organization and Assembly Language

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

Spring 2024

Assignment 2

Question 1 (20 points):

(a) Find the range of unsigned decimal integers that can be stored in a dword.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

(b) Find the range of signed decimal integers (smallest to largest) that can be stored in

2’s complement form in a dword.

Question 2 (20 points): Perform the addition operation, giving the sum in hex using the

same number of hex digits as the original two operands; State whether or not overflow

and carry occur; Interpret the operations as 2’s complement signed and convert the

problem to the equivalent decimal problem; Verify that the signed interpretation is

correct when there is no overflow; Interpret the operands as unsigned and convert the

problem to the equivalent decimal problem; Verify that the unsigned interpretation is

correct when there is no carry.

2A 44 + D9 CC

Note: See chapter 1 slides. I did a bunch of questions similar to this.

Question 3 (20 points): Instructions are the same as in Question 2 but repeat them for 5E

+ 4B.

Question 4 (20 points): Consider the byte length 2’s complement representation and show

that FF is -1. Now consider the word length 2’s complement representation of FF FF and

show that it is also -1.

Question 5 (20 points): We learned how to take the 2’s complement of a number by

subtracting it from an appropriate power of 2. An alternative method is to write the

number in binary (using the correct number of bits for the length of the representation),

change each 0 bit to 1 and each 1 bit to 0 (this is called “taking the 1’s complement”),

and then adding 1 to the result (discarding any carry into an extra bit). Show that these

Still stressed from student homework?
Get quality assistance from academic writers!

Order your essay today and save 25% with the discount code LAVENDER