Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement bitwise masking in hex patterns. #15

Open
plusvic opened this issue Apr 5, 2023 · 1 comment
Open

Implement bitwise masking in hex patterns. #15

plusvic opened this issue Apr 5, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@plusvic
Copy link
Member

plusvic commented Apr 5, 2023

Example: { E0 F:0?1?: :0110 1001: AB }

Everything in between pairs of : is interpreted as a sequence of bits where ? is a wildcard for a single bit. The number of bits in each sequence must be multiple of 4. You can express one nibble in its hex form and the other one in binary, like in F:0?1?:

@plusvic plusvic added the enhancement New feature or request label Apr 5, 2023
@travisgoodspeed
Copy link

Another syntax might be to have masks in hex, where your prior example would be written as something like the following.

{ E0 F2&FA 69 AB }

Whatever the syntax, I'll gladly use any sort of bit masking feature if it were available. Nybble granularity isn't always the best scale in hex strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants