CS代考 CS 213 Fall 2008

Exam 1, Version 1 (day listed as “Thurs.”).
CS 213 Fall 2008

Copyright By PowCoder代写 加微信 powcoder

Expression Decimal Binary
———————————–
— | -17 | 1110 1111
— | 41 | 0010 1001
sa | -6 | 1010
b | -12 | 1111 0100
sc | 4 | 0100
ux | 192 | 1100 0000
TMax | 127 | 0111 1111
TMax-TMin | -1 | 1111 1111
———————————–

A. True. It yields i when i < 0, and ~i when i >= 0
B. False. For 0 and T . False. For large values of i, e.g., TMax, the addition can overflow
D. True. Will use floating point arithmetic, which does not overflow
E. False. Converting i to floating point can cause rounding. E.g., for TMax

110 11100 | 15 | 10010 111 | 15
100 10101 | 53/16 | 10000 101 | 13/4
111 00000 | +Inf | 10100 110 | 56
000 00001 | 1/128 | 01000 000 | 1/128

Blanks should be filled in as:

M[i][j] > 0

long test(long a, long b, long c)
long answer = 5;
c = b ^ 15;
/* Fall through */
case 7: (or 0)
case 0: (or 7)
answer = c + 112;
case 2: (or 4)
answer = (c + b) << 2; (or 12) case 4: (or 2) answer = 12; (or (c + b) << 2) answer = 5; return answer; Allocate bytes as: aaaabbxxcccccccc dxxxeeeefxxxgggg B. Answers vary. Here is one solution: ccccccccaaaaeeee gggghhhhbbdfxxxx 程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com