programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Jeanne Boyarsky
• Ron McLeod
• Paul Clapham
• Liutauras Vilda
Sheriffs:
• paul wheaton
• Rob Spoor
• Devaka Cooray
Saloon Keepers:
• Stephan van Hulst
• Tim Holloway
• Carey Brown
• Frits Walraven
• Tim Moores
Bartenders:
• Mikalai Zaikin

# operator

Ranch Hand
Posts: 481
• Number of slices to send:
Optional 'thank-you' note:
Here we know that for >> we use formula as x/2topower of n and for << we use x * 2to power of n

then how we use this for the following one.

Ranch Hand
Posts: 59
• Number of slices to send:
Optional 'thank-you' note:
Hello karthik,
I cannot understand what you are trying to say. But I want to clarify if you don't know.

int b = 127;
b>>i --> b/(2 pow i);
b<<i --> b * (2 pow i);

So if b <<33 it is b * (2 pow 33);

Hope this clarifies your doubt.

Ranch Hand
Posts: 411
• Number of slices to send:
Optional 'thank-you' note:

Originally posted by Karthik Rajashekaran:
Here we know that for >> we use formula as x/2topower of n and for << we use x * 2to power of n

then how we use this for the following one.

b << 33 is equivalent to b << ( 33 % 32) i.e b << 1

author
Posts: 9050
21
• Number of slices to send:
Optional 'thank-you' note:
just remember this is a topic on the 1.4 exam, but it's NOT on the tiger exam!