Assumption: your comparators understands integer or floating numbers.
If a sorting network sorts every sequence of 0's and 1's, then it sorts every arbitrary sequence of values.
Sorting network
In computer science, comparator networks are abstract devices built up of a fixed number of "wires", carrying values, and comparator modules that connect pairs of wires, swapping the values on the wires if they are not in a desired order. Such networks are typically designed to perform sorting on fixed numbers of values, in which case they are called sorting networks.
https://en.wikipedia.org/wiki/Sorting_network#Zero-one_principle

Seonglae Cho