matrix optimized to bit matrix