View Feed
group-icon
Coffee Room
Discuss anything here - everything that you wish to discuss with fellow engineers.
12889 Members
Join this group to post and comment.
Muhammad Huxain
Muhammad Huxain • Nov 27, 2018

Which technique is used to convert binary code to gray code?

Which technique is used to convert binary code to gray code?

Rashmi Gandhi
Rashmi Gandhi • Nov 29, 2018

If you are looking for the method to convert the binary code to gray code, it's a straightforward method. 

This conversion can be done by applying the following rules :
Binary to Gray conversion :

  1. The Most Significant Bit (MSB) of the gray code is always equal to the MSB of the given binary code.
  2. Other bits of the output gray code can be obtained by XORing binary code bit at that index and previous index.

Are you looking for a programming solution or just the theory? @muhammad

Binary to Gray code conversion is an exceptionally basic process. There are a few stages to do this sorts of changes. Steps given underneath expand on the thought on this kind of transformation. 

The M.S.B. of the gray code will be actually equivalent to the principal bit of the given parallel number. 

Presently the second piece of the code will be elite or of the first and second piece of the given paired number, i.e if both the bits are same the outcome will be 0 and on the off chance that they are diverse the outcome will be 1. 

The third piece of gray code will be equivalent to the select or of the second and third piece of the given double number. Along these lines the Binary to gray code change goes on. One model given beneath can make your thought unmistakable on this sort of change.

Share this content on your social channels -