Sorting digital signals

I hope this picture makes it easy to understand.