K-maps and Gray code

  • Thread starter Schfra
  • Start date
  • #1
Schfra
47
0
I know how to construct a Gray code for k-maps with 2 bits, 3 bits, and 4 bits. I also looked at the Wikipedia page for Gray code that explained how to construct an n-bit Gray code from the Gray code for n - 1 bits.

What I’m still confused about is where to place the bits. Should the bits be placed to make the rows as close to the same size as the columns as possible?

Would a Gray code work for example if I had 4 bits, and made a grid with 3 bits on the top and only 1 on the side as opposed to 2 on each side as it’s usually done?
 

Answers and Replies

  • #2
tnich
Homework Helper
1,048
336
I know how to construct a Gray code for k-maps with 2 bits, 3 bits, and 4 bits. I also looked at the Wikipedia page for Gray code that explained how to construct an n-bit Gray code from the Gray code for n - 1 bits.

What I’m still confused about is where to place the bits. Should the bits be placed to make the rows as close to the same size as the columns as possible?

Would a Gray code work for example if I had 4 bits, and made a grid with 3 bits on the top and only 1 on the side as opposed to 2 on each side as it’s usually done?
Yes, it would work, but if your purpose in making a Karnaugh map is to identify blocks of adjacent cells, then you are likely to get better results when you make the map as close to square as possible. In your 2X2 vs. 3X1 example, can you find any blocks of adjacent cells in the 3X1 configuration that are not also adjacent in the 2X2 configuration? You can certainly find blocks in the 2X2 configuration that are not adjacent in the 3X1 configuration.
 

Suggested for: K-maps and Gray code

  • Last Post
Replies
11
Views
825
Replies
65
Views
9K
  • Last Post
Replies
8
Views
2K
Replies
5
Views
700
Replies
11
Views
755
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
5
Views
1K
Replies
16
Views
3K
Top