Bitwise Operators in JavaScript | JavaScript Course for Beginners | Parnika Tutorials

preview_player
Показать описание
In this video, we'll be learning about the bitwise operators in JavaScript. These operators allow us to manipulate the bits of data within a number.

If you're a beginner in JavaScript, then this video is for you! We'll be learning about the bitwise operators and how to use them to our advantage. This video is an essential part of our JavaScript course for beginners, and I hope you'll find it helpful!
#bitwiseoperators #javascript #parnikatutorials

Bitwise operators treat its operands as a set of 32-bit binary digits (zeros and ones) and perform actions. However, the result is shown as a decimal value.

& Bitwise AND x & y
| Bitwise OR x | y
^ Bitwise XOR x ^ y
~ Bitwise NOT ~x
Bitwise Left Shift
Bitwise Right Shift

Bitwise AND & returns 1 if the corresponding bits of both operands are 1 else it returns 0.

Operand 1 Operand 2 AND Operation
0 0 0 & 0 is 0
0 1 0 & 1 is 0
1 0 1 & 0 is 0
1 1 1 & 1 is 1

let a = 12;
let b = 25;

result = a & b;

Bitwise OR | returns 1 if either of the corresponding bits of one operand is 1 else returns 0.

Operand 1 Operand 2 OR Operation
0 0 0 | 0 is 0
0 1 0 | 1 is 1
1 0 1 | 0 is 1
1 1 1 | 1 is 1

let a = 12;
let b = 25;

result = a | b;

Social media Links:
To get the regular updates:
Playlists:
Virtual Coffee with Jagadeesh:
Digital Logic Design:
Computer Organization and Architecture:
C Programming:
Data Structures:

Theory of Computation:

Compiler Design:

Computer Networks:
For GATE PYQs and much more explore:
Рекомендации по теме