Pages: [1]   Go Down
Author Topic: 4 bit adder confusion.  (Read 902 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Full Member
***
Karma: 0
Posts: 184
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Offline Offline
Full Member
***
Karma: 0
Posts: 184
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-neutral
Logged

UK
Offline Offline
Faraday Member
**
Karma: 99
Posts: 4153
Where is your SSCCE?!?!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Code:
8421
0100
Logged

Get 10% off all 4D Systems TFT screens this month: use discount code MAJENKO10

Leeds, UK
Offline Offline
Edison Member
*
Karma: 78
Posts: 1719
Once the magic blue smoke is released, it won't go back in!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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

~Tom~

Pages: [1]   Go Up
Jump to: