
- HTML Tutorial
- HTML - Home
- HTML - Overview
- HTML - Basic Tags
- HTML - Elements
- HTML - Attributes
- HTML - Formatting
- HTML - Phrase Tags
- HTML - Meta Tags
- HTML - Comments
- HTML - Images
- HTML - Tables
- HTML - Lists
- HTML - Text Links
- HTML - Image Links
- HTML - Email Links
- HTML - Frames
- HTML - Iframes
- HTML - Blocks
- HTML - Backgrounds
- HTML - Colors
- HTML - Fonts
- HTML - Forms
- HTML - Embed Multimedia
- HTML - Marquees
- HTML - Header
- HTML - Style Sheet
- HTML - Javascript
- HTML - Layouts
- HTML References
- HTML - Tags Reference
- HTML - Attributes Reference
- HTML - Events Reference
- HTML - Fonts Reference
- HTML - ASCII Codes
- ASCII Table Lookup
- HTML - Color Names
- HTML - Entities
- HTML - Fonts Ref
- HTML - Events Ref
- MIME Media Types
- HTML - URL Encoding
- Language ISO Codes
- HTML - Character Encodings
- HTML - Deprecated Tags
What are JavaScript Bitwise Operators?
The JavaScript Bitwise operators consider the operands as a sequence of 32 bits. The following bitwise operators are available in JavaScript −
Sr.No. | Operator & Operator Name |
---|---|
1 | & Bitwise AND |
2 | | Bitwise OR |
3 | ^ Bitwise XOR |
4 | ~ Bitwise NOT |
5 | << Bitwise Zero fill left shift |
6 | >> Bitwise Signed right shift |
7 | >>> Bitwise Zero-fill right shift |
Let’s see an example of JavaScript Bitwise OR(|) operator.
Example
If one of the bits are 1, then 1 is returned when Bitwise OR (|) operator is used. You can try to run the following code to learn how to work with JavaScript Bitwise OR Operator −
<!DOCTYPE html> <html> <body> <script> document.write("Bitwise OR Operator<br>"); // 7 = 00000000000000000000000000000111 // 1 = 00000000000000000000000000000001 document.write(7 | 1); </script> </body> </html>
- Related Articles
- What are bitwise operators in C#?
- What are the bitwise operators in Java?
- What are different bitwise operators types in Python?
- Explain about bitwise operators in JavaScript?
- Java Bitwise Operators
- Python Bitwise Operators
- Perl Bitwise Operators
- What are JavaScript Operators
- Bitwise Operators in C++
- Bitwise Operators in C
- What are operators in JavaScript?
- What are the bitwise zero fill right shift zero operators in Java?
- Bitwise operators in Dart Programming
- What are the differences between bitwise and logical AND operators in C/C++
- What are Arithmetic Operators in JavaScript?

Advertisements