Skip to content
BetterDL

Row index

Also called: row number, truth table row number, index of a row, decimal row number

The decimal number of a truth-table row, found by reading its input bits as binary with A as the most significant bit. Row 6 of a 3-input table is 110.

Each row of a truth table has a row index: its input pattern read as a binary number. With inputs A, B, C, the first variable A is the most significant bit, so the weights are 4, 2, 1. With A, B, C, D they are 8, 4, 2, 1.

  • Row 110 with three inputs is 4 + 2 = 6.
  • Row 13 with four inputs is 1101: A = 1, B = 1, C = 0, D = 1.

The index is how minterms and maxterms are named. mᵢ is the minterm that is 1 on row i; Mᵢ is the maxterm that is 0 on row i. Lists like Σm(1, 5, 6) and ΠM(0, 3) are just lists of row indices.

Pad to n bits. Before converting an index to a term, write it with exactly one bit per variable. With four inputs, 4 is 0100, not 100. Leaving out the leading 0 drops a variable from the term, which then covers two rows instead of one.

The ordering also matters: if someone lists the variables in a different order, every row number changes. This course always takes the first-listed variable as the MSB.

1
8
1
4
0
2
1
1

Worked example

Example

Term to index and back

Inputs A, B, C, D. Find the index of , and the minterm for row 13.

  1. 1.

    : A = 0, B = 1, C = 1, D = 0, so the pattern is 0110 = 4 + 2 = 6. It is m6.

  2. 2.

    Row 13 = 8 + 4 + 1 = 1101.

  3. 3.

    A = 1 → A, B = 1 → B, C = 0 → , D = 1 → D.

  4. 4.

    m13 = .

Common mistakes

  • Not padding the index to n bits, which drops a variable.

  • Reading the bits with D as the most significant bit. A is the MSB.

  • Reading a maxterm's index with minterm polarity, which gives the bit-flipped row.

Practice Row index

Interactive questions with instant feedback and a worked solution for every wrong answer.

Learn it step by step

Row index is taught in Boolean Simplification and Boolean Algebra.