Constructing K-Maps & Gray Codes w/ 2, 3 & 4 Bits

  • Thread starter Thread starter Schfra
  • Start date Start date
  • Tags Tags
    Code
Schfra
Messages
47
Reaction score
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?
 
Engineering news on Phys.org
Schfra said:
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.
 
  • Like
Likes   Reactions: Schfra

Similar threads

  • · Replies 5 ·
Replies
5
Views
20K
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 0 ·
Replies
0
Views
6K