Vel's Java Home Page



I'm planning to post some tips and tools that might be useful for the exam.

Bitwise/Shift operations To understand bitwise/shift operators and to perform calculations, we need to understand how the numbers are represented in different bases. For a good explanation, refer to this description. (External site - broken now)

Here are some programs that I wrote in order to understand the operators better. These AWT windows are self-explanatory. They display the bit representation of the number. If you inspect the bit pattern of the result after each bitwise/shift operation, it will give you a good understanding of how those operations work.

Download the zip file and extract it. It contains 3 jar files. Run these jar files using -jar option. (java -jar )

  1. Shift.jar - Explains shift operators
  2. Shift2.jar - Explains shift operators(User interface is cleaner, I like this more)
  3. Bitwise.jar - Explains bitwise operators