So earlier tonight I was trying to understand the Double-Dabble algorithm. It didn't really make sense at first... still doesnt really... but this thing works so far.
It consists of 2 kinds of modules: A "shift" module and a "+3 if >4" module
8 is the carry in of the first shift module.
4 is the carry in of the second shift module.
2 is 3rd and so on...
The "shift" module is actually just subtracting the same number twice from 15 and getting its compliment, essentially multiplying by 2. Then there is some carry logic for future output digits.
The other one kinda explains itself. Add 3 if greater than 4. No carry logic needed apparently.
The logic is flat(2 tall) and with the input wires its only 4 blocks tall. I think it can stack 6 blocks wide but I might expand to 8 for input wire spacing.
I think its something like 36 ticks from 8's input to the output.
Only step to get to BCD now is an analog to binary decoder slapped onto each output.
Edit: Since I dont have MC here at work, I felt like making block diagrams in autocad to help explain the logic.
I should rename Cin and Cout to Shift in and Shift out.
It consists of 2 kinds of modules: A "shift" module and a "+3 if >4" module
8 is the carry in of the first shift module.
4 is the carry in of the second shift module.
2 is 3rd and so on...
The "shift" module is actually just subtracting the same number twice from 15 and getting its compliment, essentially multiplying by 2. Then there is some carry logic for future output digits.
The other one kinda explains itself. Add 3 if greater than 4. No carry logic needed apparently.
The logic is flat(2 tall) and with the input wires its only 4 blocks tall. I think it can stack 6 blocks wide but I might expand to 8 for input wire spacing.
I think its something like 36 ticks from 8's input to the output.
Only step to get to BCD now is an analog to binary decoder slapped onto each output.
Edit: Since I dont have MC here at work, I felt like making block diagrams in autocad to help explain the logic.
I should rename Cin and Cout to Shift in and Shift out.