You can use cascaded full adders to add any two binary numbers together. Is there a circuit for when I only want to add 1 (incrementing the value)? Is there a similar circuit for subtracting (i.e. adding 0b1111 1110)? I'm working with 8 bit numbers, but this applies for all word lengths.
|
|
Let's see. In a simple ripple carry adder, sum,carry-out = a + b + carry-in
Now if we want to compute sum,carry-out = a + 0 + 1, set b[] = all 0 and simplify:
which is simpler. Subtraction by 1 can be similarly simplified (exercise for reader: what is b[] and carry-in in that case?) Happy hacking! |
|||
|
|
|
If you're talking about discrete logic, like 7400 series logic, then the chip you're looking for is called a counter. Two 74191 (4-bit up/down synchronous counter) chips cascaded will give you what you want, and there are other chips that do a similar function. If you want the most compact way to add '1', then you could use half-adders for each bit instead of full adders. Not too sure about subtraction though. |
|||||||||||||||
|
|
What you are looking for is a edge triggered T-triggers. Input = output of previous stage AND count clock. Here is schematics for transistor-based T-trigger: |
|||
|
|
