Ask Your Question

Revision history [back]

I am not completely sure about what you call bonary representation of the polynomial, but i could suggest:

sage: IP.coefficients(sparse=False)
[1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]

If you want the bit of low weight to be on the right, you can do:

sage: L = IP.coefficients(sparse=False)
sage: L.reverse()
sage: L
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1]

I am not completely sure about what you call bonary binary representation of the polynomial, but i could suggest:

sage: IP.coefficients(sparse=False)
[1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1]

If you want the bit of low weight to be on the right, you can do:

sage: L = IP.coefficients(sparse=False)
sage: L.reverse()
sage: L
[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1]