Quantcast
Channel: Programmers Heaven Forums RSS Feed
Viewing all articles
Browse latest Browse all 2703

bitwise left shift operator

$
0
0
hi
if we left shift 35 by 4 places, we are supposed to get result ( 35 x 2 to the power 4 ) according to definition of left shift operator but I am getting a different answer. why?

binary of 35 is 00100011
00100011 << 4 will result in 00110000 which is 48 where as the result should be 35 x 16 = 560.

please somebody help me

Viewing all articles
Browse latest Browse all 2703

Trending Articles