Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Bitwise Operators

Bitwise Operators

Bitwise Operators are a feature.

In digital computer programming, a bitwise operation operates on one or more bit patterns or binary numerals at the level of their individual bits. It is a fast and simple action, directly supported by the processor, and is used to manipulate values for comparisons and calculations. On simple low-cost processors, typically, bitwise operations are substantially faster than division, several times faster than multiplication, and sometimes significantly faster than addition. Read more on Wikipedia...

Languages with Bitwise Operators include JavaScript, C, Python, C++, R, Slope, Jule

Example from JavaScript:
var x = 5 & 1;
Example from C:
int i = 4; /* bit pattern equivalent is binary 100 */ int j = i << 2; /* makes it binary 10000, which multiplies the original number by 4 i.e. 16 */
Example from Python:
x << y
Example from R:
! x x & y x && y x | y x || y xor(x, y)
Example from Slope:
(& 0xFF 0x1B)
Example from Jule:
& | ^ << >>
unicode-identifiers-feature.html 路 bitwise-operaters-feature.html 路 functions-feature.html

View source

PLDB - Build the next great programming language 路 v2022 Day 33 Docs Build Acknowledgements Traffic Today Traffic Trends Mirrors GitHub