tabriz
شنبه 07 شهریور 1388, 12:50 عصر
1-The hexadecimal dump from part of a computer memory is as follows:
4F 68 68 A8 A8 A8 C0 C0 00 00
(a) two consecutive ASCII-encoded characters
(b) one 8-bit fraction (unsigned)
(c) one 8-bit sign-and-magnitude integer
(d) one 8-bit one's complement integer
(e) one 8-bit two's compliment integer
(f) one 32-bit IEEE format floating point number (Hint: the format consists of 1 bit for sign, 8 bits for exponent in excess of 127 and 23 bits for drop-one mantissa).
Interpret the dump and convert it into two characters, one decimal fraction value, three decimal integer values, and one decimal floating point value that are stored consecutively in this memory segment.
2- Given the following Java code segment
short j = 32767;
j++;
System.out.println(j);
(a) What value is printed out?
(b) Do the math to show how the answer is obtained.
3- Using 2's complement binary arithmetic with a 12-bit word,write down the range of numbers capable of being represented(both in decimal and binary formats) by giving the smallest and largest numbers. What happens when the smallest and largest numbers are
(a) increment?
(b) decremented?
4F 68 68 A8 A8 A8 C0 C0 00 00
(a) two consecutive ASCII-encoded characters
(b) one 8-bit fraction (unsigned)
(c) one 8-bit sign-and-magnitude integer
(d) one 8-bit one's complement integer
(e) one 8-bit two's compliment integer
(f) one 32-bit IEEE format floating point number (Hint: the format consists of 1 bit for sign, 8 bits for exponent in excess of 127 and 23 bits for drop-one mantissa).
Interpret the dump and convert it into two characters, one decimal fraction value, three decimal integer values, and one decimal floating point value that are stored consecutively in this memory segment.
2- Given the following Java code segment
short j = 32767;
j++;
System.out.println(j);
(a) What value is printed out?
(b) Do the math to show how the answer is obtained.
3- Using 2's complement binary arithmetic with a 12-bit word,write down the range of numbers capable of being represented(both in decimal and binary formats) by giving the smallest and largest numbers. What happens when the smallest and largest numbers are
(a) increment?
(b) decremented?