PURPOSE: To shorten the time required for sorting by using n-step cascaded discriminating and storing means and a control means.
CONSTITUTION: After n-step of discriminating and storing parts 21 to 2n are cascaded and are initialized, discriminating and storing parts 21 to 2n compare input data with data stored in storing parts. When input data is larger or smaller, input data is stored in storing parts to store input data in storing parts in the ascending or descending order. Since a control means 3 generates at least n-number of shifted clocks to supply them to corresponding discriminating and storing parts 21 to 2n at the time of input of one clock, the processing of one data is all completed with one clock. Thus, the time required for sorting is shortened.