0

I have read and I understand how the full adder works (or atleast I think I do :D). It combines two half adders and either one of them can have a carry over, hence the OR gate. But why do we need this OR gate in practice? In theory, I get it. But why not just string the to carry over signals together and have no OR gate? I can understand that it is not desirable to make a piece of the circuit high, when it is not when other circuitry might be connected to it. But consider that the full adder is an isolated circuit on its own, why not?

There must be a negative effect , otherwise the OR gate would not be in the full adder circuit for sure. But I think it is not a pure logical necessity, hence I think it has to do with the nature of negative polarized voltage on transistors of some sort, but I am not sure, hence this question.

To make sure, the circuits I refer to are shown and explained here.

And here is a picture of the full adder where the OR gate is shown (it is the only gate in the picture).

enter image description here

Mike de Klerk
  • 541
  • 1
  • 4
  • 14
  • 1
    Without any further analyzing the internals of the half adder blocks: If you "just string two outputs together" and both don't have the same signal you have a short. (If they always had the same signal you could just ignore one of them). – Curd Dec 04 '18 at 10:47
  • Why do you need OR gates at all? Why not just string two lines together? This question has been asked (and answered) before here: https://electronics.stackexchange.com/questions/247332/or-gate-vs-connecting-two-wires – Curd Dec 04 '18 at 10:55
  • @Curd I searched but I have not found it, if you have a URL that would be great. About the short, doesn't a transistor have protection for reversed voltage (up to some level of course), or is that only is MOSFET kind of transistors? – Mike de Klerk Dec 04 '18 at 10:56
  • @MikedeKlerk most logic devices produce either a "hard" logic-zero or a "hard" logic-one. Connecting both together results in excessive current flow and can burn chips. – Andy aka Dec 04 '18 at 11:09

3 Answers3

6

You're making a couple of assumptions:

  • Multiple outputs can be connected directly together
  • When any such output is "high", then the wire is "high".

This is known as "wired-OR", and indeed, such circuits can be constructed. They rely on special features of the circuits of the previous outputs to create the logic function you're looking for.

However, a wired-OR is still an OR, so when we talk about the abstract logic function, we show the gate explicitly.

Dave Tweed
  • 168,369
  • 17
  • 228
  • 393
0

If your Carryout bits looked like this, you could

schematic

simulate this circuit – Schematic created using CircuitLab

analogsystemsrf
  • 33,703
  • 2
  • 18
  • 46
0

You are adding three 1-bit values. The output bit needs to be set if an odd number of inputs is set, the carry out needs to be set if more than one input is set.

The half-adders XOR the inputs to generate the outputs, and AND the inputs to generate carry out.

So the output is (a XOR b) XOR c, which is equivalent to a XOR b XOR c ("an odd number").

The carry out is set if (a AND b) OR ((a XOR b) AND c), which means "either the first two inputs, or one of the first two and the last one".

This is equivalent to (a AND b) OR ((a OR b) AND c), which would be "either the first two inputs, or at least one of the first two and the last one", which sounds a bit more intuitive, but as we already have (a XOR b) as output from the first adder, and the second adder feeds that into an AND gate together with c to generate its carry out, taking that ((a XOR b) AND c) and feeding it into an OR together with the (a AND b) from the carry out of the first adder gives us the desired result with just one extra gate.

Simon Richter
  • 12,031
  • 1
  • 23
  • 49