Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
What is the use of bitwise shift operators?Means where can we use in application?
Posted

Sean Eron Anderson has a nice collection of Bit Twiddling Hacks[^] that illustrates their usefulness.

Regards
Espen Harlinn
 
Share this answer
 
Comments
Wendelius 28-Dec-12 10:56am    
Very useful!
Espen Harlinn 29-Dec-12 7:22am    
Thank you, Mika :-D
 
Share this answer
 
Comments
CPallini 20-Dec-12 17:41pm    
5.
[no name] 20-Dec-12 23:21pm    
Thanks
there are two types of bitwise operator->
1:Left Shift Operator- <<
2:Right Shift Operator- >>

Left Shift Operator:-
It is used to shift at left side,but depends on the length u will specify to shift.
Example- My number is-8,I want to shift it 2 place at left
First calculate binary of 8,it will be-1000 when u apply left Shift
with the lengthh of 2,means u want to left shift 2 place,then it will left shift ur binary format like- 100000 and now ur o/p will be decimal of 100000 means (32)

Right Shif Operator:- Same 1000 will be,with right shift operator with length 2 will become-0010 means (2)
 
Share this answer
 
take a look at this:
this is refrence.

http://www.google.com/url?sa=t&rct=j&q=msdn+bitwise+shift&source=web&cd=1&cad=rja&ved=0CDMQFjAA&url=http%3A%2F%2Fmsdn.microsoft.com%2Fen-us%2Flibrary%2Ff96c63ed(v%3Dvs.80).aspx&ei=ZozTUL7DEYftsgats4D4DA&usg=AFQjCNHKOi9anCvNpE5rLJfeuH9eFng3CA&bvm=bv.1355534169,d.Yms
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900