1. A computer-based method for determining datapath bit slices, comprising: determining all gates in a datapath between an input vector and an output vector; constructing a network flow including the gates identified; identifying a main frame solution of the network flow, wherein the main frame solution matches a starting bit in the input vector to an ending bit in the output vector; and obtaining a bit slicing solution corresponding to the main frame solution by extracting those of the gates in the datapath that reside between the starting bit and the ending bit, wherein at least one of: the determining, the constructing, the identifying, or the obtaining is performed using a processor.