Try out the bitset type in the Fortran stdlib
effort:
William Clodius, a long-time computational scientist and also a contributor to many a discussion over time at comp.lang.fortran, is the primary author of the above bitsets
module in stdlib
. That will hopefully serve as a positive reference for you.
And I think this work on stdlib bitsets and the methods therein can meet most of your needs; should anything be lacking or running into bugs, suitable PR
s would be in order to get you the rest of the missing functionality. You may even consider authoring them yourself!