Patent attributes
A first comparator compares first input data with second input data, and provides one when the first input data is larger than the second input data and zero when the first input data is equal to or smaller than the second input data as a first comparison result. A data generator generates data based on the second input data. A second comparator compares the first input data with the generated data, and provide one when the first input data is larger than the generated data and zero when the first input data is equal to or smaller than the generated data as a second comparison result. A data initializer initializes third input data. An adder adds the first and second comparison results to the third input data initialized in advance, and to provide the added data as the current third input data.