Re: 8 X 8 Binary Multiplier
Posted: Wed Sep 28, 2011 5:30 am
Square root implimented. To get square root, only the input labeled Root should be a 1. If Rem. is also a 1, then it will display the remainder, i.e. (Input - Root^2).
The circuit should be able to square root a 16 bit number, but for some reason, if the number is greater than 2^14, it doesn't work properly, not sure why?
So the input is limited to a 14bit number.
The implimentation uses the "non-restoring square root algorithm", and all function relating to sqrt is contained within the sub circuit called "Square Root". The inputs to this block are a 16 bit number on A[15..0], and a control bit called Rem. . The output in a 9 bit number on Q[8..0].
If Rem is 0, then the Integer Root is displayed on Q[0..7], while Q8 = 0. If Rem is 1, then the Remainder is displayed on Q[8..0].
The algorithm loops 8 times to find the correct answer, and each pass is handled by a circuit called "Part. Root". There are 8 partial root blocks chained together to make the loop.
If anyone can work out why it doesn't work for 15 and 16bit numbers, that would be helpful. There is a reference to the algorithm that i used here: http://citeseerx.ist.psu.edu/viewdoc/do ... 1&type=pdf
The circuit should be able to square root a 16 bit number, but for some reason, if the number is greater than 2^14, it doesn't work properly, not sure why?
So the input is limited to a 14bit number.
The implimentation uses the "non-restoring square root algorithm", and all function relating to sqrt is contained within the sub circuit called "Square Root". The inputs to this block are a 16 bit number on A[15..0], and a control bit called Rem. . The output in a 9 bit number on Q[8..0].
If Rem is 0, then the Integer Root is displayed on Q[0..7], while Q8 = 0. If Rem is 1, then the Remainder is displayed on Q[8..0].
The algorithm loops 8 times to find the correct answer, and each pass is handled by a circuit called "Part. Root". There are 8 partial root blocks chained together to make the loop.
If anyone can work out why it doesn't work for 15 and 16bit numbers, that would be helpful. There is a reference to the algorithm that i used here: http://citeseerx.ist.psu.edu/viewdoc/do ... 1&type=pdf