About Lesson
bitwise operators
बिटवाइज़ ऑपरेटर ऑपरेंड पर बिटवाइज़ ऑपरेशन करते हैं।
ऑपरेटर |
विवरण |
उदाहरण |
& |
Bitwise AND |
(10 ==20 & 20==33) = असत्य |
| |
Bitwise OR |
(10==20 | 20==33) = असत्य |
^ |
Bitwise XOR |
(10==20 ^ 20==33) = असत्य |
~ |
Bitwise NOT |
(~ 10) = -10 |
<< |
Bitwise left shift |
(10<<2) = 40 |
>> |
Bitwise right shift |
(10>>2) = 2 |
>>> |
Bitwise right shift with zero |
(10>>> 2) = 2 |
bitwise operators
Bitwise operators perform bitwise operations on operands.
operator |
Description |
Example |
& |
Bitwise AND |
(10 ==20 & 20==33) = false |
| |
Bitwise OR |
(10==20 | 20==33) = false |
^ |
Bitwise XOR |
(10==20 ^ 20==33) = false |
~ |
Bitwise NOT |
(~ 10) = -10 |
<< |
Bitwise left shift |
(10<<2) = 40 |
>> |
Bitwise right shift |
(10>>2) = 2 |
>>> |
Bitwise right shift with zero |
(10>>> 2) = 2 |