We report a novel computational algorithm "BP-STOCH" to be used for studying single-type ligand binding with biopolymers of finite lengths, such as DNA oligonucleotides or oligopeptides. It is based on an idea to represent any type of ligand-biopolymer complex in a form of binary number, where "0" and "1" bits stand for vacant and engaged monomers of the biopolymer, respectively. Cycling over all binary numbers from the lowest 0 up to the highest 2(N) - 1 means a sequential generating of all possible configurations of vacant/engaged monomers, which, after proper filtering, results in a full set of possible types of complexes in solution between the ligand and the N-site lattice. The principal advantage of BP-STOCH algorithm is the possibility to incorporate into this cycle any conditions on computation of the concentrations and observed experimental parameters of the complexes in solution, and programmatic access to each monomer of the biopolymer within each binding site of every binding configuration. The latter is equivalent to unlimited extension of the basic reaction scheme and allows to use BP-STOCH algorithm as an alternative to conventional computational approaches.