Ambiguous results when the direction of the calculation is changed while applying Kirchhoff's Loop Law I have to find the resistance R in the following circuit:

Now, if we take the direction of calculation along the direction of the current in the circuit (that is counter clockwise), this should be resulting equation (by Kirchhoff's Loop Law):
$$100+8R-12+(3×8)=0$$
$$8R=-112$$
$$\therefore R = -14 \Omega$$

Now, if I take the direction of calculation to be clockwise then following should be the equation obtained using Kirchhoff's Loop Law.
$$(3×8)+12+8R-100=0$$
$$8R = 64$$
$$\therefore R = 8 \Omega$$
Why am I getting two different answers? Where am I going wrong?
Note: There's no internal resistance in the DC supply.
 A: Your second calculation is correct. To demonstrate what is wrong in the first one, let's apply Kirchhoff's Loop Law in the counter-clockwise direction.


*

*There is a voltage of +100V between the positive DC end and the negative DC end $$\Rightarrow V_1=100V$$

*The current direction is given. In the direction of current, voltage "falls off", hence this voltage has a minus sign $$\Rightarrow V_2=-8 A \times R$$

*The battery is oppositely oriented to the power supply, so it has a minus sign $$\Rightarrow V_3=-12V$$

*The last resistor works the same as in 2. The current is the same by Kirchhoff's flux law. $$\Rightarrow V_4=-3 \Omega \times 8A$$


Hence, summing up and using Kirchhoff's Law:
$$V_1 + V_2 + V_3 + V_4 = 0$$
$$\Rightarrow 100V - 8A \times R - 12V - 3\Omega \times 8A = 0$$
$$R = \frac{\Rightarrow 100V - 12V - 3\Omega \times 8A}{8A} = 8\Omega $$
...exactly as in the second calculation.
Lesson: be careful about minus signs :)
A: The following approach may be useful: For a circuit consisting of several sources of emf and resistors, assume a given direction for the current. For the case of one battery and one resistor the most obvious choice is too assume that the current is flowing from the +ve terminal through the resistor and back to the battery via the -ve terminal. After that adopt the following arrow notation: Draw an arrow from the -ve terminal of the battery to the +ve terminal of "size" E (the emf of the battery), and for the resistor draw an arrow of "size" I $\times$ R (i.e. the p.d. across the resistor) in the opposite direction of the current flow through the resistor. When you apply Kirchhoff's Voltage Law's go around a loop and give a +ve sign when you move in the same direction as the arrow and a -ve sign if you go in the opposite direction. Kirchhoff's Voltage Law will give this sum as zero. The advantage of this is, if you have a complicated circuit consisting of several sources it may not be obvious which direction the current should be. All you have to do is to assume some direction. If you happened to guess the current flow in the correct direction you will find the current coming out as a positive number, while if you guessed the wrong direction, the current will come out as a negative number.
For the attached figure: In the first case you find I = + 0.5 A, which is expected. In the second case you guessed the direction of the current wrong, but the answer, -0.5 A, shows that it is really in the opposite direction you assumed (and agrees with the first case).
