+ 3

How does << operator work in C# programming?

C# Programming

2nd Mar 2019, 8:04 PM
Evidence Jinja
Evidence Jinja - avatar
7 Réponses
+ 7
Bitwise left shift: On the leftside is the number you want to shift, on the right side the amount of shifts For example 4 << 2 4 = 00000100 shift it to the left two times: --> 00010000 = 16 = 4 * 2^2 n << m = n * 2^m https://www.sololearn.com/learn/4087/?ref=app
2nd Mar 2019, 9:04 PM
Denise Roßberg
Denise Roßberg - avatar
+ 3
thanks
2nd Mar 2019, 9:10 PM
Evidence Jinja
Evidence Jinja - avatar
+ 2
shift left is used for multiplication by 2 ...if a=4 then a<<1 this means a*2 =8 if a<<2 this means a*2*2 etc a<<4 means a*2*2*2*2 .....while shift right is for division in the same way a>>2 = (a/2)/2 or a/4
5th Mar 2019, 10:55 AM
Sara Hamad
Sara Hamad - avatar
0
what do I have to fill in
20th Mar 2019, 8:44 PM
Binkowski
0
the question is. x__. and println........
20th Mar 2019, 8:46 PM
Binkowski
0
would be nice to get an answer, I have tried several possibilities,without sucsess
20th Mar 2019, 8:47 PM
Binkowski
0
the question is x_. _ and println ?
20th Mar 2019, 8:50 PM
Binkowski