C - What is this syntax about? <<

what does this sibol mean? "& L; <" for example: if (1 <var)

I want the name of the subject to be studied. Thank.

+3
source share
6 answers

It shifts bits in as many as 1 varpositions to the left. Thus, in essence, it computes 2 to a power var.

See the article on bit shifting on wikipedia .

+6
source

What left bitwise shift operator.

The other bitwise shift operatoris >>.

+5
source

" ". 0000..00001 "var". , var 1, , "1 < 1", 0001 0010, 2. var 2, 0100 (4) .. , .

+5
+3

.

, , .

+3

<<is a manipulation operator. In particular, it <<performs a left shift operation. This provides the effect of multiplying the base value by power 2.

More information can be found at: http://en.wikipedia.org/wiki/Bit_manipulation

+1
source

Source: https://habr.com/ru/post/1771172/


All Articles