I read the docs, and my understanding is that I don't need to place the corner bits since they can be replaced by placing the edge bits on both sides. But I can only make 16 combinations with this. How do I get 47 (or 48? I saw that number sometimes too) different bitmask combinations?

I have one center tile, one single tile, four tiles that have only one neighbor, six tiles that have only two neighbors, and four tiles with three neighbors.

Edit: The corner bits work differently than the edge bits but I can't figure out how. :|