Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Recursion challenge
#15
Quote:The algorithms work differently, the ones I posted generate strings of zeros and ones representing the values in Gray code for any arbitary byte length. Your algorithm only works for powers of two and generates the corresponding integer values instead.

If I wanted to generate strings of zeros and ones, I could add 3 or 4 lines of code to do this (I think I posted this somewhere before). But the point is that I don´t want to generate strings of 0 and 1, I want to generate bytes or words. The application that receives these bytes or words wants the binary representation of these bytes or words to conform to Gray Code, that is, that each one differs from the preceding by only one bit.

POWERS OF 2: My algorithm has an upper boundary of a power of 2 (minus 1) intentionally, so that the highest value generated wraps back (with only 1 bit change) to zero which is the first pattern of the next series (if you want to generate multiple series).

Also at issue here is the fact that I have used this algorithm twice in business for practical applications, not just for academic purposes.

Sorry, but I don't quite understand the rest of your argument.
What does AFIAK mean?
*****
Reply


Messages In This Thread
Recursion challenge - by Antoni Gual - 06-26-2003, 08:04 PM
Recursion challenge - by Antoni Gual - 06-27-2003, 12:37 AM
Recursion challenge - by Moneo - 06-28-2003, 09:49 AM
I beg to differ. - by Agamemnus - 06-30-2003, 05:11 AM
Re: I beg to differ. - by Moneo - 06-30-2003, 06:22 AM
nah - by Agamemnus - 06-30-2003, 09:07 PM
Recursion challenge - by Antoni Gual - 07-01-2003, 01:13 AM
Recursion challenge - by Moneo - 07-01-2003, 02:25 AM
Recursion challenge - by LooseCaboose - 07-01-2003, 05:02 AM
To LooseCaboose: Re Gray's Code - by Moneo - 07-01-2003, 05:38 AM
Recursion challenge - by LooseCaboose - 07-01-2003, 05:52 AM
Recursion challenge - by Antoni Gual - 07-02-2003, 01:30 AM
Recursion challenge - by LooseCaboose - 07-03-2003, 03:30 PM
Recursion challenge - by Moneo - 07-03-2003, 11:14 PM
Recursion challenge - by Hexadecimal Disaster - 07-04-2003, 01:33 AM
Recursion challenge - by LooseCaboose - 07-04-2003, 09:25 AM
To LooseCaboose: - by Moneo - 07-04-2003, 09:15 PM
Recursion challenge - by LooseCaboose - 07-05-2003, 07:39 AM
To LooseCaboose: - by Moneo - 07-05-2003, 08:31 AM
Recursion challenge - by na_th_an - 07-12-2003, 06:43 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)