gray-code Questions

6

Solved

I tried generating gray codes in Python. This code works correctly. The issue is that I am initialising the base case (n=1,[0,1]) in the main function and passing it to gray_code function to comput...
Harwood asked 3/8, 2016 at 8:52

1

I am a beginner in assembly and This is a code that I designed to convert from binary and to gray, and prints the resulting bit-pattern in hex. mov al, a mov bl, al shr bl, 1 xor al, bl Alth...
Rendering asked 5/5, 2021 at 11:10

2

Solved

For a communication system, I need a special kind of gray codes. The requirements are: Two successive values differ in only one bit, like all gray codes. Two transitions on the same bit should be...
Passifloraceous asked 29/5, 2015 at 1:18

8

I have a small 8-bit processor which has a N-to-M decoder on some output lines - eg, for the 5 to 32 bit case, I write 00101 and bit 5 changes state. The only interface to the output is change-stat...
Hawse asked 10/1, 2011 at 16:0

9

Solved

I am trying to come up with a solution to the problem that given two numbers, find if they are the consecutive numbers in the gray code sequence i.e., if they are gray code neighbors assuming that ...
Magpie asked 30/11, 2014 at 22:14

2

There a number of ways iterating over n-bit Gray codes. Some are more efficient than others. However, I don't actually need the Gray codes and would like instead to iterate over the bit index that ...
Niobous asked 18/12, 2016 at 9:57

2

Solved

Is there a way to derive the 4-bit nth Gray code using the (n-1)th Gray code by using bit operations on the (n-1)th Gray Code? For example the 4th Gray code is 0010. Now I want to get the 5th Gray...
Oscillograph asked 4/9, 2016 at 16:47

1

Solved

I have recently come across the Gray code, and I have been quite stuck trying to wrap my head around the efficient algorithm used to convert Gray code back to binary (32 bits or less). num = num ^...
Lukash asked 5/5, 2016 at 10:15

1

Solved

I understand that each gray code differs from its preceding code by one bit, but i don't exactly understand why its called reflected. I came across this website https://www.pc-control.co.uk/gray_co...
Kenner asked 1/1, 2016 at 11:36

1

I try to build a structured light environment to do 3D scanning. As far as I know, if I choose to use gray code to reconstruct a 3D model, I have to implement specific patterns that were encode in ...
Beaufert asked 3/8, 2015 at 7:5

5

Solved

Is there a built in Gray code datatype anywhere in the .NET framework? Or conversion utility between Gray and binary? I could do it myself, but if the wheel has already been invented...
Tragic asked 6/11, 2009 at 22:54

3

Solved

Is there any known way to compute the addition (and maybe the subtraction) of two Gray codes without having to convert the two Gray codes to regular binary, perform a binary addition then convert t...
Breda asked 4/1, 2014 at 15:56

4

Without using any external counters or other state, I'm looking for an efficient function which takes an n-bit value (32 bits or thereabouts) and returns the subsequent value in a Gray code. That ...
Piscatelli asked 5/7, 2013 at 13:47

3

Is there any algorithm that I can use to find the neighbors in Gray code? For small numbers is just fine to write the entire table, but if I have a number like 010 110 is a bit to much to write th...
Undemonstrative asked 12/2, 2014 at 21:40

1

Solved

In a tournament chart from the bottom to the top where there is a winner I've been told that it is somehow connected with the gray-code. I know that the grey code is an alternative code, it's recur...
Salisbury asked 31/10, 2011 at 23:25

4

Solved

the formula for calculating nth gray code is : (n-1) XOR (floor((n-1)/2)) (Source: wikipedia) I encoded it as: int gray(int n) { n--; return n ^ (n >> 1); } Can someone explain how ...
Aurelia asked 12/11, 2010 at 15:22

17

The Challenge The shortest program by character count that outputs the n-bit Gray Code. n will be an arbitrary number smaller than 1000100000 (due to user suggestions) that is taken from sta...
Spectra asked 7/11, 2010 at 20:47

2

Solved

Just a matter of curiosity, is the Gray code defined for bases other than base two? I tried to count in base 3, writing consecutive values paying attention to change only one trit at a time. I've ...
Bacolod asked 1/10, 2010 at 9:39
1

© 2022 - 2024 — McMap. All rights reserved.