DSPRelated.com
Forums

Continuous-time DSP with no sampling

Started by Yannis November 2, 2005
in article GZudnR-nuJ1iBuXeRVn-rQ@rcn.net, Jerry Avins at jya@ieee.org wrote
on 11/14/2005 09:15:

> robert bristow-johnson wrote: >> in article AaadnfuiMfkDneXenZ2dnUVZ_sudnZ2d@rcn.net, Jerry Avins at >> jya@ieee.org wrote on 11/13/2005 22:12: >> >> >>> A Gray code is one in which -- with a single exception -- codes for >>> adjacent states differ by only one bit. >> >> >> ??? >> >> what's that single exception, Jerry? > > Wraparound.
but, i think even in that case, there is only one bit changing when you change to neighboring states, including a wrapped around state. the first i ever learned about Gray code was with mechanical shaft encoders. in fact, the quadrature shaft encoder that at least the older mice and trackballs used, were a two bit Gray code. -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
mk wrote:
> On Mon, 14 Nov 2005 09:15:27 -0500, Jerry Avins <jya@ieee.org> wrote: > > >>robert bristow-johnson wrote: >> >>>in article AaadnfuiMfkDneXenZ2dnUVZ_sudnZ2d@rcn.net, Jerry Avins at >>>jya@ieee.org wrote on 11/13/2005 22:12: >>> >>> >>> >>>>A Gray code is one in which -- with a single exception -- codes for >>>>adjacent states differ by only one bit. >>> >>> >>>??? >>> >>>what's that single exception, Jerry? >> >>Wraparound. > > > Then we're talking about different things (said he jumping into the > discussion.) All the gray codes I've used so far have no such > exception. An asynchronous FIFO pointer synchronization would get very > upset if there were such an exception and would fail consistently when > it occured. The following code doesn't have an exception: > 000 001 011 010 110 111 101 100
Like straight binary, offset binary and two's-complement binary, Gray codes lie on a number circle, with the largest represented quantity being adjacent to the smallest. In the case of Gray, that is also a one-bit difference. Many operations make use of the circularity, including the circular buffer you diagrammed and overflows washing out in a well behaved two's-complement sum. Assign numbers to the states above, and I think that what I meant will come clear. Gray 000 001 011 010 110 111 101 100 binary 000 001 010 011 100 101 110 111 octal 0 1 2 3 4 5 6 7 Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
in article 2KKdnTSDMsMdXOXeRVn-sA@rcn.net, Jerry Avins at jya@ieee.org wrote
on 11/14/2005 11:55:

> mk wrote: >> On Mon, 14 Nov 2005 09:15:27 -0500, Jerry Avins <jya@ieee.org> wrote: >> >> >>> robert bristow-johnson wrote: >>> >>>> in article AaadnfuiMfkDneXenZ2dnUVZ_sudnZ2d@rcn.net, Jerry Avins at >>>> jya@ieee.org wrote on 11/13/2005 22:12: >>>> >>>> >>>> >>>>> A Gray code is one in which -- with a single exception -- codes for >>>>> adjacent states differ by only one bit. >>>> >>>> >>>> ??? >>>> >>>> what's that single exception, Jerry? >>> >>> Wraparound. >> >> >> Then we're talking about different things (said he jumping into the >> discussion.) All the gray codes I've used so far have no such >> exception. An asynchronous FIFO pointer synchronization would get very >> upset if there were such an exception and would fail consistently when >> it occured. The following code doesn't have an exception: >> 000 001 011 010 110 111 101 100 > > Like straight binary, offset binary and two's-complement binary, Gray > codes lie on a number circle, with the largest represented quantity > being adjacent to the smallest. In the case of Gray, that is also a > one-bit difference. Many operations make use of the circularity, > including the circular buffer you diagrammed and overflows washing out > in a well behaved two's-complement sum. Assign numbers to the states > above, and I think that what I meant will come clear. > > Gray 000 001 011 010 110 111 101 100 > binary 000 001 010 011 100 101 110 111 > octal 0 1 2 3 4 5 6 7
so, maybe what you're trying to say is: "A Gray code is one in which -- with a single exception -- codes that differ by only one bit are for adjacent states." ??? (otherwise, i still don't get it.) -- r b-j rbj@audioimagination.com "Imagination is more important than knowledge."
On Mon, 14 Nov 2005 11:55:27 -0500, Jerry Avins <jya@ieee.org> wrote:

