Skip to content
Discussion options

You must be logged in to vote

Khiops dictionaries allow to extract such information using string rules: https://khiops.org/api-docs/kdic/string-rules/

  • Use ToUpper to be case-insensitive.
  • Use Translate to replace each hexadecimal character into the corresponding binary substring (e.g., "7" -> "0111", "A" -> "1010").
  • Finaly, extract each bit from the resulting binary string, using Middle.

Below is an example of a Khiops dictionary that extracts the 8 least significant bits of a hexadecimal string:

Dictionary	Data
{
	Categorical	HexaString		;	
	
	// Convert hexadecimal string into a binary string. Example: "A19" -> "101000011001"
Unused	Categorical	BinaryString = Translate(ToUpper(HexaString), 
                        …

Replies: 1 comment

Comment options

marcboulle
Feb 5, 2026
Maintainer Author

You must be logged in to vote
0 replies
Answer selected by lucaurelien
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant