44
Sefie
6y

I just noticed programmers can cite Shakespeare in 1 character.
"To be or not to be..." = 2b|!2b = true = 1

Comments
  • 5
    Well,

    2b|!2b = 1011 | 0100 = 1111 = 15 = true

    2b||!2b = ERROR: Illegal variable name!

    ;-)

    (0x2b || !0x2b = true || false = true)
  • 5
    you earned those kudos, my friend!
  • 1
    @Sefie I love logic and binary operations. ~(_8(|)
  • 2
    @Yamakuzure didn't have to go that far.

    For any Boolean variable X,
    X + !X has to be true, where "+" denotes the OR operation and "!" is NOT.

    Because you know, something can only either be true or not true.

    Generalizes to multibit values too because each bit can be considered a Boolean variable and the operations happen element-wise.
  • 0
    It was a bad spec. He meant

    if( !IsNoblerToSuffer(slings, arrows) ) { die(); }
  • 1
    Buggy script of Shakespeare. He should have written "to be or exclusive not to be".
  • 1
    @RememberMe well said. I was just intrigued by the binary operator. 😉
Add Comment