I really don't know an easy way to do it, but I can tell you I didn't see anything nearly as complicated as your examples on the exam.
I recommend just trying to understand the concept. Understand what happens when you shift the bits. That's what the
test is after.
Good Luck!
------------------
Brian Hoff
Sun Certified Programmer for the Java� 2 Platform
[This message has been edited by Brian Hoff (edited August 30, 2001).]