MHB Divide Binary: Learn & Get Tricks!

  • Thread starter Thread starter bergausstein
  • Start date Start date
  • Tags Tags
    Binary Division
AI Thread Summary
To divide a smaller binary number by a larger binary number, long division is the primary method, similar to decimal division. An example is provided where 10111 is divided by 1110001, resulting in a binary quotient of 0.1001, which corresponds to the decimal fraction 9/16. While long division is effective, it can be lengthy, and there is a suggestion that dividing by a power of two can be simplified by moving the binary point, akin to decimal division. However, no faster general-purpose algorithm beyond long division is widely known, indicating a need for further exploration of quicker methods.
bergausstein
Messages
191
Reaction score
0
Hello! Can you teach me how to divide a smaller binary by a bigger binary. For example, 10111÷ 1110001.
If you can also share tricks for a much faster solution it would be very much appreciated.
 
Technology news on Phys.org
You can use long division in the same way you divide decimal numbers. For example, let's divide 9 by 16 in binary notation:

$$\begin{array}{r}0.1001\hspace{-4px}\\10000\enclose{longdiv}{1001.000} \\ -\underline{10000} \hspace{21px} \\ 10000 \\ -\underline{10000} \\ 0 \end{array}$$

We see the quotient in binary is 0.1001 which is:

$$\frac{1}{2^1}+\frac{1}{2^4}=\frac{1}{2^4}\left(2^3+1\right)=\frac{9}{16}$$
 
MarkFL said:
You can use long division in the same way you divide decimal numbers. For example, let's divide 9 by 16 in binary notation:

$$\begin{array}{r}0.1001\hspace{-4px}\\10000\enclose{longdiv}{1001.000} \\ -\underline{10000} \hspace{21px} \\ 10000 \\ -\underline{10000} \\ 0 \end{array}$$

We see the quotient in binary is 0.1001 which is:

$$\frac{1}{2^1}+\frac{1}{2^4}=\frac{1}{2^4}\left(2^3+1\right)=\frac{9}{16}$$

I tried it and it was too long. By any chance, do you know a faster way?
 
bergausstein said:
I tried it and it was too long. By any chance, do you know a faster way?

Dividing by a power of two (as I did in my example) simply means moving the decimal point (just as dividing by a power of 10 works in decimal notation), however, the only general purpose algorithm I know of is long division. However, it's not something I have ever spent any time studying, and so someone else may know of a quicker method. :)
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.

Similar threads

Replies
2
Views
1K
Replies
42
Views
5K
Replies
34
Views
21K
Replies
4
Views
2K
Replies
32
Views
4K
Back
Top