10.02.2018 Views

js_tutorial

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Javascript<br />

Ex: (~B) is -4.<br />

(Right Shift)<br />

6<br />

Binary Right Shift Operator. The left operand’s value is moved right by<br />

the number of bits specified by the right operand.<br />

Ex: (A >> 1) is 1.<br />

>>> (Right shift with Zero)<br />

7<br />

This operator is just like the >> operator, except that the bits shifted<br />

in on the left are always zero.<br />

Ex: (A >>> 1) is 1.<br />

Example<br />

Try the following code to implement Bitwise operator in JavaScript.<br />

<br />

<br />

<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!