35.7k views
4 votes
The first two bytes of a 2M × 16 main memory have the following hex values:

• Byte 0 is FE


• Byte 1 is 01


If these bytes hold a 16-bit two’s complement integer, what is its actual decimal value if:


a) memory is big endian?

1 Answer

1 vote

Final answer:

The 16-bit two's complement integer represented by the hex values FE01 in big endian format is -511 in decimal. This is calculated by considering the big endian format and applying the rules of two's complement to the given hex values.

Step-by-step explanation:

The question relates to understanding how a 16-bit two's complement integer is represented in a 2M × 16 main memory structure, specifically when considering a big endian configuration. In big endian format, the most significant byte (MSB) is stored at the lowest memory address and the least significant byte (LSB) at the highest.

Given the provided hexadecimal values, Byte 0 (FE) is the MSB and Byte 1 (01) is the LSB, forming the 16-bit integer FE0116. When converted to decimal, the two's complement value of FE0116 represents the negative number -511 in decimal.

This result is obtained by first understanding that the most significant bit of FE (111111102 in binary) denotes a negative number in two's complement representation, and then we calculate the value by negating the binary representation and adding one (the two's complement operation) and interpreting it in decimal.

User Cetioren
by
8.3k points