- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is Bitwise Left Shift Operator (<<) in JavaScript?
The left shift operator moves all the bits in its first operand to the left by the number of places specified in the second operand. New bits are filled with zeros.Shifting a value left by one position is equivalent to multiplying it by 2, shifting two positions is equivalent to multiplying by 4, and so on.
Example
You can try to run the following code to learn how to work with Bitwise Left Shift Operator −
<html> <body> <script> var a = 2; // Bit presentation 10 var b = 3; // Bit presentation 11 document.write("(a << b) => "); result =(a << b); document.write(result); </script> </body> </html>
- Related Articles
- What does the bitwise left shift operator do in Java?
- What is JavaScript Bitwise Left Shift(
- What is JavaScript Bitwise Right Shift(>>) Operator?
- What is Bitwise Right Shift Operator (>>) in JavaScript?
- Bitwise right shift operator in Java
- Explain JavaScript Bitwise NOT, Left shift and Right shift?
- What does the bitwise right shift operator do in Java?
- Bitwise Right/ left shift numbers in Arduino
- What is JavaScript Bitwise AND (&) Operator?
- What is JavaScript Bitwise OR (|) Operator?
- What is JavaScript Bitwise NOT(~) Operator?
- What is JavaScript Bitwise XOR (^) Operator?
- What is right shift (>>) operator in Python?
- What is Bitwise AND Operator (&) in JavaScript?
- What is Bitwise NOT Operator (~) in JavaScript?

Advertisements