In the spirit of *Mathematica* 10 I would have written it: Composition[ DeleteCases[{{0} ..}], Map[Transpose], SplitBy[#, Unitize@*Total] &, Transpose ]@mat > `{{{0, 0}, {1, 0}, {0, 1}, {0, 0}, {1, 1}, {0, 0}}, {{0}, {1}, {0}, > {0}, {1}, {1}}, {{1}, {1}, {0}, {1}, {0}, {1}}}`