class for bit pattern