摘要 |
PURPOSE:To discriminate the power of 2 efficiently, by discriminating if a value X is the power of 2, from a logical product between values in a register A to which a value representing a decimal number x is set in a binary number and in a register B to which a value smaller than the X by 1 is set in a binary number. CONSTITUTION:A value representing a decimal number in a binary number is set to a register 11 and a value representing the said decimal number smaller by 1 in a binary number is set to a register 12. The logical product of the values in the registers 11 and 12 is taken at a logical circuit 13. If this logical product is 0, the result is discriminated at a discrimination section 14 and the control is given to a power-of-2 processing section 15. |