Fun with XOR #2

  • I don't recall ever using it.

  • dale_berta (12/8/2014)


    Actually, I'm wondering if many who got the previous post wrong was because we weren't familiar with the '^' operator. I incorrectly assumed it meant exponentiation.

    Granted, not useful in everyday SQL, but the current question is similar to the math behind RAIDed disk. The basic deal is parity is an XOR, P = A^B. If you lose A, then A = P^B = (A^B)^B, and similarly if you lose B.

    Yep, got it wrong Friday for the same reason.

    Yep, have never seen XOR used for anything since CS chip architecture classes, 20 years ago.

    I do use a bitwise & and | regularly to solve problems quickly.

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply