output of code (2<<5)>>3
Answers
Answered by
1
Answer:
I notice that I can do things like 2 << 5 to get 64 and 1000 >> 2 to get 250. Also I can use >> in print: print >>obj, "Hello world" What is happening here?
64 votes
I think it is important question and it is not answered yet (the OP seems to already know ... More
62 votes
These are bitwise shift operators. Quoting from the docs: x << y Returns x with the bits ... More
25 votes
12 << 2 48 Actual binary value of 12 is "00 1100" when we execute the above statement Left ... More
13 votes
They are bit shift operator which exists in many mainstream programming languages, << is ... More
12 votes
The other case involving print >>obj, "Hello World" is the "print chevron" syntax for the ... More
View all posts
Similar questions
Social Sciences,
2 months ago
Math,
4 months ago
Math,
4 months ago
Math,
10 months ago
English,
10 months ago