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 'Star maps using Blender'
Blender just recently dropped a new version, 4.5(with 5.0 on the horizon), and within it was a new feature for which I immediately thought of a use for. The new feature was a .csv importer for Geometry nodes. Geometry nodes are a method of modelling that uses a node tree to create 3D models which offers more flexibility than straight modeling does. The .csv importer node allows you to bring in a .csv file and use the data in it to control aspects of your model. So for example, if you...
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

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