Consider the following MWE:
SparseArray[{{i_, j_} /; (IntegerDigits[i - 1, 2, 2][[1]] == 0) :> 1}, {4, 4}]
This should give a $4\times 4$ matrix in which the first two rows are filled with ones: IntegerDigits[i - 1, 2, 2][[1]] == 0 checks that the first digit of the binary decomposition of $i-1$ is $0$, which happens for $i=1$ and $i=2$.
If I actually run the above code, in v11.3, I instead get a matrix in which only the first row is filled with ones.
If I instead use
SparseArray[{{i_, j_} /; (IntegerDigits[i - 1, 2, 2][[1]] == 1) :> 1}, {4, 4}]
in which I'm asking for the first digit of the binary decomposition to equal $1$, I get a zero matrix.
Funnily enough, If I instead ask for the second digits of the binary decomposition to be something, everything works correctly:
SparseArray[{{i_, j_} /; (IntegerDigits[i - 1, 2, 2][[2]] == 0) :> 1}, {4, 4}]
gives first and third nonzero rows.
Something I've noticed by running trace on the first form is that at some point i seems to be set to some value before the actual checks on the matrix elements happen:
This doesn't happen in the working examples. Does anyone understand why this happens?
It's also worth noting that I've tried to make the examples even simpler by using one-dimensional "matrices":
SparseArray[{i_ /; (IntegerDigits[i - 1, 2, 2][[2]] == 0) :> 1}, 4]
This gives the correct results, but also strange errors, which using the trace shows some weird stuff going on (the i is replaced sometimes with a list and sometimes with an integer). This behaviour is solved by using i_Integer as condition, so I don't know if this behaviour is related to the other one.

SparseArray[{{i_, j_} /; (Echo[{i, j}]; (IntegerDigits[i - 1, 2, 2][[1]] == 0)) :> 1}, {4, 4}]is evaluated, only entries in the first row show up, while in the equivalentSparseArray[{{i_, j_} /; (Echo[{i, j}]; (BitGet[i - 1, 1] == 0)) :> 1}, {4, 4}], all entries get checked. – J. M.'s missing motivation Nov 19 '19 at 00:15SparseArray[{{i_, j_} :> Block[{}, 1 /; IntegerDigits[i - 1, 2, 2][[1]] == 0]}, {4, 4}]andSparseArray[{{i_, j_} :> RuleCondition[1, IntegerDigits[i - 1, 2, 2][[1]] == 0]}, {4, 4}]work. (See here for more details.) – J. M.'s missing motivation Nov 19 '19 at 00:21