Generate binary patterns for various purposes