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 =1×27 +1×26+1×25+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 PowCoder代写 加微信 powcoder
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: two¡¯s 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代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com