@classmethod<EOL><INDENT>def fromBinaryString(cls, value, internalFormat=False, prepend=None):<DEDENT>
try:<EOL><INDENT>value = SizedInteger(value or '<STR_LIT:0>', <NUM_LIT:2>).setBitLength(len(value))<EOL><DEDENT>except ValueError:<EOL><INDENT>raise error.PyAsn1Error('<STR_LIT>' % (cls.__name__, sys.exc_info()[<NUM_LIT:1>]))<EOL><DEDENT>if prepend is not None:<EOL><INDENT>value = SizedInteger(<EOL>(SizedInteger(prepend) << len(value)) | value<EOL>).setBitLength(len(prepend) + len(value))<EOL><DEDENT>if not internalFormat:<EOL><INDENT>value = cls(value)<EOL><DEDENT>return value<EOL>
Create a |ASN.1| object initialized from a string of '0' and '1'.

        Parameters
        ----------
        value: :class:`str`
            Text string like '1010111'