i need a detail explanation about left shift and right shift operators in c..its very hard to understand it..especially when i am using shifting on hex and oct values...seems to quite confusing me...i got the output..but i dunno how it comes...please clear my doubts..
thank you

Recommended Answers

http://wapedia.mobi/en/Logical_shift and http://wapedia.mobi/en/Arithmetic_shift

It helps a lot to treat the numbers as binary. You can also think about dividing by 2 (right shift) or multiplying by 2 (left shift)

Jump to Post

All 3 Replies

Hi sanagopi

I've just answered to your posting dealing with hexadecimal number 0xff where at least left shift operator has been annotated.

right-shift operator: that is kind of division by 2, and it functions analogously to left shift. You could understand both operators if you read my posting there.

-- tesu

Hi sanagopi

I've just answered to your posting dealing with hexadecimal number 0xff where at least left shift operator has been annotated.

right-shift operator: that is kind of division by 2, and it functions analogously to left shift. You could understand both operators if you read my posting there.

-- tesu

thanks a lot tesu...i would please to be ur friend

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.