Skip to content

Chocobo1/mask-enumerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mask enumerator

Enumerate masked numbers

Travis CI status

Features

Operates in range of 32bits, eg. 0~0xFFFFFFFF

Example

Suppose we have a value 27000 and a mask 0xfff8 (the 3 bits counting from LSB is being masked out)

Run the program as follow:

$ ./mask_enum 27000 0xfff8

The program enumerates all the numbers starting from 27000 and is covered/masked by the mask 0xfff8.

The result is: [27000, 27007]. Program output as below:

value: 27000, mask: 0xfff8

Results:
27000
27001
27002
27003
27004
27005
27006
27007

Compiler Requirements

C++

License

This program is licensed under zlib License

Notes

This program was created to verify the solution of Mask calculator

About

Enumerate masked numbers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published