Question on the amount of binary bits operations in binary division.

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












For the question, we write $ell(a)$ to denote the length of the positive integer $a=(a_1cdots a_k)_2$.



In my cryptography textbook, in the section of binary division, I found the following claim:




Let $ageq bin BbbZ^+$. Then, the binary division $a:b$ requires
$leq ell(b)cdot(ell(a)-ell(b)+1)$ binary bit operations.




Τhen, in order to prove the claim, it continues:



From the division algorithm, $exists a,bin BbbZ^+: a=bq+r, 0leq r<b.$ And from an easy to prove theorem, we know that $ell (q) leqell(a)-ell(b)+1.$



Now, finding the quotient and remainder requires $ell(q)leq ell(a)-ell(b)+1$ subtractions.
subtractions.



Each subtraction requires $ell (b)$ bit operations.



And in this sentence above I faced the problem.



Why do we have $ell(b)$ bit operations instead of $ell(a)$?



For example:



enter image description here



In this example we have $2$ subtractions. In the first $(1101-1001)$ we have $4=ell(b)$ binary bits operations. But, in the second $(10001-1001)$ we have $5>ell(b)=4$ binary bits operations.



Why does this happen? Do I misunderstand something?



Thank you.







share|cite|improve this question


























    up vote
    1
    down vote

    favorite












    For the question, we write $ell(a)$ to denote the length of the positive integer $a=(a_1cdots a_k)_2$.



    In my cryptography textbook, in the section of binary division, I found the following claim:




    Let $ageq bin BbbZ^+$. Then, the binary division $a:b$ requires
    $leq ell(b)cdot(ell(a)-ell(b)+1)$ binary bit operations.




    Τhen, in order to prove the claim, it continues:



    From the division algorithm, $exists a,bin BbbZ^+: a=bq+r, 0leq r<b.$ And from an easy to prove theorem, we know that $ell (q) leqell(a)-ell(b)+1.$



    Now, finding the quotient and remainder requires $ell(q)leq ell(a)-ell(b)+1$ subtractions.
    subtractions.



    Each subtraction requires $ell (b)$ bit operations.



    And in this sentence above I faced the problem.



    Why do we have $ell(b)$ bit operations instead of $ell(a)$?



    For example:



    enter image description here



    In this example we have $2$ subtractions. In the first $(1101-1001)$ we have $4=ell(b)$ binary bits operations. But, in the second $(10001-1001)$ we have $5>ell(b)=4$ binary bits operations.



    Why does this happen? Do I misunderstand something?



    Thank you.







    share|cite|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      For the question, we write $ell(a)$ to denote the length of the positive integer $a=(a_1cdots a_k)_2$.



      In my cryptography textbook, in the section of binary division, I found the following claim:




      Let $ageq bin BbbZ^+$. Then, the binary division $a:b$ requires
      $leq ell(b)cdot(ell(a)-ell(b)+1)$ binary bit operations.




      Τhen, in order to prove the claim, it continues:



      From the division algorithm, $exists a,bin BbbZ^+: a=bq+r, 0leq r<b.$ And from an easy to prove theorem, we know that $ell (q) leqell(a)-ell(b)+1.$



      Now, finding the quotient and remainder requires $ell(q)leq ell(a)-ell(b)+1$ subtractions.
      subtractions.



      Each subtraction requires $ell (b)$ bit operations.



      And in this sentence above I faced the problem.



      Why do we have $ell(b)$ bit operations instead of $ell(a)$?



      For example:



      enter image description here



      In this example we have $2$ subtractions. In the first $(1101-1001)$ we have $4=ell(b)$ binary bits operations. But, in the second $(10001-1001)$ we have $5>ell(b)=4$ binary bits operations.



      Why does this happen? Do I misunderstand something?



      Thank you.







      share|cite|improve this question














      For the question, we write $ell(a)$ to denote the length of the positive integer $a=(a_1cdots a_k)_2$.



      In my cryptography textbook, in the section of binary division, I found the following claim:




      Let $ageq bin BbbZ^+$. Then, the binary division $a:b$ requires
      $leq ell(b)cdot(ell(a)-ell(b)+1)$ binary bit operations.




      Τhen, in order to prove the claim, it continues:



      From the division algorithm, $exists a,bin BbbZ^+: a=bq+r, 0leq r<b.$ And from an easy to prove theorem, we know that $ell (q) leqell(a)-ell(b)+1.$



      Now, finding the quotient and remainder requires $ell(q)leq ell(a)-ell(b)+1$ subtractions.
      subtractions.



      Each subtraction requires $ell (b)$ bit operations.



      And in this sentence above I faced the problem.



      Why do we have $ell(b)$ bit operations instead of $ell(a)$?



      For example:



      enter image description here



      In this example we have $2$ subtractions. In the first $(1101-1001)$ we have $4=ell(b)$ binary bits operations. But, in the second $(10001-1001)$ we have $5>ell(b)=4$ binary bits operations.



      Why does this happen? Do I misunderstand something?



      Thank you.









      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Aug 26 at 19:51

























      asked Aug 26 at 19:20









      Chris

      748311




      748311




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          You know the result of the subtraction will be less than $b$, so you don't have to carry out the subtraction of the highest-order bit (because you know the result will be $0$).






          share|cite|improve this answer




















            Your Answer




            StackExchange.ifUsing("editor", function ()
            return StackExchange.using("mathjaxEditing", function ()
            StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
            StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
            );
            );
            , "mathjax-editing");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "69"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            convertImagesToLinks: true,
            noModals: false,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            noCode: true, onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













             

            draft saved


            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2895405%2fquestion-on-the-amount-of-binary-bits-operations-in-binary-division%23new-answer', 'question_page');

            );

            Post as a guest






























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes








            up vote
            1
            down vote













            You know the result of the subtraction will be less than $b$, so you don't have to carry out the subtraction of the highest-order bit (because you know the result will be $0$).






            share|cite|improve this answer
























              up vote
              1
              down vote













              You know the result of the subtraction will be less than $b$, so you don't have to carry out the subtraction of the highest-order bit (because you know the result will be $0$).






              share|cite|improve this answer






















                up vote
                1
                down vote










                up vote
                1
                down vote









                You know the result of the subtraction will be less than $b$, so you don't have to carry out the subtraction of the highest-order bit (because you know the result will be $0$).






                share|cite|improve this answer












                You know the result of the subtraction will be less than $b$, so you don't have to carry out the subtraction of the highest-order bit (because you know the result will be $0$).







                share|cite|improve this answer












                share|cite|improve this answer



                share|cite|improve this answer










                answered Aug 26 at 20:07









                TonyK

                38.7k348127




                38.7k348127



























                     

                    draft saved


                    draft discarded















































                     


                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2895405%2fquestion-on-the-amount-of-binary-bits-operations-in-binary-division%23new-answer', 'question_page');

                    );

                    Post as a guest













































































                    這個網誌中的熱門文章

                    tkz-euclide: tkzDrawCircle[R] not working

                    How to combine Bézier curves to a surface?

                    1st Magritte Awards