# bit2oct

This function converts a single bitstring value to a single octetstring. The resulting octetstring represents the same value as the bitstring.

Related keyword:

- octetstring
- bitstring

### bit2oct(bitstring value) return octetstring

- For the conversion the following holds: bit2oct(value)=hex2oct(bit2hex(value)).

Example 1:

const octetstring c_tre := bit2oct('101001011010'B);

The constant called c_tre will have the value 'A5A'O .