4 ms·
grey code is heavy on combinational logic to implement, its goal is not to reduce logic but force counting behaviour in such a way that only 1 bit is changing b
by artemonster 3y ago
grey code is heavy on combinational logic to implement, its goal is not to reduce logic but force counting behaviour in such a way that only 1 bit is changing between transitions, as opposed in normal binary (i.e. 4b0111+1 would cause 4 bit changes). this is useful when crossing clock domains or to add extra builtin error detection capabilities
- JoeAltmaier 3y agoUsed to use it for contact-switches. You turn a knob, say four brushes slide across copper contacts to encode knob position. If you coded position in binary you'd be sparking several bit-changes which for some instants would jump all over the number range, e.g. from three (011) to four (100) could instantaneously go to seven (111) or two (010) etc. Grey code would at most oscillate between the two values e.g. from 010 (three in Grey Code) to 110 (four in Grey Code).
- kevin_thibedeau 3y agoGray code can be implemented with an ordinary binary counter and an XOR with a right-shifted count. It isn't particularly "heavy".
- artemonster 3y agoSorry, after doing extremely low area designs every extra useless gate is „heavy“ :)
- oasisaimlessly 3y agoThe thing you're missing is that an LFSR counter can be 20% of the gates of a binary counter.
- meindnoch 3y agoThe original comment was precisely about avoiding an ordinary binary counter.