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

  • Thread starter Thread starter Schfra
  • Start date Start date
  • Tags Tags
    Code
AI Thread Summary
Constructing Gray codes for Karnaugh maps (K-maps) with 2, 3, and 4 bits is straightforward, but the placement of bits can affect the effectiveness of the map. It is suggested that arranging the bits to keep rows and columns as close to the same size as possible yields better results for identifying adjacent cells. Using a 3-bit top and 1-bit side configuration for a 4-bit Gray code is possible, but it may hinder the ability to find adjacent blocks effectively. The square configuration of bits allows for more adjacent cell blocks compared to a rectangular arrangement. Therefore, for optimal results in K-map construction, a more balanced grid is recommended.
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 Schfra
Thread 'Weird near-field phenomenon I get in my EM simulation'
I recently made a basic simulation of wire antennas and I am not sure if the near field in my simulation is modeled correctly. One of the things that worry me is the fact that sometimes I see in my simulation "movements" in the near field that seems to be faster than the speed of wave propagation I defined (the speed of light in the simulation). Specifically I see "nodes" of low amplitude in the E field that are quickly "emitted" from the antenna and then slow down as they approach the far...
Hello dear reader, a brief introduction: Some 4 years ago someone started developing health related issues, apparently due to exposure to RF & ELF related frequencies and/or fields (Magnetic). This is currently becoming known as EHS. (Electromagnetic hypersensitivity is a claimed sensitivity to electromagnetic fields, to which adverse symptoms are attributed.) She experiences a deep burning sensation throughout her entire body, leaving her in pain and exhausted after a pulse has occurred...
Back
Top