Description
Return octet 255 for true and zero for false, using DER's canonical BOOLEAN content-octet convention.
ASN.1 BER encodes values as identifiers, lengths and content; DER constrains representation to a canonical form. Content octets, first-tag octets and length prefixes are only parts of a complete encoded value.
Return octet 255 for true and zero for false, using DER's canonical BOOLEAN content-octet convention.
When to use this tool
Use DER Boolean Value Octet when inspecting one explicit ASN.1 encoding component.
How to use the tool and how it works
- Enter value. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read octet. Use the output convention below.
Return octet 255 for true and zero for false, using DER's canonical BOOLEAN content-octet convention.1
ASN.1 encodings distinguish identifier, length and content octets. DER adds canonical constraints; the local output still needs its surrounding encoding.2
| Input field | Meaning and units | Accepted input |
|---|---|---|
| value | Value | Required. Boolean. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| octet | Octet | Required. Safe integer. |
{
"input": {
"value": true
},
"output": {
"octet": 255
}
} Limitations and assumptions
- This emits the content byte only. The BOOLEAN tag and length are not included, and more permissive BER encodings are not generated.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
Alternative or Complementary methods
Use an appropriate complete ASN.1 encoder and schema for canonical full values, nested lengths and application semantics.
References
-
Calculation and input contract: encode/der-boolean-value-octet — tool.io
-
ASN.1 encoding rules: ITU-T X.690 (12/1997) — International Telecommunication Union
Similar or alternative tools
- DER Integer Sign Padding Octet
Canonicalize an unsigned magnitude’s positive DER INTEGER content and add a sign-protection octet when needed.
- DER Bitstring Padding Count Octet
Calculate payload-octet and unused-tail-bit counts from a supplied BIT STRING bit length.