Question: (a) [4] In class, we examined an algorithm to generate the 2'sC of an integer (flip all bits; add 1). We also saw how any
![(a) [4] In class, we examined an algorithm to generate the](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66fa441c84401_46866fa441c03358.jpg)
(a) [4] In class, we examined an algorithm to generate the 2'sC of an integer (flip all bits; add 1). We also saw how any number in binary can be directly represented in hex. Work out an algorithm that takes a number in hex and directly obtains its 2's representation in hex (e.g. 0xBEEF 0x4111). Justify your answer - i.e. give reason(s) why your algorithm works correctly. (b) (1+1+1] The following bit pattern, O.COD was found in a 12-bit regis- ter. What is the decimal number represented if it is interpreted as: (i) unsigned binary; (ii) sign-magnitude; (iii) Two's complement
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
