Divide Binary: Learn & Get Tricks!

  • Context: MHB 
  • Thread starter Thread starter bergausstein
  • Start date Start date
  • Tags Tags
    Binary Division
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. :)
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 6 ·
Replies
6
Views
13K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 43 ·
2
Replies
43
Views
9K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 34 ·
2
Replies
34
Views
22K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K