Solutions to Questions at End of Chapter 2.
Q1. 224 can be broken down into powers of 2 as follows (use the technique shown on Slide 5 to
224=128+64+32 =127 +126+125+0x24 +0x23+0x22 +0x21+0x20
Q2. Break the word down into groups of 4 bits 1111 is F16; 0101 is 516 so the answer is F516
Copyright By Assignmentchef assignmentchef
Q3. FE16 = 15 x 16 + 14 x 1 = 254 (or convert the hex to binary as 1111 1110 and convert that to decimal).
Q4. 0000 0001 + 1111 1111 = 0000 0000 (carry goes to 1). This is an unsigned overflow (255+1 0) but not a signed overflow (1 + -1 = 0)
0111 1111 + 0000 0001 = 1000 0000 This is not an unsigned overflow (127 + 1 = 128) but is a signed one (127 + 1 -128)
Q5. The condition is: twos complement overflow will occur (on add) if and only if the carries into and out of the most significant bit position are different. Check this with some examples (e.g. those from Q6).
CS: assignmentchef QQ: 1823890830 Email: [email protected]
Reviews
There are no reviews yet.