samedi 27 juin 2015

How can I divide bitsets?

I use two bitsets to store two polynomials. I want one of them to be divided by 2nd and I want to get remainder after division. For example if I would like it on the paper:

w1= 110011010000000
w2 = 1111001

                            100100100
                110011010000000 : 1111001
                1111001
                -- 1111110
    1111001
     ---- 1110000
            1111001
            ---  100100 = remainder

Aucun commentaire:

Enregistrer un commentaire