2009. 6. 30. 11:45

비트 연산자 (Bitwise Operators)

잘 사용하지 않아서 잘 기억나지 않는 ~ 와 ^ ...

 & ( Bitwise AND )
    0110 & 0101 => 0100

| ( Bitwise OR)
    0110 & 0101 => 0111

~ ( Bitwise Not )
    ~(1010) => 0101

^ (Bitwise Exclusive OR)
    0110 ^ 0101 => 0011