Question: (2) (a) In class, we examined an algorithm to generate the 2'sC of an integer (flip all bits; add 1). We also saw how any

 (2) (a) In class, we examined an algorithm to generate the

(2) (a) In class, we examined an algorithm to generate the 2'sC of an integer (flip all bits; add 1). We also saw how any ber in binary can be directly represented in hex. Work out an algorithm that takes a number in hex and directly obtains its 2'sC representation i hex (e.g. OrBEEF-0r4111). Justify your answer i.e. give reason(s) why your algorithm works co rectly (b) The following bit patter, OrCOD was found in a 12-bit register. What is the decimal number represented if it is interpreted as: (i) unsigned binary; (ii) sign-magnitude; (iii) Two's complement? (c) The first two bytes of a 1M x 16 main memory have the following values: byte at address 0 is OrFF and byte at addressl is 0r01. If these bytes hold a 16 bit 2's complement integer, what is the actual decimal value stored in the word (read as a unit) if the memory is (i) big endian (ii) little endian

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!