How Does Modulo 2 Long Division Work with XOR Operations?

  • Thread starter fran1942
  • Start date
  • Tags
    Division
In summary, the conversation is about understanding modulo 2 long division, where the goal is to zero out the most significant bit(s) of the current remainder or dividend. The process involves using XOR instead of addition or subtraction, and treating the numbers as polynomials with 1 bit finite field coefficients.
  • #1
fran1942
80
0
Hello, I am trying to understand the following modulo 2 long division.
I understand that 1101 goes into 1111, so you write a 1 on the top.
The next stage after 'XOR'ing is to bring down the 1.
Now, 1101 does not go into 101, so you write a 0 at the top. So far so so good.
Now you bring down another 1 and 1101 still does not go into 1011, so how come they wrote a 1 in the third position at the top ? Shouldn't that be a zero ?

If someone could please explain where I am going wrong, I would most grateful.
 

Attachments

  • difv.jpg
    difv.jpg
    27.6 KB · Views: 555
Physics news on Phys.org
  • #2
Since modulo 2 math uses xor instead of add or subtract, then only the most sigificant bit of the divisor and current remainder / dividend matter, so 1101 "goes into" 1011 because you're using xor, not subtract. The goal during the division process is to zero out the most significant bit(s) of the current remainder / dividend.

Consider what would happen if you didn't treat 1101 as "going into" 1011, you'd be stuck with a 5 bit number (10110) and since there are no borrows when doing xor, you would never be able to clear that uppermost bit left in the remainder with an xor of 10110 and 1101.

Another way to look at these numbers is to consider them to be polynomials with 1 bit finite field (modulo 2) coefficients. This would mean that

1101 = 1 x3 + 1 x2 + 0 x + 1
1011 = 1 x3 + 0 x2 + 1 x + 1

So when doing modulo 2 division, then 1101 goes into any number where the x^3 coefficient is a 1.
 
Last edited:

Related to How Does Modulo 2 Long Division Work with XOR Operations?

1. What is Modulo 2 Long Division?

Modulo 2 Long Division is a mathematical process used to divide numbers when the remainder is either 0 or 1. It is commonly used in computer science and coding to perform binary division.

2. How is Modulo 2 Long Division performed?

To perform Modulo 2 Long Division, the number being divided (dividend) is written in binary form. The number it is being divided by (divisor) is also written in binary form. Then, a series of steps are followed to determine the quotient and remainder.

3. Why is Modulo 2 Long Division important?

Modulo 2 Long Division is important because it is used in many fields such as computer science, coding, and cryptography. It allows for efficient and accurate division of binary numbers, which are the basis for many computational processes.

4. What are some applications of Modulo 2 Long Division?

Some applications of Modulo 2 Long Division include error correction in data transmission, generating pseudorandom numbers, and checking for prime numbers. It is also used in various algorithms and protocols in computer science and cryptography.

5. Are there any tips for mastering Modulo 2 Long Division?

Some tips for mastering Modulo 2 Long Division include practicing with different numbers, understanding the binary number system, and familiarizing yourself with the steps involved in the process. It may also be helpful to review basic division principles and algorithms.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
Replies
12
Views
2K
  • Precalculus Mathematics Homework Help
Replies
5
Views
2K
  • STEM Academic Advising
Replies
7
Views
924
  • Engineering and Comp Sci Homework Help
Replies
7
Views
801
  • Introductory Physics Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
15
Views
3K
Back
Top