Programming Question

Question

CSC 261: Computer Organization and Assembly Language

Spring 2024

Assignment 2

Question 1 (20 points):

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

(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

Get your college paper done by experts

Do my question How much will it cost?

Place an order in 3 easy steps. Takes less than 5 mins.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *