MHB Computer system : Clarification needed

  • Thread starter Thread starter mathmari
  • Start date Start date
  • Tags Tags
    Computer System
Click For Summary
The discussion focuses on understanding how computer memory addresses data using big-endian and little-endian formats. Participants clarify how to interpret a memory layout for various data types, including 64-bit integers, fixed-point numbers, and IEEE 754 floating-point representations. The significance of byte order is emphasized, particularly in how it affects the calculation of values based on the arrangement of bits. There is also a detailed explanation of the IEEE 754 standard, including the roles of the sign bit, exponent, and fraction in floating-point representation. Overall, the conversation aims to demystify the exercise statement regarding data storage in computer systems.
  • #31
Klaas van Aarsen said:
We found the exponent 100111001101111, which is a 2's complement number.
Since the first bit is 1, it is negative.
We take the complement and add 1 to make it positive.
That is 011000110010000+1=011000110010001.
Now we can find the number as usual, after which we need to put a $-$ sign in front of it. 🤔

So do we have the following ? First we write all digits again next to each other :

01001110 01101111 01101001 01110100 01000001 01100011 01100001 01010110

The first digit is the sign, so 0.

The following 15 digits represent the exponent, 100111001101111, which is a 2's complement number.

Since the first bit is 1, it is negative.

We take the complement and add 1 to make it positive.

That is 011000110010000+1=011000110010001, which corresponds to $12689$, so the exponent is $-12689$, right?

So is the actual exponent is $20079-(-12689)=32768$.

Then we get the fraction, which starts with 0110.

So the fraction is $0\cdot 2^{-1} + 1\cdot 2^{-2} + 1\cdot 2^{-3} + 0\cdot 2^{-4} +\ldots \approx 0.375$

So the number is approximately $+1.375\cdot 2^{32768}$. :unsure:
 
Technology news on Phys.org
  • #32
mathmari said:
We take the complement and add 1 to make it positive.

That is 011000110010000+1=011000110010001, which corresponds to $12689$, so the exponent is $-12689$, right?
So is the actual exponent is $20079-(-12689)=32768$.

So the number is approximately $+1.375\cdot 2^{32768}$.
The exponent is $-12689$ instead.
We could also have calculated it by subtracting $32768$ from the $20079$ you found.
Note that $32768$ is $1000000000000000$ in binary, which is 16 bits. 🤔

So the number is approximately $+1.375\cdot 2^{-12689}$. 🤔
 
  • #33
Klaas van Aarsen said:
The exponent is $-12689$ instead.
We could also have calculated it by subtracting $32768$ from the $20079$ you found.
Note that $32768$ is $1000000000000000$ in binary, which is 16 bits. 🤔

So the number is approximately $+1.375\cdot 2^{-12689}$. 🤔

Ahh ok! I think I understood that now! Thank you very much! (Sun)
 

Similar threads

  • · Replies 30 ·
2
Replies
30
Views
6K
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 3 ·
Replies
3
Views
8K
  • · Replies 23 ·
Replies
23
Views
5K
  • · Replies 7 ·
Replies
7
Views
4K
Replies
10
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K