Results for “hex”
Small, practical examples. Search by task or narrow things down below.
Convert between hexadecimal text and bytes
PowerShell: Use the .NET hexadecimal helpers instead of parsing byte pairs manually.
PowerShell✓ Tested
Convert bytes to hexadecimal and back
Java: Use HexFormat for a standard-library representation of raw bytes.
Java✓ Tested
Convert hexadecimal text to bytes
Python: Use bytes.fromhex for a readable byte representation and hex for the reverse conversion.
Python✓ Tested
Decode a validated pair of hexadecimal digits
C: Convert each nibble and reject a nonhexadecimal character before combining them.
C✓ Tested
Decode hexadecimal bytes
C#: FromHexString and ToHexString handle binary data without manually parsing pairs of characters.
C#✓ Tested
Encode a byte buffer as hexadecimal
C: Format each byte as an unsigned two-digit hexadecimal value.
C✓ Tested
Encode bytes as hexadecimal
Encode bytes as hexadecimal using a complete Go program with explicit sample inputs.
Go✓ Tested
Format an integer as padded hexadecimal
Format an integer as padded hexadecimal in a complete Rust program using the standard library.
Rust✓ Tested
Inspect a byte as hexadecimal
Arduino / C: Inspect a byte as hexadecimal on an Uno with the Serial Monitor set to 9600 baud.
Arduino / C✓ Tested
Inspect bytes as hexadecimal values
Linux Commands: Use od with explicit formatting and no address column.
Linux Commands✓ Tested
Parse a hexadecimal integer
PowerShell: Convert.ToInt32 accepts an explicit base for a validated hexadecimal string.
PowerShell✓ Tested
Parse a hexadecimal integer
Parse a hexadecimal integer in a complete Rust program using the standard library.
Rust✓ Tested