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

Clash 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:

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.
proof-explanation cryptography binary
add a comment |Â
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:

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.
proof-explanation cryptography binary
add a comment |Â
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:

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.
proof-explanation cryptography binary
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:

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.
proof-explanation cryptography binary
edited Aug 26 at 19:51
asked Aug 26 at 19:20
Chris
748311
748311
add a comment |Â
add a comment |Â
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$).
add a comment |Â
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$).
add a comment |Â
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$).
add a comment |Â
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$).
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$).
answered Aug 26 at 20:07
TonyK
38.7k348127
38.7k348127
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password