# Ignoring binary string monoid

I was just wondering what can I do to convert the binary digits (for ex. ASCII) shown below to integers.

sage: from sage.crypto.util import ascii_to_bin

sage: from sage.crypto.util import ascii_integer

sage: bin=BinaryStrings()

sage: B=bin.encoding("A"); B

01000001

sage: ascii_integer(B)

65

sage: parent(B)

Free binary string monoid

sage: parent(ascii_integer(B)) <type 'int'="">

sage: