Hi how can i represent any number in 32 bit signed 1QN format.. Let it be -1.5

# 1QN representation

Started by ●September 17, 2008

Posted by ●September 17, 2008

knightwrites: > Hi > > how can i represent any number in 32 bit signed 1QN format.. > Let it be -1.5What is "1QN" format? -- % Randy Yates % "She has an IQ of 1001, she has a jumpsuit %% Fuquay-Varina, NC % on, and she's also a telephone." %%% 919-577-9882 % %%%%% 'Yours Truly, 2095', *Time*, ELO http://www.digitalsignallabs.com

Posted by ●September 17, 2008

On Sep 17, 10:40�am, Randy Yateswrote: > knightBoth, Google is your friend. Regards. Kenwrites: > > Hi > > > how can i represent any number in 32 bit signed 1QN format.. > > Let it be -1.5 > > What is "1QN" format? > -- > % �Randy Yates � � � � � � � � �% "She has an IQ of 1001, she has a jumpsuit > %% Fuquay-Varina, NC � � � � � �% � � � � � �on, and she's also a telephone." > %%% 919-577-9882 � � � � � � � �% > %%%% � � � � � % � � � �'Yours Truly, 2095', *Time*, ELO �http://www.digitalsignallabs.com

Posted by ●September 17, 2008

Ken Asburywrites: > On Sep 17, 10:40�am, Randy YatesBullshit. Half the time I google, I spend a SIGNIFICANT amount of time sifting through the results looking for the gold specks in a bunch of dirt, and often they aren't there. -- % Randy Yates % "Remember the good old 1980's, when %% Fuquay-Varina, NC % things were so uncomplicated?" %%% 919-577-9882 % 'Ticket To The Moon' %%%%wrote: >> knight writes: >> > Hi >> >> > how can i represent any number in 32 bit signed 1QN format.. >> > Let it be -1.5 >> >> What is "1QN" format? >> -- >> % �Randy Yates � � � � � � � � �% "She has an IQ of 1001, she has a jumpsuit >> %% Fuquay-Varina, NC � � � � � �% � � � � � �on, and she's also a telephone." >> %%% 919-577-9882 � � � � � � � �% >> %%%% � � � � � % � � � �'Yours Truly, 2095', *Time*, ELO �http://www.digitalsignallabs.com > > Both, > > Google is your friend. % *Time*, Electric Light Orchestra http://www.digitalsignallabs.com

Posted by ●September 17, 2008

On Sep 17, 11:11�am, Randy Yateswrote: > Ken AsburyRandy, Geez, sorry to piss you off, man. To save your having to waste time sorting down to the 8th Google item, here's a link: http://newsgroups.derkeiler.com/Archive/Comp/comp.arch.fpga/2006-02/msg00938.html Knight, Until your time is as valuable as Randy's, Google is your friend. Regards, Kenwrites: > > On Sep 17, 10:40�am, Randy Yates wrote: > >> knight writes: > >> > Hi > > >> > how can i represent any number in 32 bit signed 1QN format.. > >> > Let it be -1.5 > > >> What is "1QN" format? > >> -- > >> % �Randy Yates � � � � � � � � �% "She has an IQ of 1001, she has a jumpsuit > >> %% Fuquay-Varina, NC � � � � � �% � � � � � �on, and she's also a telephone." > >> %%% 919-577-9882 � � � � � � � �% > >> %%%% � � � � � % � � � �'Yours Truly, 2095', *Time*, ELO �http://www.digitalsignallabs.com > > > Both, > > > Google is your friend. > > Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time > sifting through the results looking for the gold specks in a bunch of > dirt, and often they aren't there. > -- > % �Randy Yates � � � � � � � � �% "Remember the good old 1980's, when > %% Fuquay-Varina, NC � � � � � �% �things were so uncomplicated?" > %%% 919-577-9882 � � � � � � � �% 'Ticket To The Moon' > %%%% � � � � � % *Time*, Electric Light Orchestrahttp://www.digitalsignallabs.com- Hide quoted text - > > - Show quoted text -

