Go Down

Topic: 4 bit adder confusion. (Read 1 time) previous topic - next topic

adilmalik

I built a 4-bit Adder Circuit using the 4008 Adder chip (http://www.doctronics.co.uk/4008.htm). The circuit works fine but there is one problem. I thought it would be able to add any 4 bit numbers or smaller, but my circuit can only add 4 bit numbers! It cant seem to add two 3-bit numbers, or 2-bit numbers etc. Why is this?

majenko

Because it's a 4 bit adder, not a 3 or 2 bit adder?

Just expand your 3 bit numbers out to 4 bit with a 0 as the MSB.

adilmalik

Hmmm but for example if i want to input a "4", in binary it would be "100", but i have to input 4 bits right? that means adding a "0" to the "100"? that makes it "1000" and that is "8" in decimal  :|

majenko

No, you add the 0 to the MSB, not the LSB:

Code: [Select]

8421
0100

Tom Carpenter

Other end. You would add the 0 as the MSB (Most Significant Bit), so 4 (100) would become 4 (0100).
~Tom~

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy