Binary numbers- how to normalize?

Click For Summary

Discussion Overview

The discussion revolves around the normalization of binary numbers, specifically focusing on the binary representation of the fraction x = 7/10 and how to express it in a normalized form suitable for storage in a 32-bit computer. Participants explore the challenges of representing certain fractions in binary and the implications for floating-point representation.

Discussion Character

  • Homework-related
  • Technical explanation
  • Conceptual clarification
  • Debate/contested

Main Points Raised

  • One participant presents the binary form of 7/10 as 0.101100110011001100..., expressing uncertainty about how to normalize this representation.
  • Another participant notes that many fractions, including 7/10, cannot be stored exactly in binary and suggests finding the nearest 32-bit binary numbers by rounding the sequence.
  • A different participant shares an example of normalizing the binary form of 2/7, illustrating the process but expressing uncertainty about deriving the final normalized form.
  • One participant provides a detailed breakdown of the binary representation and discusses truncating to 32 bits, while also suggesting converting back to decimal for clarity.
  • Another participant raises considerations about the floating-point representation, emphasizing the need to reserve bits for the sign and exponent, and explains the concept of normalization in both binary and decimal systems.

Areas of Agreement / Disagreement

Participants express varying levels of understanding regarding normalization and the representation of binary fractions. There is no consensus on the exact method for deriving the normalized form, and multiple viewpoints on the implications of floating-point representation are presented.

Contextual Notes

Participants acknowledge the limitations of binary representation for certain fractions and the need for rounding when working within a fixed bit-width. The discussion highlights unresolved aspects of how to derive normalized forms and the implications of bit allocation for sign and exponent in floating-point representation.

ruby_duby
Messages
46
Reaction score
0

Homework Statement



Find the binary form of x= 7/10

Suppose that the number x= 7/10 is to be stored in a 32-bit computer, find the nearby machine numbers x_ and x+


Homework Equations





The Attempt at a Solution



I have found that 7/10 in binary form is: 0.101100110011001100...

However I don not know how to normalise/ standardise this. Can anybody help please!
 
Physics news on Phys.org
Not sure exactly what you mean by normalise.

7/10 like most numbers can't be stored exactly in binary (just as 1/3 can't be stored exactly in decimal)
If you only have 32bits (ie 32 places) what are the nearest 32bit binary numbers made by rounding this sequence up and down? What fractions do they correspond to?
 
ok I'm not entirely sure either if I'm honest but let me try and explain using an example:

If i find that the binary form of x= 2/7 to be: 0.0101001001...

which when normalised becomes: (1.001001001...)x 2^-2

its the last line, that i do not know how to derive
 
0.101100110011001100110011001100

Showing this as 2^-n, ie 1/2 + 1/4 + 1/8 + 1/16, truncating this to 32bits and splitting into 8bits to make it readable
10110011 00110011 00110011 00110011 (0011...)

rounding up the remaining (0011...) would give you
10110011 00110011 00110011 00110100

Now just convert these back into decimals
Now work out what
 
Some more things to think about regarding floating point
  • You better to reserve one of those 32 bits for the sign. Otherwise, how do you represent -7/10?
  • You better reserve some of the remaining 31 bits for the exponent. Otherwise, how do you represent 7/1000000?
  • Every positive number can be expressed as 1.xxxxxx...*2exponent. This is the normalized form. When normalized, there will be one digit to the left of the binary point and it is always one. Do you need to store that leading one?
ruby_duby said:
ok I'm not entirely sure either if I'm honest but let me try and explain using an example:

If i find that the binary form of x= 2/7 to be: 0.0101001001...

which when normalised becomes: (1.001001001...)x 2^-2

its the last line, that i do not know how to derive

It works the same way it works in decimal. Consider 1/400=0.0025. Let's normalized this. In general, you shift the decimal point until you finally get exactly one nonzero digit to the left of the decimal point, keeping track of how many places you moved the decimal point (to the left=positive, right=negative). In this case you have to move the decimal point three places to the right. The normalized form is 2.5×10-3.

No difference conceptually in binary. The base is 2, so instead of multiplying by 10shift count you are multiplying by 2shift count.
 

Similar threads

  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
11K
Replies
1
Views
4K
Replies
4
Views
2K