Difference between the following two very basic circuits

There is no functional difference in reality. However, your simulation software is stupid and needs to do calculations, so you need to tell it which node you want to represent zero and will become the reference to which every other node is measured (remember that voltage is a potential DIFFERENCE).

The circuit with a GND connection has designated that node as zero volts, he node with which all other nodes are measured with respect to.

Note that physically making that GND connection to something else in reality doesn't make your circuit operate any differently, but does make it so your circuit doesn't "float" if you are using a battery source or some other isolated source. It anchors your circuit to a known potential and not doing so can become an issue for things like noise, shielding, EMI, and safety (arcing for high voltage things).

Here, as in most electronics, "Ground" simply marks the point in the circuit that we want to call "Zero Volts", and use as a reference when measuring voltages elsewhere in the circuit. It does not usually imply a connection to the earth - we can talk about Ground in portable equipment, or in battery-powered circuits on a plastic breadboard.

The Ground symbol has no effect on the operation of the circuit, but is usually required by circuit simulator programs so that they know what point to use as a reference when calculating voltages elsewhere.

In AC power wiring and some radio antenna systems "Ground" (particularly the green "Safety Ground") does indicate an actual connection to the earth.

There is no any difference between these two circuits in this case.

But the position of ground has significant role in the circuits. The ground in a electrical circuit is the node where we have our "zero volts".

Pre-Information: A battery is something that maintains a certain potential difference across its terminals depending upon its rated capacity. A 1.5V battery keeps its +ve end at 1.5V higher potential than its -ve end. If I have 0V at its -ve end, I have 1.5V at its positive end. If I have 10V at its -ve end, I have 11.5V at its +ve end and so on. Notice how the +ve end is always higher than -ve end.

Keeping this in mind consider two batteries connected to each others as shown;


simulate this circuit – Schematic created using CircuitLab

In first figure, the ground is connected to -ve terminal of 1V battery and +ve terminal of 2V battery.Since we refer to ground as our 0V, the -ve end of V1 and +ve end of V2 is 0V. So, you get the +ve end of V1 to be 1V greater than -ve end of V1. So, you have 1V at node A. In case of V2, the +ve end is at 0V. So the -ve side must be 2V lower than the +ve end. So, you get -2V at node B.

In case of second figure, we have the -ve side of V2 grounded(0 volts). So the +ve side of V2 is 2V higher than the -ve side. Meaning 2V at node C. Also, the -ve end of V1 is connected to +ve end of V2(which is at 2V). Since V1 is 1V, it should maintain its +ve end at 1V higher potential than -ve end. This implies we have 3V at node A.

This is how you can see the difference between your two circuits. The ground and -ve end of battery may or may not be at same node. The ground can be placed at +ve end of battery as well. But this gives -ve voltage at your -ve end.

Hope this helps!!