>mk wrote: >> On Mon, 14 Nov 2005 09:15:27 -0500, Jerry Avins <jya@ieee.org> wrote: >> >> >>>robert bristow-johnson wrote: >>> >>>>in article AaadnfuiMfkDneXenZ2dnUVZ_sudnZ2d@rcn.net, Jerry Avins at >>>>jya@ieee.org wrote on 11/13/2005 22:12: >>>> >>>> >>>> >>>>>A Gray code is one in which -- with a single exception -- codes for >>>>>adjacent states differ by only one bit. >>>> >>>> >>>>??? >>>> >>>>what's that single exception, Jerry? >>> >>>Wraparound. >> >> >> Then we're talking about different things (said he jumping into the >> discussion.) All the gray codes I've used so far have no such >> exception. An asynchronous FIFO pointer synchronization would get very >> upset if there were such an exception and would fail consistently when >> it occured. The following code doesn't have an exception: >> 000 001 011 010 110 111 101 100 > >Like straight binary, offset binary and two's-complement binary, Gray >codes lie on a number circle, with the largest represented quantity >being adjacent to the smallest. In the case of Gray, that is also a >one-bit difference. Many operations make use of the circularity, >including the circular buffer you diagrammed and overflows washing out >in a well behaved two's-complement sum. Assign numbers to the states >above, and I think that what I meant will come clear.
Sorry didn't help :-) My interpretation of this: "A Gray code is one in which -- with a single exception -- codes for adjacent states differ by only one bit." was that there was an exception case in gray code where codes for adjacent states differed more than one bit. It must be the coffee. Or lack of it.
> >Gray 000 001 011 010 110 111 101 100 >binary 000 001 010 011 100 101 110 111 >octal 0 1 2 3 4 5 6 7
Jerry Avins wrote:
> mk wrote: > >> On Mon, 14 Nov 2005 09:15:27 -0500, Jerry Avins <jya@ieee.org> wrote: >> >> >>> robert bristow-johnson wrote: >>> >>>> in article AaadnfuiMfkDneXenZ2dnUVZ_sudnZ2d@rcn.net, Jerry Avins at >>>> jya@ieee.org wrote on 11/13/2005 22:12: >>>> >>>> >>>> >>>>> A Gray code is one in which -- with a single exception -- codes for >>>>> adjacent states differ by only one bit. >>>> >>>> >>>> >>>> ??? >>>> >>>> what's that single exception, Jerry? >>> >>> >>> Wraparound. >> >> >> >> Then we're talking about different things (said he jumping into the >> discussion.) All the gray codes I've used so far have no such >> exception. An asynchronous FIFO pointer synchronization would get very >> upset if there were such an exception and would fail consistently when >> it occured. The following code doesn't have an exception: >> 000 001 011 010 110 111 101 100 > > > Like straight binary, offset binary and two's-complement binary, Gray > codes lie on a number circle, with the largest represented quantity > being adjacent to the smallest. In the case of Gray, that is also a > one-bit difference. Many operations make use of the circularity, > including the circular buffer you diagrammed and overflows washing out > in a well behaved two's-complement sum. Assign numbers to the states > above, and I think that what I meant will come clear. > > Gray 000 001 011 010 110 111 101 100 > binary 000 001 010 011 100 101 110 111 > octal 0 1 2 3 4 5 6 7 > > Jerry
100 to 000 changes by more than one bit? -- Tim Wescott Wescott Design Services http://www.wescottdesign.com
On Mon, 14 Nov 2005 12:29:00 -0500, robert bristow-johnson
<rbj@audioimagination.com> wrote:

