Division without using addition, multiplication or division
First of all, please keep your indentation consistent; it's all over the place here.  Java code is supposed to be indented by four spaces.  Also, try not to put whitespace in random places.  Keep things consistent.

Also, here are some additional cleanliness tips:


Don't declare or initialize multiple variables on a single line:


boolean isNeg=false,sign=true,bothNegative=false;



Have each variable on separate lines, which helps with maintenance and readability:

boolean isNeg = false;
boolean sign = true;
boolean bothNegative = false;


If you ever need additional boolean variables, having more lines would be better than having a longer single line across the screen.
Your bitwise operations can be simplified a bit:


a=a^b;
b=(a^b)&amp;b;
b=b&lt;&lt;1;



If you're doing a bitwise (or a mathematical) operation where the same variable is on both sides of the = sign, you can simply them as such:

a ^= b;
b &amp;= (a^b);
b &lt;&lt;= 1;