Posted by ●September 17, 2008

"Randy Yates"wrote in message news:m34p4e6c3v.fsf@local.localhost... > > Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time > sifting through the results looking for the gold specks in a bunch of > dirt, and often they aren't there. > --Randy, If you're having trouble finding things with search engines, you could try Googling for "How to google". In this industry, if you can't work a search engine, you're in big trouble. If you can't be arsed to do that, here's a link. ;-) http://sudarmuthu.com/blog/2006/05/07/google-search-syntax-dissected.html HTH., Syms. p.s. To the OP, I replied on C.A.F.

Posted by ●September 17, 2008

Ken Asbury wrote:> On Sep 17, 11:11 am, Randy YatesYou're both right. Google *CAN* be useful. Google is often a *PAIN*!!!! And you can't be sure which it will be until _after_ the search. I've made a semi-hobby of outsmarting Google for the last 18 months. One thing I've learned is precede all search terms with "allintext:" . That limits hits to pages with search term in body of page. Otherwise some hits will be to pages which make a reference to pages which contain the search term. The art comes in choosing optimum boolean expression to get what you really want ;)wrote: > >>Ken Asbury writes: >> >>>On Sep 17, 10:40 am, Randy Yates wrote: >>> >>>>knight writes: >>>> >>>>>Hi >> >>>>>how can i represent any number in 32 bit signed 1QN format.. >>>>>Let it be -1.5 >> >>>>What is "1QN" format? >>>>-- >>>>% Randy Yates % "She has an IQ of 1001, she has a jumpsuit >>>>%% Fuquay-Varina, NC % on, and she's also a telephone." >>>>%%% 919-577-9882 % >>>>%%%% % 'Yours Truly, 2095', *Time*, ELO http://www.digitalsignallabs.com >> >>>Both, >> >>>Google is your friend. >> >>Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time >>sifting through the results looking for the gold specks in a bunch of >>dirt, and often they aren't there. >>-- >>% Randy Yates % "Remember the good old 1980's, when >>%% Fuquay-Varina, NC % things were so uncomplicated?" >>%%% 919-577-9882 % 'Ticket To The Moon' >>%%%% % *Time*, Electric Light Orchestrahttp://www.digitalsignallabs.com- Hide quoted text - >> >>- Show quoted text - > > > Randy, > Geez, sorry to piss you off, man. > To save your having to waste time sorting down to the 8th Google item, > here's a link: > http://newsgroups.derkeiler.com/Archive/Comp/comp.arch.fpga/2006-02/msg00938.html > > > Knight, > Until your time is as valuable as Randy's, Google is your friend. > > Regards, > Ken

Posted by ●September 17, 2008

Ken Asburywrites: > On Sep 17, 11:11�am, Randy YatesWell, thanks Ken. I'm not pissed off, just expressing an opinion.wrote: >> Ken Asbury writes: >> > On Sep 17, 10:40�am, Randy Yates wrote: >> >> knight writes: >> >> > Hi >> >> >> > how can i represent any number in 32 bit signed 1QN format.. >> >> > Let it be -1.5 >> >> >> What is "1QN" format? >> >> -- >> >> % �Randy Yates � � � � � � � � �% "She has an IQ of 1001, she has a jumpsuit >> >> %% Fuquay-Varina, NC � � � � � �% � � � � � �on, and she's also a telephone." >> >> %%% 919-577-9882 � � � � � � � �% >> >> %%%% � � � � � % � � � �'Yours Truly, 2095', *Time*, ELO �http://www.digitalsignallabs.com >> >> > Both, >> >> > Google is your friend. >> >> Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time >> sifting through the results looking for the gold specks in a bunch of >> dirt, and often they aren't there. >> -- >> % �Randy Yates � � � � � � � � �% "Remember the good old 1980's, when >> %% Fuquay-Varina, NC � � � � � �% �things were so uncomplicated?" >> %%% 919-577-9882 � � � � � � � �% 'Ticket To The Moon' >> %%%% � � � � � % *Time*, Electric Light Orchestrahttp://www.digitalsignallabs.com- Hide quoted text - >> >> - Show quoted text - > > Randy, > Geez, sorry to piss you off, man. > To save your having to waste time sorting down to the 8th Google item, > here's a link: > > http://newsgroups.derkeiler.com/Archive/Comp/comp.arch.fpga/2006-02/msg00938.html > Knight, Until your time is as valuable as Randy's, Google is your > friend.Perhaps we should all think like you, Ken? -- % Randy Yates % "And all that I can do %% Fuquay-Varina, NC % is say I'm sorry, %%% 919-577-9882 % that's the way it goes..." %%%%% Getting To The Point', *Balance of Power*, ELO http://www.digitalsignallabs.com

