Full Adder

ScottWang

Joined Aug 23, 2012
7,409
I'm not sure what you mean by "vibration"?

...
...
http://www.doctronics.co.uk/4008.htm
>I'm not sure what you mean by "vibration"?

Maybe I'm not precisely to describe the state that I want.
Because a floating pin is easy to generate a square wave, but the wave is unexpected, the frequency is in a astable state, and also easy effected by hands or some other signals, normally we called "Oscillation".

>Actually, the first adder doesn't even need to be a full-adder.
>The first stage could just be what's called a half-adder.
>http://ustudy.in/sites/default/files/ALU_half_adder.gif
>It's less than half the size, and works precisely the same as a full adder with Cin constantly set to LOW, or 0.
You are right, the first stage can be use half adder.

>Also, just to be sure the OP knows, there are ICs that contain full adders all-in-one,
>like the 4008 CMOS IC. http://www.doctronics.co.uk/4008.htm
Maybe aj88 just want to do the pratice, so he choose the logic gates.
 
Last edited:

Austin Clark

Joined Dec 28, 2011
412
Maybe I'm not precisely to describe the state that I want.
Because a floating pin is easy to generate a square wave, but the wave is unexpected, the frequency is in a astable state, and also easy effected by hands or some other signals, normally we called "Oscillation".

Maybe aj88 just want to do the pratice, so he choose the logic gates.
Technically, floating pins pick up all sorts of noise (not necessarily oscillation, but yeah), this noise in itself isn't a square wave, but internally the IC has schmitt triggers, so effectively, yes, you'll get random-ish logic inputs.

And yeah, I like it when people do things like this for practice. I've done the exact same thing here, but I went even further with it. I made a Full-adder with BJTs (transistors) one time, which was fun.
 

ScottWang

Joined Aug 23, 2012
7,409
Technically, floating pins pick up all sorts of noise (not necessarily oscillation, but yeah), this noise in itself isn't a square wave, but internally the IC has schmitt triggers, so effectively, yes, you'll get random-ish logic inputs.

And yeah, I like it when people do things like this for practice. I've done the exact same thing here, but I went even further with it. I made a Full-adder with BJTs (transistors) one time, which was fun.
Why I used "vibration", because that I saw some people used vibrator to describe the circuits to generate oscillation, at most time, we always used oscillation to describe square wave and sinewave, but the name "oscillation", we still used it to describe the unexpected wave as noise.

We always said floating pins pick up the noise may cause oscillation, the noise could be from hands touch or approach, environment(some people will say from airs) as 60Hz signal in Taiwan, sometimes is the square wave in the breadboard, or on the digital circuits.

>I made a Full-adder with BJTs (transistors) one time, which was fun.

Play more deeper and then you will get more deeper knowledges than others.

Home made CPU used logic IC, the schematics included, somebody may call him is going crazy, but I think he enjoyed it.
http://www.homebrewcpu.com/

You can try like this one, maybe I will do it as a demo board.
NE555 whole circuit used transistors.
http://www.flickr.com/photos/a4x4kiwi/5389571259/
 

Thread Starter

aj88

Joined Sep 17, 2012
27
Is there a way to simplify it to the bare minimum amount of ics that I have or not? If not, thanks for all the posts guys!
 

ScottWang

Joined Aug 23, 2012
7,409
Is there a way to simplify it to the bare minimum amount of ics that I have or not? If not, thanks for all the posts guys!
You can use CD4085 or 74HC51 to replace 2 input AND Gate(x2) + OR Gate (AND + OR Gate).
You can thinking over what to do, the way is similar with put two gates together, and became one gate.

There are two ways to do:
1. CD4070 + CD4085
2. CD4070 + 74HC51

CD4085.
http://www.datasheetcatalog.org/datasheets/90/109346_DS.pdf

74HC51
http://www.datasheetcatalog.org/datasheets/70/491737_DS.pdf
 

ScottWang

Joined Aug 23, 2012
7,409
How would you add another bit to the adder?
If you want to expanding one bit into two bits, you just add another full adder, they are parallel bits, and they will become two bits full adder,

And if you don't use the carry in, it still need to connecting to GND.
 

Thread Starter

aj88

Joined Sep 17, 2012
27
When I flick any 3 switches, it displays correctly (011). But when all 4 switches are on, it still displays 011. Is that supposed to happen?
 

WBahn

Joined Mar 31, 2012
30,088
Is there a way to simplify it to the bare minimum amount of ics that I have or not? If not, thanks for all the posts guys!
I addressed that back in Post #14

Now, this is assuming that you want to construct the adder from basic gates, as opposed to buying a 4-bit adder IC.

If you want to truly use basic gates, then you can construct a 1-bit full adder with 3 quad-NAND gate ICs, having one gate left over. But I would recommend building an XOR from four NAND gates once, to experience having done it, and then from that point on use XOR gates. The same thing here. Build a Full Adder once from simpler gates and then build a larger adder using Full Adders. If the smallest adder IC you can get is a 4-bit adder, then build a four-bit adder from simpler gates and then use a 4-bitter as your building block for the next higher level.
 

Austin Clark

Joined Dec 28, 2011
412
Is there a way to simplify it to the bare minimum amount of ics that I have or not? If not, thanks for all the posts guys!
first thing you could do to simplify your circuit would be to use an inverter at the end of NAND gates to get AND gates, and at the end of NOR gates to get OR gates. I noticed in your schematic that you were making inverters out of NAND and NOR gates, which is fine, but more complicated than it has to be.

EDIT: OH, and to add more bits, simply attached the CARRY OUT of the last bit in your adder to the CARRY IN on the succeeding bit. Also, just to remind you, the first bit can always be a half-adder, because there's not going to be a need for a CARRY IN, because nothing's leading in to it. There is a case when you'd want to have a carry in on your first bit, and it has to do with something called "2's compliment", but don't worry about that for now. :)
 
Last edited:

WBahn

Joined Mar 31, 2012
30,088
If you have two AND gates that feed into an OR gate, that is functionally idendical to two NAND gates feeding into a third NAND gate. It is a direct application of DeMorgan's Theorem.

Y = (AB) + (CD) = [(AB)'(CD)']'
 

Austin Clark

Joined Dec 28, 2011
412
If you have two AND gates that feed into an OR gate, that is functionally idendical to two NAND gates feeding into a third NAND gate. It is a direct application of DeMorgan's Theorem.

Y = (AB) + (CD) = [(AB)'(CD)']'
Ah, that is a helpful thing to note, nice catch!
I'll add to what you said, though, because that same concept can be applied in a lot more places than that.
Basically, if you invert all inputs and outputs, and switch the gate from OR to AND and vice-versa, you'll have a logically identical gate.
 

Austin Clark

Joined Dec 28, 2011
412
I gave up on this until I get a 4008 ic. But, I have made another circuit that requires less gates: Would it work or does it need the Or gate to have the Cout?
What you've made is a half-adder :)
That second NAND gate, with the inputs connected together, could be replaced with an inverter, though.

This will work, the output of the XOR is the SUM and the other output is the carry-out. The only difference between your new circuit and your old one is that you'll have no carry-in input, which is fine for the first bit in your adder.
 
Top