| if format == 'hex': | 
| S = "" | 
| S = ZZ(self.truth_table(),2).str(16) | 
| S = "0"*((1<<(self._nvariables-2)) - len(S)) + S | 
| for 1 <= i < self._truth_table.limbs: | 
|                 if sizeof(long)==4: | 
|                     t = "%04x"%self._truth_table.bits[i] | 
|                 if sizeof(long)==8: | 
|                     t = "%08x"%self._truth_table.bits[i] | 
|                 S = t + S | 
| if format == 'hex': | 
| S = ZZ(self.truth_table(),2).str(16) | 
| S = "0"*((1<<(self._nvariables-2)) - len(S)) + S |