Before starting look at a couple of implentations of the divide-by-3 counter.
Take out some drawing paper, but first think of two numbers between 0 and 10100-1 and add them.
- You have been using a O(n) algorithm to add.
- Divide-and-conquer is difficult because of the carries.
- Define some progate Pm:i and generate Gm:i functions.
- Generate the final carry in O(log n) time and O(n) space using a tree.
- Generate the all the bits in O(log n) time but with O(n log n) space.
- Take a look at a few references
- 74F182 Carry Lookahead Generator
- 74F171 Arithmetic Logic Unit