비트 연산자
& (AND)
console.log(3 & 5) // 011 & 101 = 1
console.log(3 & 4) // 011 & 100 = 0| (OR)
console.log(3 | 5) // 011 & 101 = 7
console.log(3 | 2) // 11 & 10 = 3^ (XOR)
console.log(3 ^ 5) // 011 ^ 101 = 6
console.log(3 ^ 2) // 11 ^ 10 = 1~ (NOT)
\<\< (부호 유지 왼쪽 시프트)
>> (부호 유지 오른쪽 시프트)
>>> (부호 버림 오른쪽 시프트)
Last updated