3
\$\begingroup\$

The row and column headers for a Karnaugh map are written in gray code and not binary. I am wondering why. Is it because that the Karnaugh map needs to wrap around, and gray code is symmetrical?

\$\endgroup\$
0

1 Answer 1

7
\$\begingroup\$

Gray code means that nearest neighbours in the K-map differ from one-another by only one bit. This means that the images of products of predicates (A and B and ...) on the K-map are connected subsets of the K-map as long as you define the K-map on the surface of a torus - so you can spot these factors easily. So you need (1) Gray codes AND (2) to put the map on a torus ("wrap around") to make this connectedness property of products work. The wrapping around has nothing directly to do with the Gray codes: it is a condition further to Gray codes that you need to make the K-map work.

Try drawing a K-map with binary ordering - you'll quickly see that the products of predicates - which are what you want to spot to get a minimum length representation of the truth function become scattered in this representation.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.