How Does Modulo 2 Long Division Work with XOR Operations?

  • Thread starter Thread starter fran1942
  • Start date Start date
  • Tags Tags
    Division
Click For Summary
SUMMARY

The discussion focuses on the process of modulo 2 long division using XOR operations, specifically addressing the division of binary numbers 1101 and 1111. The key point is that during the division, the most significant bit of the divisor and the current remainder are crucial, allowing 1101 to "go into" 1011 despite the apparent size difference. This is because modulo 2 arithmetic employs XOR instead of traditional subtraction, enabling the clearing of significant bits without borrows. The conversation clarifies that treating binary numbers as polynomials with modulo 2 coefficients aids in understanding the division process.

PREREQUISITES
  • Understanding of binary arithmetic
  • Familiarity with XOR operations
  • Knowledge of polynomial representation in finite fields
  • Basic concepts of modulo 2 mathematics
NEXT STEPS
  • Study binary polynomial division techniques
  • Learn about finite fields and their applications in coding theory
  • Explore the properties of XOR in digital logic design
  • Investigate the implications of modulo 2 arithmetic in error detection and correction
USEFUL FOR

Students and professionals in computer science, particularly those focusing on digital communications, coding theory, and binary arithmetic operations.

fran1942
Messages
80
Reaction score
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: 718
Physics news on Phys.org
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:

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 3 ·
Replies
3
Views
3K
Replies
6
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 19 ·
Replies
19
Views
3K
  • · Replies 6 ·
Replies
6
Views
13K