Mega Code Archive

 
Categories / JavaScript Tutorial / Operators
 

Using the Bitwise Exclusive OR Operator (2)

< html>     <script language="JavaScript">     <!--     // integer = 32-bit binary representation     //  9 = 00000000000000000000000000001001     //  5 = 00000000000000000000000000000101     // 13 = 00000000000000000000000000001101     document.write("9 | 5 = ", (9 | 5) );     -->     </script>     </html>