>in article 2KKdnTSDMsMdXOXeRVn-sA@rcn.net, Jerry Avins at jya@ieee.org wrote >on 11/14/2005 11:55: > >> mk wrote: >>> On Mon, 14 Nov 2005 09:15:27 -0500, Jerry Avins <jya@ieee.org> wrote: >>> >>> >>>> robert bristow-johnson wrote: >>>> >>>>> in article AaadnfuiMfkDneXenZ2dnUVZ_sudnZ2d@rcn.net, Jerry Avins at >>>>> jya@ieee.org wrote on 11/13/2005 22:12: >>>>> >>>>> >>>>> >>>>>> A Gray code is one in which -- with a single exception -- codes for >>>>>> adjacent states differ by only one bit. >>>>> >>>>> >>>>> ??? >>>>> >>>>> what's that single exception, Jerry? >>>> >>>> Wraparound. >>> >>> >>> Then we're talking about different things (said he jumping into the >>> discussion.) All the gray codes I've used so far have no such >>> exception. An asynchronous FIFO pointer synchronization would get very >>> upset if there were such an exception and would fail consistently when >>> it occured. The following code doesn't have an exception: >>> 000 001 011 010 110 111 101 100 >> >> Like straight binary, offset binary and two's-complement binary, Gray >> codes lie on a number circle, with the largest represented quantity >> being adjacent to the smallest. In the case of Gray, that is also a >> one-bit difference. Many operations make use of the circularity, >> including the circular buffer you diagrammed and overflows washing out >> in a well behaved two's-complement sum. Assign numbers to the states >> above, and I think that what I meant will come clear. >> >> Gray 000 001 011 010 110 111 101 100 >> binary 000 001 010 011 100 101 110 111 >> octal 0 1 2 3 4 5 6 7 > >so, maybe what you're trying to say is: > >"A Gray code is one in which -- with a single exception -- codes that >differ by only one bit are for adjacent states."
Even that's not true. For this code: Diff(001, 101) = 1, Diff(011,111) =1, Diff(110,100) = 1.
mk wrote:

   ...

> Sorry didn't help :-) My interpretation of this: "A Gray code is one > in which -- with a single exception -- codes for adjacent states > differ by only one bit." was that there was an exception case in gray > code where codes for adjacent states differed more than one bit. It > must be the coffee. Or lack of it. > > >>Gray 000 001 011 010 110 111 101 100 >>binary 000 001 010 011 100 101 110 111 >>octal 0 1 2 3 4 5 6 7
Forgive me for being unclear at first and obtuse afterward. Adjacent states in a Gray code always differ by one bit. MIN and MAX differ by one bit also, but are not necessarily taken to be adjacent. Does that clear it up? Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
robert bristow-johnson wrote:
> in article 2KKdnTSDMsMdXOXeRVn-sA@rcn.net, Jerry Avins at jya@ieee.org wrote
...
>>Like straight binary, offset binary and two's-complement binary, Gray >>codes lie on a number circle, with the largest represented quantity >>being adjacent to the smallest. In the case of Gray, that is also a >>one-bit difference. Many operations make use of the circularity, >>including the circular buffer you diagrammed and overflows washing out >>in a well behaved two's-complement sum. Assign numbers to the states >>above, and I think that what I meant will come clear. >> >>Gray 000 001 011 010 110 111 101 100 >>binary 000 001 010 011 100 101 110 111 >>octal 0 1 2 3 4 5 6 7 > > > so, maybe what you're trying to say is: > > "A Gray code is one in which -- with a single exception -- codes that > differ by only one bit are for adjacent states."
That doesn't do it. Gray codes for 1, 3, and 7 above differ from the code for zero in one bit position. 0-7 is the exception I mentioned if circularity isn't admitted, and 1 is what we expect. 3 shows that you can't reason backward here. (Converse, obverse, and all that.) Maybe 0 isn't a good anchor. Aside from the expected 2 and 4, 0 also differs from 3 in only one bit. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Tim Wescott wrote:

   ...

> 100 to 000 changes by more than one bit?
No, but it changes by more than one count. What I called "wraparound". Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
robert bristow-johnson wrote:
> in article GZudnR-nuJ1iBuXeRVn-rQ@rcn.net, Jerry Avins at jya@ieee.org wrote > on 11/14/2005 09:15: > > >>robert bristow-johnson wrote: >> >>>in article AaadnfuiMfkDneXenZ2dnUVZ_sudnZ2d@rcn.net, Jerry Avins at >>>jya@ieee.org wrote on 11/13/2005 22:12: >>> >>> >>> >>>>A Gray code is one in which -- with a single exception -- codes for >>>>adjacent states differ by only one bit. >>> >>> >>>??? >>> >>>what's that single exception, Jerry? >> >>Wraparound. > > > but, i think even in that case, there is only one bit changing when you > change to neighboring states, including a wrapped around state. the first i > ever learned about Gray code was with mechanical shaft encoders. in fact, > the quadrature shaft encoder that at least the older mice and trackballs > used, were a two bit Gray code.
I agree that there is no exception if states on opposite sides of wraparound are considered adjacent. As for the old mouse encoders, that was a clever way to get around my encoder patents. Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;