I've heard that subtraction, multiplication and division can be converted into addition in computer. For example, subtraction can be multiplied by - 1. I want to know how to convert division

I've heard that subtraction, multiplication and division can be converted into addition in computer. For example, subtraction can be multiplied by - 1. I want to know how to convert division


I don't know if you know the complement. Subtraction is actually adding the subtracted * (- 1), while positive and negative numbers can be represented by complement
Division calculation is similar to manual calculation, because the computer is binary representation, each quotient can only be 0 or 1, if quotient is 1, it is a subtraction



How to calculate binary division and multiplication (100001 / 1011) (100001 * 1011)


First, change the binary system to the decimal system
100001=1*2^5+0*2^4+0*2^3+0*2^2+0*2^1+1*2^0=33
1011=1*2^3+0*2^2+1*2^1+1*2^0=11
So 100001 / 1011 = 3 (2 ^ 5 is the 5th power of 2)
100001*1011=363
Or you can see that binary 1 is equivalent to
Decimal 32 16 8 4 2 1
If it is binary, 0 is equivalent to
Decimal 0



What is the law of fractional multiplication?
An example, by the way


Multiplication has sequence: bracket first, numerator and denominator second, division last



(A-2) / (a + 2) fractional division


A-2 = a + 2-2, which is equal to 1-2 / A + 2