diff --git a/cst337/img/fig2lec10.png b/cst337/img/fig2lec10.png new file mode 100644 index 0000000..ed0fc00 Binary files /dev/null and b/cst337/img/fig2lec10.png differ diff --git a/cst337/lec/lec10.md b/cst337/lec/lec10.md index 3c59b3d..ddcefca 100644 --- a/cst337/lec/lec10.md +++ b/cst337/lec/lec10.md @@ -30,3 +30,20 @@ The carry bit will propagate along the operation now if we chain these together, ![fig1](../img/fig1lec10.png) +With this we can start chaining together multiple Full-adders we can start adding multiple bits at the same time since the carry now propagates along the chain. + +## Ripple Adders + +An N-bit adder is really just made up of Full adders chained together. +Each adder is chained to the next by the carry-out line which then acts as the next adder's carry-in line. +If we have say a 4-bit ripple adder, then each bit in the bit strings will go to a different adder. +For now the initial carry in bit will be fed a 0 everytime. + +![fig2](../img/fig2lec10.png) + +Here we see that our 4-bit input A & B have the values `1111` & `0000` respectively. +The 0th bit goes to Adder0, the 1th goes to Adder1, and so on. +You should have also noticed that each one also takes a carry-in, which for now is 0 but it does mean we have to let the comutation happen one adder at a time. +None of the sequential adders can do anything if the previous have done anything yet either. +At the end of it all we get some bit results, and a carry-out. +We can then simply reassemble the results back into one bit-string to assemble our final result.