I once tried myself on an official Mensa test which was very similar to that. It got very boring after I realized they test for mundane & | ^ in varying ways. Dropped it halfway and passed, lol. But I guess you have to be pretty smart to detect logical ops without a hacker background.
Even funnier when the typical IQ test, Raven's Progressive Matrices, are 100% about pattern matching.