binary operations

How do i perform binary operations, such as addition, subtraction, multiplication and division..

I am kinda confused on how the binary division is performed.
Because it gets shifted if the first bit is equal to 0..

I tried to xor the divisor and dividend, and test the first bit each time, to see if it need to be shifted, but it just gives me and incorrect result..

Topic archived. No new replies allowed.