Classifying reversible logic gates with ancillary bits