JavaScript Bitwise Operators
Full Stack Web Development Courses with Real-time projects Start Now!!
Program 1
/*
Bitwise
& - and | - or ^ - x-or ~ not
<< left shift
>> right shift
>>> right shift with zero fill
0101
0011
-------------
0001
1100
0011
-------
1111
0110
0011
-------
0101
*/
// a=5 & 5
// console.log(a)
// a=12 | 12
// console.log(a)
// a= 6 ^ 3
// console.log(a)
// a= -7 ^ -7
// console.log(a)
// a=-5 & -2
// console.log(a)
// a=~-7
// console.log(a)
// a=5<<3
// console.log(a)
a=-1>>>29
console.log(a)
Did we exceed your expectations?
If Yes, share your valuable feedback on Google