Posted by ●September 17, 2008

Ken Asburywrote: >On Sep 17, 11:11�am, Randy Yateswrote: >> Ken Asburywrites: >>> Google is your friend.>> Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time >> sifting through the results looking for the gold specks in a bunch of >> dirt, and often they aren't there.>Geez, sorry to piss you off, man. >To save your having to waste time sorting down to the 8th Google item, >here's a link: >http://newsgroups.derkeiler.com/Archive/Comp/comp.arch.fpga/2006-02/msg00938.html1QN seems to mean fractional two's complement in some proprietary context. The OP should use more standard terminology. Participants shouldn't have to google stuff like this up. Steve

Posted by ●September 17, 2008

On Sep 18, 1:00�am, spop...@speedymail.org (Steve Pope) wrote:> Ken Asbury �I thought that was fairly standard terminology Q15 == no integer part and 15 bits of fraction Q31 == no integer part and 31 bits of fraction 1Q14 == 1 integer bit and 14 bits of fraction 1QN == 1 integer bit and all the remaining bits (however many they may be) are fraction All these kinda assume there is a sign bit as well. People don't often express unsigned fixed point in this way. I wonder what might be consider the appropriate shorthand way to say "no sign, no integer part and 16 bits of fraction"? Regards, Stevewrote: > > >On Sep 17, 11:11�am, Randy Yates wrote: > >> Ken Asbury writes: > >>> Google is your friend. > >> Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time > >> sifting through the results looking for the gold specks in a bunch of > >> dirt, and often they aren't there. > >Geez, sorry to piss you off, man. > >To save your having to waste time sorting down to the 8th Google item, > >here's a link: > >http://newsgroups.derkeiler.com/Archive/Comp/comp.arch.fpga/2006-02/m... > > 1QN seems to mean fractional two's complement in some proprietary > context. > > The OP should use more standard terminology. �Participants shouldn't > have to google stuff like this up. > > Steve

Posted by ●September 28, 2008

>Hi > >how can i represent any number in 32 bit signed 1QN format.. >Let it be -1.5 >Explanation of 1Qn representation at Freescale "MCF5271 Reference Manual" - chapter "4.5.2 Data Representation": Two’s complement, signed fractional: In an N-bit number, the first bit is the sign bit. The remaining bits signify the first N-1 bits after the binary point. Given an N-bit number, a[N-1]a[N-2]a[N-3]... a[2]a[1]a[0], its value is given by the equation in Figure 4-9. value = -(1*a[N-1])+Sum{2^(i+1_N)} where i=0 to N-2 Figure 4-9. Two’s Complement, Signed Fractional Equation. This format can represent numbers in the range -1 < operand < 1 - 2(N-1). For words and longwords, the largest negative number that can be represented is -1, whose internal representation is 0x8000 and 0x8000_0000, respectively. The largest positive word is 0x7FFF or (1 - 2-15); the most positive longword is 0x7FFF_FFFF or (1 - 2-31). To compute, you can use the following defines: typedef long FRAC32; // Duplicated in datastruct.h #define D_TO_F32(X) ((long)((X)*2147483648.0)) #define F32_TO_D(X) (((double)(X)) / 2147483648.0) See also related application notes and libraries at www.freescale.com

