gf(2) mod

c = a % b

Calculate c = a/b, result is cremainder

gf(2) Polynomial long division

c = a/b

a = b0000000000000000000000010000000000000000000000000000000000000000
a = 0x0000010000000000
a = x40

b = b0000000000000000000000000000000010110000110000010101001011111001
b = 0x00000000b0c152f9
b = x31 + x29 + x28 + x23 + x22 + x16 + x14 + x12 + x9 + x7 + x6 + x5 + x4 + x3 + 1

  10000000000000000000000000000000000000000 | 10110000110000010101001011111001
- 10110000110000010101001011111001          | 1
  ----------------------------------------- |
    110000110000010101001011111001000000000 |
-  00000000000000000000000000000000         | 0
-   10110000110000010101001011111001        | 1
  ----------------------------------------- |
     11100111100010000011001000111010000000 |
-    10110000110000010101001011111001       | 1
  ----------------------------------------- |
      1010111010010010110000011000011000000 |
-     10110000110000010101001011111001      | 1
  ----------------------------------------- |
         1111001010011100100110111111100000 |
-      00000000000000000000000000000000     | 0
-       00000000000000000000000000000000    | 0
-        10110000110000010101001011111001   | 1
  ----------------------------------------- |
          100001001011101110010010000000100 |
-         10110000110000010101001011111001  | 1
  ----------------------------------------- |
            1101000111101011000000111110110 |
-          00000000000000000000000000000000 | 0

cquotient = b0000000000000000000000000000000000000000000000000000001011100110
cquotient = 0x00000000000002e6
cquotient = x9 + x7 + x6 + x5 + x2 + x

cremainder = b0000000000000000000000000000000001101000111101011000000111110110
cremainder = 0x0000000068f581f6
cremainder = x30 + x29 + x27 + x23 + x22 + x21 + x20 + x18 + x16 + x15 + x8 + x7 + x6 + x5 + x4 + x2 + x