I'm not at liberty to reveal undocumented I-beams. The dozen on APLcart are only there because they have been used (and then usually described in a comment) in code that Dyalog ships or publishes, so I collected that information. If you want to know Dyalog's secrets, you'll have to join the company (but of course, that includes not being able to tell outsiders).
> A common technique for encoding a set of on/off states is to use a value of 2 ⁿ for the state in position n (origin 0), 1 if the state is “on” or 0 for “off” and then add the values.
> Write a function that, given a non-negative right argument which is an integer scalar representing the encoded state and a left argument which is an integer scalar representing the encoded state settings that you want to query, returns 1 if all of the codes in the left argument are found in the right argument (0 otherwise).
So, there are really two parts to this problem.
One is to convert the integer states to compatible bit-masks.
The second is to check if the 1 bits of the query are also 1 in the state. If there's a 0 in the query, it doesn't matter if the state has 0 or 1.
Then we do a ∧/ to make sure all requirements are met.
@rabbitgrowth Because matrix product +.× is defined with a transposed left argument, so if we didn't transpose the result, you couldn't directly use +.× to multiply by the digit weights and sum the result.
@rabbitgrowth And yes, maybe ↑ isn't so important, and it'd be better to have a non--transposed result, as that's in fact very often needed. Indeed, J does gives the non-transposed result.