1
\$\begingroup\$

I am trying to make an asynchronous adder that holds three bits and adds two to the number. Can someone help? A Google search shows nothing and I'm having a hard time visualizing how to make the circuit.

Edit: This circuit is part of a larger circuit I have to make for a problem. The circuit needs to add two to either an even three-bit number or an odd three-bit number. I have the rest of the problem done except for the adding two part.

(If anyone wonders, the problem says the circuit is supposed to act like a normal down-counter when an input w = 0, then switch to adding two if w = 1.)

Edit 2: I know this is a late edit (and might be illegal), but here is my attempt at the circuit using four flip-flops (I am required to use d flip-flops). IT IS VERY UGLY AND CONVOLUTED, I apologize. :(

The first four count down when w = 0 while the fourth d flip-flop stores the value of the least-bit (0 = even, 1 = odd). When w = 1, the clock to the fourth becomes zero and therefor stores the value of the least bit indefinitely. Ev/odd becomes Q_0, Y_0 then becomes Q_1 and Y_1 becomes Q_2, "adding" one to the two's place and, to my understanding, simulating the addition of two to the number.

Circuit attempt.

I feel this is the simplest way to do it, but I feel I am using more gates than are necessary or that I am miscalculating the clock timing.

\$\endgroup\$
  • 1
    \$\begingroup\$ It's exactly the same as the standard add-one circuit. Think place-value system. Binary two is 010 instead of 001. \$\endgroup\$ – MarkU Nov 16 '14 at 4:20
  • \$\begingroup\$ Where is your truth table? \$\endgroup\$ – Ignacio Vazquez-Abrams Nov 16 '14 at 4:23
  • \$\begingroup\$ @MarkU Sorry for not responding, I've literally spent the past 7 hours on binary logic problems and am having a tough time. I notice that if I use bit Y_1 and Y_0 as Y_2 and Y_1 and Y_2 as Y_0 it appears the same as adding two to the number. Am I understanding this correctly? :( \$\endgroup\$ – Qwurticus Nov 16 '14 at 6:00
  • \$\begingroup\$ Eg : 5 = 0101 --- 2 = 0010 ----- 5 + 2 = 0101 + 0010 . Hope this helps. (4 bits needed else carry gets lost) \$\endgroup\$ – Plutonium smuggler Nov 16 '14 at 6:08
  • \$\begingroup\$ You're on the right track. The even/odd is determined by the least significant bit, you can pass that bit unchanged. And adding one in the 2's place is the same thing as adding 2. \$\endgroup\$ – MarkU Nov 16 '14 at 8:15
1
\$\begingroup\$

Note that when adding 2 to a binary number, the low bit doesn't change. You therefore simplify the problem to pass the low bit, and a 2-bit adder you add one to for the upper bits. Yes, it really is that easy.

By the way, if you're only ever going to add 1 with a adder, then it's generally called a "counter" instead of a "adder".

\$\endgroup\$
  • \$\begingroup\$ I believe that is what my circuit does. The "Ev/odd" d flip-flop save the low bit and keeps using that for the low bit when I am adding one to the upper bits (it isn't used when acting as a down-counter). Unless I totally over-thought my circuit. \$\endgroup\$ – Qwurticus Nov 17 '14 at 0:33
  • \$\begingroup\$ Right. x+2 is the same as ((x>>1)+1)<<1 where >> and << indicate a shift left / shift right operation. So you just construct a normal counter circuit out of your 2 most significant bits, and then append the least significant bit back onto the result. \$\endgroup\$ – Ponkadoodle Nov 17 '14 at 7:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.