@staticmethod<EOL><INDENT>def fromBinaryString(value):<DEDENT>
bitNo = <NUM_LIT:8><EOL>byte = <NUM_LIT:0><EOL>r = []<EOL>for v in value:<EOL><INDENT>if bitNo:<EOL><INDENT>bitNo -= <NUM_LIT:1><EOL><DEDENT>else:<EOL><INDENT>bitNo = <NUM_LIT:7><EOL>r.append(byte)<EOL>byte = <NUM_LIT:0><EOL><DEDENT>if v in ('<STR_LIT:0>', '<STR_LIT:1>'):<EOL><INDENT>v = int(v)<EOL><DEDENT>else:<EOL><INDENT>raise error.PyAsn1Error(<EOL>'<STR_LIT>' % (v,)<EOL>)<EOL><DEDENT>byte |= v << bitNo<EOL><DEDENT>r.append(byte)<EOL>return octets.ints2octs(r)<EOL>
Create a |ASN.1| object initialized from a string of '0' and '1'.

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