0 votes 0 votes a << 1 is equivalent to multiplying a by 2, dividing a by 2, adding 2 to a none shwetakhandelwal asked Nov 1, 2018 shwetakhandelwal 282 views answer comment Share Follow See all 3 Comments See all 3 3 Comments reply Sayan Bose commented Nov 1, 2018 reply Follow Share This is left-shift operation which is equivalent to multiplication of the variable by 2. Note : The left shift and right shift operators should not be used for negative numbers. 0 votes 0 votes Mk Utkarsh commented Nov 1, 2018 reply Follow Share Shifted 1 bit position towards left. which can also be perceived as multiplying a by 2 0 votes 0 votes Shaik Masthan commented Nov 1, 2018 reply Follow Share Note that shift operator applied on unsigned numbers, applying them on signed numbers is implementation defined. a<<2 = multiply by 2, if a*2 is not lead to over flow. let A = 5 bits and it is unsigned number ===> range = 0 to 2n-1 if A = 15 ===> A*2 is in the range ===> A << 2 simply as A*2 if A = 16 ===> A*2 is not in the range ====> A << 2 doesn't imply A*2 2 votes 2 votes Please log in or register to add a comment.
0 votes 0 votes The left shift operator equivalent to multiply by 2,and right shift operator equivalent to division by 2. So option (A) is correct. RAGHAV* answered Nov 1, 2018 RAGHAV* comment Share Follow See all 0 reply Please log in or register to add a comment.