20060430, 23:33  #1  
Jan 2005
13 Posts 
16bits problem ?
hello everyone,
I have a problem with 16bits , would anyone help me please!?. Quote:


20060430, 23:54  #2 
∂^{2}ω=0
Sep 2002
Repรบblica de California
2^{5}·367 Posts 
Since the problem only asks you to maximize the *number* of (presumably) distinct representable reals in the given interval, the precise interval doesn't matter  the answer is the same as "how many distinct integers can one represent using a 16bit field?" The only difference is that to map some given 16bit variable to a real interval, one needs some implied knowledge about the mapping (e.g. is it uniform or not).

20060501, 01:27  #3 
Sep 2002
1010010110_{2} Posts 
Single precision floating point numbers fit in 32 bits.
If you google floating point single the first link shows the 32 bit format, some off the other links wiki are also informative. The principals used by 32 bit singles could apply to a 16 bit version with a reduced range. There is also a 64 bit double precision version. Also there are fixed point numbers with values past the binary point of 1/2, 1/4, 1/8 etc. You could encode the 2,1,0,1,2 and then the fractional part. 
20060501, 02:12  #4 
Nov 2004
UK
2·19 Posts 
2^16 is 65536, so your range could be:
32768 = 2 to 32 32767 = 2 (assuming signed short integers) Try http://en.wikipedia.org/wiki/Fixedpoint_arithmetic for more information. 
20060501, 02:15  #5 
Jan 2005
13 Posts 
I wanna say thanks for your all comments.
To ewmayer, how many distinct integers can one represent using a 16bit field? To dsouza123, 2,1,0,1,2 and 1/2, 1/4, 1/8 etc ==>Is this the answer ? humm, sorry, i am alittle bit confuse here.. 
20060501, 12:41  #6 
Sep 2002
2×331 Posts 
My suggestion of integer part and fractional part using
fixed point is correct in principal, encoding it to maximize the 16 bits worth of possible encoded values is the tricky part. PS 16 bits = 2^16 = 65536 maximum possible encoded values. How efficiently your range is mapped will determine your count. Google for fixed point encoding. Your other option is a 16 bit floating point format, with the maximizing the encoding still the tricky part. 
20060502, 17:37  #7 
Sep 2002
2·331 Posts 
The best I could come up with was a twos complement
mapping but the range isn't what you specified [2 > 0 > 2] If 2 of the 16 bits hold the integer and 14 for the fraction. The integer values are 1,0,1,2 So the range is 1.xx (just smaller than 2) down to 2.xx (just bigger than 3). [1.xx > 0 > 2.xx] Maybe some forum members that excel in math have better ideas that they are willing to reveal and discuss. 
20060502, 18:30  #8  
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
11,503 Posts 
Quote:
Place 65536 points anywhere on the real number line between those two boundaries. The only condition is that no two points are coincident. Label the points, in any order you feel like, with the numbers 0000 0000 0000 0000, 0000 0000 0000 0001, 0000 0000 0000 0010, ... 1111 1111 1111 1110, 1111 1111 1111 1111 where the numbers are written in binary to show that they are indeed 16bits long. You have now solved your problem. Paul 

20060502, 20:33  #9  
Bamboozled!
"๐บ๐๐ท๐ท๐ญ"
May 2003
Down not across
11,503 Posts 
Quote:
People who expect other people to do their homework for them deserve all they get. Paul 

20060503, 16:57  #10  
"Richard B. Woods"
Aug 2002
Wisconsin USA
2^{2}·3·641 Posts 
Quote:
The original statement was "Give a method and/or formula for representing as many of the real numbers in the interval [2.0,2.0] as possible using 16bits to represent each number." Your scheme of labeling 65536 points with 16bit numbers requires having an associated 1to1 mapping table, which seems too complex to qualify as the sort of "formula" requested, and also violates the "using 16bits to represent each number" clause. In your scheme, each number is represented by a 16bit number plus a mapping table entry representing or containing the associated real number, thus only serving to push back the required 16bit representation into the mapping table or beyond. One method and/or formula satisfying the constraints is ... whoops, almost did the homework there. Hint: Knuth Quote:
Last fiddled with by cheesehead on 20060503 at 17:04 

20060503, 17:59  #11  
"Bob Silverman"
Nov 2003
North of Boston
1D3A_{16} Posts 
Quote:
Trivially, one can represent at most 2^16 numbers in the interval. Any convenient map from [0, 2^161] to [2, 2] will suffice. I presume that you do know how to find the coefficients of a straight line? So Just consider the line segment with endpoints [2, 0], [2, 2^161]. Another trivial solution is the map x : > 1/x if x > 0 0 if x = 0 Of course, this skips mapping the negative numbers, but we can only map 2^16 numbers in total anyway. Nothing in the problem says that the map must be uniformly distributed. This clearly maps each element in the set [0, 2^161] to a distinct element of the set [2, 2]. This is a trivial problem in first year middle school algebra. Has education gotten so bad, that people can't fit a straight line and don't know what a function is? 

Thread Tools  
Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
What is the problem here?  didgogns  Msieve  1  20161115 03:31 
problem 2.4  MattcAnderson  Puzzles  4  20140821 04:40 
PSU problem?  ian209  Hardware  4  20060218 19:52 
51 problem  Neves  Miscellaneous Math  5  20040210 22:59 
51 problem  Neves  Puzzles  15  20040205 23:11 