Posts: 4,646
Threads: 1,493
Joined: Sep 2016
i once saw a reordered sequence of numbers which when expressed in binary there would only be one bit that was different between adjacent numbers of that order. i want to know the
name of this sequence because i cannot remember its
name. with only one bit different, you could step through the sequence without the need to tightly synchronize the change of two or more bits at one time. the usual sequence of counting cannot do this because going from 3 to 4 involves changing 3 bits there are many steps with multiple bit change such as 7 to 8 and 11 to 12. i saw this sequence in a book on electrical engineering which i no longer have. does anyone know the name of this sequence?
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,646
Threads: 1,493
Joined: Sep 2016
i found the name. it is called "Gray Code".
Gribouillis likes this post
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,646
Threads: 1,493
Joined: Sep 2016
Nov-10-2024, 01:36 AM
(This post was last modified: Nov-10-2024, 01:36 AM by Skaperen.)
(Nov-07-2024, 08:24 AM)DeaD_EyE Wrote: Yes, it's Gray Code.
I've used it ~3 weeks ago to read an Encoder like this one: https://www.reichelt.com/de/en/alps-stec...73923.html
The purpose is to suppress false readings and that only one bit is swapped during state change.
If you use the binary representation for numbers, then a change could affect more than one bit.
24 detents? i would have expected a power of 2. did it support going around from last to first in the forward direction or was it blocked from doing that?
> switch travel: 0.5 mm
i would have expected degrees, 15 degrees if it can loop around (11.25 degrees for 32 detents), or less if it does the 24 detents not all the way around.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Posts: 4,646
Threads: 1,493
Joined: Sep 2016
years ago i wrote code to convert both directions (different code for each) between an ordinary sequence of numbers and the gray code number at that position. i do not recall if i did that in C or in assembly language. i am wanting to do it in Python. i just couldn't recall the name of it (to name functions and describe in comments). i finally hit on the wording describing it to match actual usage of the code where the name was found. search engines still don't match thought processes; they still do word matching. the age of AI based searching in not here yet, at least not trained on all existing source code.
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.