# is the gray code arithmetic code?

Discussion in 'Homework Help' started by eng.mustafasalah, Feb 27, 2013.

1. ### eng.mustafasalah Thread Starter Member

Nov 10, 2011
41
2
hi
is the gray code arithmetic code?why? where this code used?

2. ### tshuck Well-Known Member

Oct 18, 2012
3,531
675
No, the numbers in Gray code are not to represent a numerical quantity, but rather a representation of unique identifiers without numerical significance. Gray code is based on having each number differing by only one bit to those adjacent to it. This is commonly used in encoders and Karnaugh maps.

Nov 10, 2011
41
2
thank youuuu

4. ### tshuck Well-Known Member

Oct 18, 2012
3,531
675
you are welcomeeeeeeeeeee

5. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
I think you just answered his homework question outright.

Or maybe not. If by "arithmetic code" he is talking about "arithmetic coding" of the type used for data compression, then I would say that saying that a Gray Code wasn't intended to represent numbers doesn't capture the point too well. Besides, a Gray Code only has meaning as a sequence and any sequence can be mapped to a set of numbers. So a Gray Code could very will be used to represent numbers and you could design an adder and, with that, everything else. That might actually make an interesting project for grins and giggles. But I think that is beside the point. I think that you would still lack the property that you need for an arithmetic code for compression purposes (but notice I said that I "think" that is the case).

6. ### tshuck Well-Known Member

Oct 18, 2012
3,531
675
I didn't think this could really be a homework problem, but rather a point to understand. If it is a homework problem, this class is pretty easy.

I didn't even realize I was in Homework Help!

7. ### WBahn Moderator

Mar 31, 2012
18,069
4,905
Yeah, and it may not be. I think the two folllow-up questions after the main question have the look and feel of a homework question.