Bitwise Logical Operator Group
The Bitwise AND ( & )
The XOR ( ^ )
The OR ( | )



Navigation Aids -- This Page        Navigation Aids -- This Topic        Navigation Aids -- This Site




Review of Terms Related to This Topic





The Purpose for this Page

This page will show the basic rules for the JavaScript bitwise operator group. Some special situation cases are explained. And finally, some scripting examples are provided with comments.





The Basics of Bitwise Operators





Special Situations





Some Script Examples

We only diagram one byte in the following examples. Be aware that the bitwise operators work on 32-bit representations of the integer operands.


Expression Giving Comment
x = 11;
x & 13;
9 bitwise AND
00001011 AND with 00001101 giving 00001001
x = 11;
x | 13;
15 bitwise OR
00001011 OR with 00001101 giving 00001111
x = 11;
x ^ 13;
6 bitwise XOR
00001011 XOR with 00001101 giving 00000110


Top            

Rx4AJAX        About Us | Topic Index | Contact Us | Privacy Policy | 2008 This Site Built By PPThompson