Posted by ●September 19, 2008

On Sep 17, 12:53 pm, Richard Owlettwrote: > Ken Asbury wrote: > > On Sep 17, 11:11 am, Randy Yatesi usually find Google to be useful and can usually find the necessary page after a couple of hits. Google is also pretty good at correcting my spelling errors (and reading my mind). one recent exception is this SF hotel i wanted to stay at where i was 2 years ago for the AES convention in '06 (it was a good tradeoff of cost, location, and decency). i could only remember "Milthia Hotel" and got *no* hits. finally gave up, went to hotels.com and did a general search and saw the name: Mithila. even though i could group "Milthia" with SF and even "Sutter St", it had no idea what i was typing about. that was one spelling error it did not correct. just 1 misplaced "l".wrote: > > >>Ken Asbury writes: > > >>>On Sep 17, 10:40 am, Randy Yates wrote: > > >>>>knight writes: > > >>>>>Hi > > >>>>>how can i represent any number in 32 bit signed 1QN format.. > >>>>>Let it be -1.5 > > >>>>What is "1QN" format? > >>>>-- > >>>>% Randy Yates % "She has an IQ of 1001, she has a jumpsuit > >>>>%% Fuquay-Varina, NC % on, and she's also a telephone." > >>>>%%% 919-577-9882 % > >>>>%%%% % 'Yours Truly, 2095', *Time*, ELO http://www.digitalsignallabs.com > > >>>Both, > > >>>Google is your friend. > > >>Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time > >>sifting through the results looking for the gold specks in a bunch of > >>dirt, and often they aren't there. > >>-- > >>% Randy Yates % "Remember the good old 1980's, when > >>%% Fuquay-Varina, NC % things were so uncomplicated?" > >>%%% 919-577-9882 % 'Ticket To The Moon' > >>%%%% % *Time*, Electric Light Orchestrahttp://www.digitalsignallabs.com-Hide quoted text - > > >>- Show quoted text - > > > Randy, > > Geez, sorry to piss you off, man. > > To save your having to waste time sorting down to the 8th Google item, > > here's a link: > >http://newsgroups.derkeiler.com/Archive/Comp/comp.arch.fpga/2006-02/m... > > > Knight, > > Until your time is as valuable as Randy's, Google is your friend. > > > Regards, > > Ken > > You're both right. > Google *CAN* be useful. > Google is often a *PAIN*!!!! > And you can't be sure which it will be until _after_ the search. > I've made a semi-hobby of outsmarting Google for the last 18 months. > One thing I've learned is precede all search terms with "allintext:" . > That limits hits to pages with search term in body of page. Otherwise > some hits will be to pages which make a reference to pages which contain > the search term. The art comes in choosing optimum boolean expression to > get what you really want ;)i don't even know about those options. i never knew of the "allintext:" specification. r b-j

Posted by ●September 19, 2008

Steve Pope wrote: (snip)> I myself have never seen this "1QN" family of notations > before. Of course there are many standards I have never > seen.The PL/I form is the total bits (not including sign) and fraction bits, in the form FIXED BINARY(31,16) the scale factor (fraction bits) can be negative or greater than the total bits. -- glen

Posted by ●September 18, 2008

Darol Klawetterwrote: >The "Q" format is also used in the datasheets of Xilinx FPGA fixed- >point logic cores.A link posted earlier suggested that is where the Q terminlogy arose. Steve

Posted by ●September 18, 2008

