Iterative method for digital channel capacity