Two minterms are adjacent when their row codes differ in exactly one bit, that is, their Hamming distance is 1. Then they agree on every variable but one, and that one is plain in one minterm and barred in the other. By combining, = X, the differing variable drops out.
In cube notation, the differing bit becomes a dash: m9 (1001) and m13 (1101) differ only in B, so they combine to 1-01, which is .
Compare bits, not numbers. Adjacency has nothing to do with being consecutive:
- 7 =
0111and 8 =1000are consecutive but differ in all four bits. - 3 =
011and 5 =101differ by 2, a power of two, yet differ in two bits. - 2 =
010and 6 =110differ by 4 and are adjacent.
Combining can continue in rounds: two combined terms with their dashes in the same place, differing in one other bit, combine again. That is the heart of the quine mccluskey method and of Karnaugh maps, which arrange cells so adjacent minterms sit next to each other. The same idea works for adjacent maxterms in a POS.