On Sep 17, 8:30 pm, spop...@speedymail.org (Steve Pope) wrote:>The "Q" format is also used in the datasheets of Xilinx FPGA fixed- point logic cores.wrote: > >On Sep 18, 1:00 am, spop...@speedymail.org (Steve Pope) wrote: > >> 1QN seems to mean fractional two's complement in some proprietary > >> context. > >> The OP should use more standard terminology. Participants shouldn't > >> have to google stuff like this up. > >I thought that was fairly standard terminology > > >Q15 == no integer part and 15 bits of fraction > >Q31 == no integer part and 31 bits of fraction > >1Q14 == 1 integer bit and 14 bits of fraction > >1QN == 1 integer bit and all the remaining bits (however many they may > >be) are fraction > >All these kinda assume there is a sign bit as well. People don't often > >express unsigned fixed point in this way. I wonder what might be > >consider the appropriate shorthand way to say "no sign, no integer > >part and 16 bits of fraction"? > > I personally might call this a "fractional unsigned number". > > I myself have never seen this "1QN" family of notations > before. Of course there are many standards I have never > seen. Among unambiguous standards, I like System C fixed-point > types. Failing that plain English works ("X is a 20-bit 2's > complement value with three bits to the left of the binary point"). > > Steve

Posted by ●September 18, 2008

On Sep 17, 9:30�pm, spop...@speedymail.org (Steve Pope) wrote:>The form was commonly used in fractional machines (no overflow on division) in the days before they invented dirt (but not before Knuth) for doing orbital math and suchlike in assembly language. Fractional machines considered the leftmost (sign) bit as B0. Regards, Kenwrote: > >On Sep 18, 1:00�am, spop...@speedymail.org (Steve Pope) wrote: > >> 1QN seems to mean fractional two's complement in some proprietary > >> context. > >> The OP should use more standard terminology. �Participants shouldn't > >> have to google stuff like this up. > >I thought that was fairly standard terminology > > >Q15 == no integer part and 15 bits of fraction > >Q31 == no integer part and 31 bits of fraction > >1Q14 == 1 integer bit and 14 bits of fraction > >1QN == 1 integer bit and all the remaining bits (however many they may > >be) are fraction > >All these kinda assume there is a sign bit as well. People don't often > >express unsigned fixed point in this way. I wonder what might be > >consider the appropriate shorthand way to say "no sign, no integer > >part and 16 bits of fraction"? > > I personally might call this a "fractional unsigned number". > > I myself have never seen this "1QN" family of notations > before. �Of course there are many standards I have never > seen. �Among unambiguous standards, I like System C fixed-point > types. �Failing that plain English works ("X is a 20-bit 2's > complement value with three bits to the left of the binary point"). > > Steve- Hide quoted text - > > - Show quoted text -

Posted by ●September 17, 2008

wrote: >On Sep 18, 1:00�am, spop...@speedymail.org (Steve Pope) wrote:>> 1QN seems to mean fractional two's complement in some proprietary >> context.>> The OP should use more standard terminology. �Participants shouldn't >> have to google stuff like this up.>I thought that was fairly standard terminology > >Q15 == no integer part and 15 bits of fraction >Q31 == no integer part and 31 bits of fraction >1Q14 == 1 integer bit and 14 bits of fraction >1QN == 1 integer bit and all the remaining bits (however many they may >be) are fraction>All these kinda assume there is a sign bit as well. People don't often >express unsigned fixed point in this way. I wonder what might be >consider the appropriate shorthand way to say "no sign, no integer >part and 16 bits of fraction"?I personally might call this a "fractional unsigned number". I myself have never seen this "1QN" family of notations before. Of course there are many standards I have never seen. Among unambiguous standards, I like System C fixed-point types. Failing that plain English works ("X is a 20-bit 2's complement value with three bits to the left of the binary point"). Steve

Posted by ●September 17, 2008

