You would be better off using a prefix tree. You can easily modify the implementation to suit your need of only caring about certain parts of the key. In addition, search time is very fast.
For your example, the tree would have a height of 8 and you would explore the left subtree if the current bit in your key was a 0, and the right subtree if it was a 1. You can modify the implementation to not care about the zeros and return all results by branching (exploring both left and right subtrees) at each point where you are trying to match to a 0 in your search key.