I eventually want to build an Nth root extractor, and this is one of the hoops I need to jump through to get there, using some algorithm I found online. I have a multiplier that is reasonably compact, that works through shifting bits to generate 8 individual partial products all at one time, and then pairing them off and adding them to get 4 partial products, then pairing those off and adding to get 2, then adding those for the final answer. The whole thing works reasonably fast, and is compact (albeit ugly because it takes on this odd triangular shape, because many of the adders for less significant bits are unnecessary and were thus removed.
I know how to do division with sequential logic and using registers, simply looping back the result of subtraction until you get a negative result, and counting the number of times that occurred minus 1.
I was wondering if I could use the same method I used for my multiplier, but reversed. I would shift the bits towards the LSB and then subtract them all. Would this work?
I dont want a divider that can only handle even numbers, though I do not much care about anything other than integers (though getting a remainder would be helpful, it is not neccesary really.) And it can't use registers and a feedback loop and counter, because that requires some sort of input to start the machine which I do not want, I just want to be able to change the values on the input and walk over to the output and read them.
I eventually want to build an Nth root extractor, and this is one of the hoops I need to jump through to get there, using some algorithm I found online. I have a multiplier that is reasonably compact, that works through shifting bits to generate 8 individual partial products all at one time, and then pairing them off and adding them to get 4 partial products, then pairing those off and adding to get 2, then adding those for the final answer. The whole thing works reasonably fast, and is compact (albeit ugly because it takes on this odd triangular shape, because many of the adders for less significant bits are unnecessary and were thus removed.
I know how to do division with sequential logic and using registers, simply looping back the result of subtraction until you get a negative result, and counting the number of times that occurred minus 1.
I was wondering if I could use the same method I used for my multiplier, but reversed. I would shift the bits towards the LSB and then subtract them all. Would this work?
I dont want a divider that can only handle even numbers, though I do not much care about anything other than integers (though getting a remainder would be helpful, it is not neccesary really.) And it can't use registers and a feedback loop and counter, because that requires some sort of input to start the machine which I do not want, I just want to be able to change the values on the input and walk over to the output and read them.