On Sep 18, 1:00�am, spop...@speedymail.org (Steve Pope) wrote:> Ken Asbury �I thought that was fairly standard terminology Q15 == no integer part and 15 bits of fraction Q31 == no integer part and 31 bits of fraction 1Q14 == 1 integer bit and 14 bits of fraction 1QN == 1 integer bit and all the remaining bits (however many they may be) are fraction All these kinda assume there is a sign bit as well. People don't often express unsigned fixed point in this way. I wonder what might be consider the appropriate shorthand way to say "no sign, no integer part and 16 bits of fraction"? Regards, Stevewrote: > > >On Sep 17, 11:11�am, Randy Yates wrote: > >> Ken Asbury writes: > >>> Google is your friend. > >> Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time > >> sifting through the results looking for the gold specks in a bunch of > >> dirt, and often they aren't there. > >Geez, sorry to piss you off, man. > >To save your having to waste time sorting down to the 8th Google item, > >here's a link: > >http://newsgroups.derkeiler.com/Archive/Comp/comp.arch.fpga/2006-02/m... > > 1QN seems to mean fractional two's complement in some proprietary > context. > > The OP should use more standard terminology. �Participants shouldn't > have to google stuff like this up. > > Steve

Posted by ●September 17, 2008

Ken Asburywrote: >On Sep 17, 11:11�am, Randy Yateswrote: >> Ken Asburywrites: >>> Google is your friend.>> Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time >> sifting through the results looking for the gold specks in a bunch of >> dirt, and often they aren't there.>Geez, sorry to piss you off, man. >To save your having to waste time sorting down to the 8th Google item, >here's a link: >http://newsgroups.derkeiler.com/Archive/Comp/comp.arch.fpga/2006-02/msg00938.html1QN seems to mean fractional two's complement in some proprietary context. The OP should use more standard terminology. Participants shouldn't have to google stuff like this up. Steve

Posted by ●September 17, 2008

Ken Asbury wrote:> On Sep 17, 11:11 am, Randy YatesYou're both right. Google *CAN* be useful. Google is often a *PAIN*!!!! And you can't be sure which it will be until _after_ the search. I've made a semi-hobby of outsmarting Google for the last 18 months. One thing I've learned is precede all search terms with "allintext:" . That limits hits to pages with search term in body of page. Otherwise some hits will be to pages which make a reference to pages which contain the search term. The art comes in choosing optimum boolean expression to get what you really want ;)wrote: > >>Ken Asbury writes: >> >>>On Sep 17, 10:40 am, Randy Yates wrote: >>> >>>>knight writes: >>>> >>>>>Hi >> >>>>>how can i represent any number in 32 bit signed 1QN format.. >>>>>Let it be -1.5 >> >>>>What is "1QN" format? >>>>-- >>>>% Randy Yates % "She has an IQ of 1001, she has a jumpsuit >>>>%% Fuquay-Varina, NC % on, and she's also a telephone." >>>>%%% 919-577-9882 % >>>>%%%% % 'Yours Truly, 2095', *Time*, ELO http://www.digitalsignallabs.com >> >>>Both, >> >>>Google is your friend. >> >>Bullshit. Half the time I google, I spend a SIGNIFICANT amount of time >>sifting through the results looking for the gold specks in a bunch of >>dirt, and often they aren't there. >>-- >>% Randy Yates % "Remember the good old 1980's, when >>%% Fuquay-Varina, NC % things were so uncomplicated?" >>%%% 919-577-9882 % 'Ticket To The Moon' >>%%%% % *Time*, Electric Light Orchestrahttp://www.digitalsignallabs.com- Hide quoted text - >> >>- Show quoted text - > > > Randy, > Geez, sorry to piss you off, man. > To save your having to waste time sorting down to the 8th Google item, > here's a link: > http://newsgroups.derkeiler.com/Archive/Comp/comp.arch.fpga/2006-02/msg00938.html > > > Knight, > Until your time is as valuable as Randy's, Google is your friend. > > Regards, > Ken