Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Implementation of +,-,*,/ with bitwise operator

There is a question asked on Stackoverflow : Divide a number by 3 without using *,/,+,-,% operators. This question is an Oracle interview question. Some people give excellent answers. You can go there and take a look. Usually we need to use bitwise operators to do this kind of implementations. Here I want to show you ways to implement +,-,*,/ with bitwise operators.A bitwise operation operates on one or more bit patterns or binary numerals at the level of their individual bits. It is a fast, primitive action directly supported by the processor, and is used to manipulate values for comparisons ...

39,017 3       DIVISION BITWISE OPERATOR SHIFT ADD SUBTRACT MULTIPLICATION