Computer Science, asked by iram91, 1 year ago

how to solve binary dividion

Answers

Answered by Saifßàã
0
hello friend.✌️✌️

Binary Division

The good news is that binary division is a lot easier than decimal division.

Instead of having to guess how many times our divisor fits into the working dividend (which can get complicated if the numbers involved are large), in binary division the answer will either be 0 or 1.  This makes calculation far easier.

To illustrate the point, imagine we have the binary number 10010.001 and want to divide it by 11.1.  Lets have a look at the steps.

Note: I’ve not shown all the intermediate stages this time but you should be able to follow along.



We start by writing out our problem.  First, we check whether our divisor has a radix point which it has.  To eliminate this, we move the radix point in both our dividend and divisor right by a single place and re-write our problem.



With the radix point eliminated in our divisor we are ready to go.

Sub Problems 1 – 3



I’ve collapsed the first three sub-problems into one as they are basically identical.  In each, we follow the same four steps as we did with the decimal division example above.  We take the first digit in our dividend and attempt to divide it by our divisor.  In this case, it doesn’t fit so we write a 0 in the first column of our result, calculate the product (which is 0 and subtract it from our working dividend before bringing down the next digit of our original dividend to create a new working dividend.  We repeat this process for the first three digits in our original dividend until eventually we reach the point where we have a working dividend of 1001.

Sub Problem 4



Back at step 1, we again attempt to divide our current working dividend (1001) by the divisor (111).  This time, the divisor is less than the dividend and we write a 1 as the next digit in the result.

Moving on to step 2, we calculate the product 1 x 111 = 111 and then move to step 3.

Remember, step 3 is a subtraction operation.  We learnt previously that we could perform subtraction by taking the two’s complement of the number we want to subtract and then add it instead.

Taking this approach, we calculate the two’s complement of 111 (remember the rules for two’s complement: flip all the bits and then add 1).

This gives us a two’s complement representation of 1001 which we then add to the current working dividend.  Also remember how when we are adding a two’s complement number and we need to carry an additional bit into a new column we simply drop that bit.  That is the case here.  The result is a remainder of 100.

Step 4 sees us bring down the next bit in our original dividend to get a new working dividend of 100.

Sub Problem 5



Step 1 of sub-problem 5 sees us trying to divide our new working dividend of 100 by our divisor 111.  As 111 is greater than 100 we put a zero as the next digit in our result.  I’ll skip steps 2 and 3 (which basically have no effect) and then we bring down the next digit in the original dividend to get a new working dividend of 1000.

Sub Problem 6



In step 1 we divide our working dividend of 1000 by 111 which results in us writing a 1 as the next digit in our result.  We then use the same two’s complement technique to subtract 111 from 1000.  Again, we drop the carried bit and get a new remainder of 1.  This is then combined with the next digit we bring down from the original dividend to create a new working dividend of 11.

Sub Problem 7 – 8



In sub-problem 7, we again go around the loop.  This time, we attempt to divide our working dividend of 11 by our divisor 111.  This results in 0 being added as the next digit or our result.  We then perform the necessary multiplication and subtraction steps (which have no effect) and bring down the last and final digit in our original dividend to create a new working dividend of 111.

In our final sub problem, we follow the same process.  This time we divide the working dividend of 111 by the divisor which is also 111.  We write the quotient (1) as the next digit in the result and subtract the product of multiplying the quotient by our divisor (111) from our working dividend (111) to get a result of 0.  With no remainder, and no more digits in our original dividend we have our final answer: 10010.001 / 11.1 = 101.01.

As you can see, division in binary is generally simpler than its decimal equivalent.  In both cases, (decimal and binary) there are often a lot of smaller sub problems to solve but each of them is simply a matter of following the four step process we have discussed above:

Divide

Multiply

Subtract

Bring Down

Hopefully by following through the examples above you will have got the hang of it.  If not, be patient and give it a go yourself before referring back to my workings.  Leave me a comment below if you need any help.

hope its help U...my friend.✌️✌️
Similar questions