Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. Do the following problems a. Find the 32-bit and 64-bit 2’s complement, 1’s c

ID: 3840956 • Letter: 1

Question

1. Do the following problems

a. Find the 32-bit and 64-bit 2’s complement, 1’s complement and sign-magnitude representations of the decimal value: 32767.

b. Find the 32-bit and 64-bit 2’s complement, 1’s complement and sign-magnitude representations of the decimal value: –32767.

c. Find the decimal values of the number 98C2 417DH interpreted as a 2’s complement, and then interpreted as unsigned representation.

d. What is displayed when the following sequence of ASCII codes is output to a computer screen: 6E 61 6D 0D 0A 61 64 72 65 73 73 0D 0A 63 69 74 79 0D 0A.

e. Given the number 39254861H, determine value under the interpretation as an unsigned integer, then as a 4-tuple of ASCII codes.

f. Convert 356 (base 7) into numbers in bases 10, 2, 16 and 5

Explanation / Answer

1. Do the following problems
a. Find the 32-bit and 64-bit 2’s complement, 1’s complement and sign-magnitude representations of the decimal value: 32767.
for 32 bit
1's complement = 00000000000000000111111111111111
2's complement = add 1 in 1's complement 00000000000000000111111111111111 + 1
= 00000000000000001000000000000000
sign-magnitude
00000000 00000000 01111111 11111111
for 64 bit
1's complement = 0000000000000000000000000000000000000000000000000111111111111111
2's complement = add 1 in 1's complement 0000000000000000000000000000000000000000000000000111111111111111 + 1
= 0000000000000000000000000000000000000000000000001000000000000000
sign-magnitude
00000000 00000000 00000000 00000000 01111111 11111111
b. Find the 32-bit and 64-bit 2’s complement, 1’s complement and sign-magnitude representations of the decimal value: –32767.
for 32 bit
1's complement = 11111111111111111000000000000000
2's complement = add 1 in 1's complement 11111111111111111000000000000000 + 1
= 11111111111111111000000000000001
sign-magnitude
10000000 00000000 01111111 11111111
for 64 bit
1's complement = 1111111111111111111111111111111111111111111111111000000000000000
2's complement = add 1 in 1's complement 1111111111111111111111111111111111111111111111111000000000000000 + 1
= 1111111111111111111111111111111111111111111111111000000000000001
sign-magnitude
10000000 000000000000000000000000 01111111 11111111

c. Find the decimal values of the number 98C2 417DH interpreted as a 2’s complement, and then interpreted as unsigned representation.
decimal value of 98C2 417= 160179223
unsigned representation = 00001001 10001100 00100100 00010111
2'complement = 00001001 10001100 00100100 00011000

d. What is displayed when the following sequence of ASCII codes is output to a computer screen: 6E 61 6D 0D 0A 61 64 72 65 73 73 0D 0A 63 69 74 79 0D 0A.
054 069 032 054 049 032 054 068 032 048 068 032 048 065 032 054 049 032 054 052 032 055 050 032 054 053 032 055 051 032 055 051 032 048 068 032 048 065 032 054 051 032 054 057 032 055 052 032 055 057 032 048 068 032 048 065