A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Programmer Certification (SCJP/OCPJP)
Joined: Mar 13, 2003
Apr 11, 2004 10:05:00
HI all, I found this question from Whizlabs software, can anybody explain me the answer. I dont have a clear concept of shift operators.
The answer is 2147483647
Thanks in advance
Joined: Aug 03, 2002
Apr 11, 2004 10:18:00
-1 is the following number in binary:
1111 1111 1111 1111 1111 1111 1111 1111
Shift to the right by one bit to get:
0111 1111 1111 1111 1111 1111 1111 1111 -> a 1 falls off the end here.
The zero on the left appears because we are using the >>> operator (compare with what the >> operator does)
What's the decimal equivalent of the result?
Ask a Meaningful Question
Getting someone to think and try something out is much more useful than just telling them the answer.
I agree. Here's the link:
subject: Whizlabs question
Can I install Whizlab SCBCD simulator in multiple
SCEA 5 part - I Exam simulator
XML Namespace - Question
Fill in the blanks questions ?
Whizlabs free diagnostic question confusing
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014