EveryCircuit
Contact
Reviews
Home
jason9
modified 5 years ago

Gray Code Encoder Decoder

3
8
166
01:58:56
This is a Gray code encoder/decoder. The advantage of Gray code is that between each number only one light changes state. The disadvantage of Gray code is that, at least for me, it seems rather hard and confusing to remember which wire has to change state in order for the number to go up or down by one.
published 8 years ago
BillyT
8 years ago
Nice
hurz
8 years ago
But you have an idea were it makes sense to use this code?
jason9
8 years ago
No, but according to wikipedia Gray code is still used even today in applications where it is practical to have only one bit change at a time even at the cost of additional complexity.
hurz
8 years ago
Ok, think about sensors like photocells. Suppose you have a disc which you use as position sensor for an angle at a motor axis. Divide the disc in 16 sectors and drill holes with a gray code. Everytime a photocell does change its logic signal you know its a new sector! Think about using a standard code and dont forget the hole do have some tollerances, while transition from one sector to the next you might get wrong sector information as position. With gray codes this is impossible, cuz from sector to sector there is only one photocell which change its signal!
jason9
8 years ago
Yes, that is one of the applications for Gray code according to wikipedia.
LeButch
8 years ago
Hurz is not able to understand arguments, so just try to not fuck him up by saying he is not perfect.
hurz
8 years ago
Sad clown
LeButch
8 years ago
See?

EveryCircuit is an easy to use, highly interactive circuit simulator and schematic capture tool. Real-time circuit simulation, interactivity, and dynamic visualization make it a must have application for professionals and academia. EveryCircuit user community has collaboratively created the largest searchable library of circuit designs. EveryCircuit app runs online in popular browsers and on mobile phones and tablets, enabling you to capture design ideas and learn electronics on the go.

Copyright © 2026 by MuseMaze, Inc.     Terms of use     Privacy policy