Can a voltage comparator be constructed from NPN BPJ transistors and resisitors alone?
I took the story below from my answer to a similar curious question and edited it a bit...
1. Base-emitter input. The only way we can control a transistor is by applying input voltage (about several hundred millivolts) to its base-emitter junction. For some reason, most frequently, we present this voltage as a small difference between two relatively high single-ended (referenced to ground) voltages. Thus the base-emitter junction is floating and we have a few ways to control the transistor.
To investigate them in the laboratory, my students mount a universal circuit setup - Fig. 1, where the two input voltages are &quot;produced&quot; by 1 k potentiometers… and the collector current is visualized by an LED. Moving the potentiometer sliders, they have the feeling that the base and emitter (voltages) &quot;move&quot;  up and down.

Fig. 1. A set-up for investigating various transistor stages on the blackboard (Vcc = 12 V). Voltages are visualized by bars (in red) with proportional height; current paths are visualized by loops (divider currents in green, base current in blue and collector current in violet) with proportional thickness.
I suggest you mount the circuit on a prototyping board - Fig. 2, and reproduce the next experiments. It is preferable to use (geometrically and electrically) linear potentiometers. If you have two more multimeters (voltmeters) besides V1 and V2, you can connect them in parallel to Rc and to the output OUT (Vc). Of course, you can insert an ammeter(s) too.

Fig. 2. A set-up for investigating various transistor stages on the prototyping board
2. Base input. First, you can set (by the help of the potentiometer P2) constant voltage Ve at the emitter and then vary (by the help of the potentiometer P1) the base voltage Vb. Only be careful to keep Vb with a few hundred millivolts above Ve. You will see that when increasing V1, the LED gradually begins to glow (Ic increases)... VRc increases… but Vout decreases. The name of this arrangement is &quot;common-emitter stage&quot;.
Maybe you notice that Ve slightly varies in the same direction with Vb because the emitter current changes and P2 is not a perfect voltage source (its Thevenin's resistance is not zero). Here it is undesired effect but later we will use it. To make Ve &quot;stiff&quot; enough, connect a big (&gt; 1000 microF) &quot;bypass capacitor&quot; in parallel to P2 output (between the emitter and ground)... and observe the result when quickly wiggle P1 slider. As they say, the emitter is &quot;AC grounded&quot;.
3. Emitter input. But with the same success, you can set (now by the help of the potentiometer P1) constant voltage Vb at the base and then vary (by the help of the potentiometer P2) the emitter voltage Ve. Now be careful to keep Ve with a few hundred millivolts below Vb. Now you will see that when increasing V2, the LED gradually begins to glow dimmer (Ic decreases)... VRc decreases… but Vout increases. The name of this arrangement is &quot;common-base stage&quot;.
Here you may notice that Vb slightly varies in the same direction with Ve because the base-emitter junction conveys Ve variations... and the emitter &quot;pulls down&quot; the base through the base-emitter junction. As above, to make Vb &quot;stiff&quot; enough, connect a big &quot;bypass capacitor&quot; in parallel to P1 output (between the base and ground)... and observe the result. Now the base is &quot;AC grounded&quot;.
4. Both base and emitter input. If you are curious enough, continue with these exciting experiments by varying both Vb and Ve. First set such a difference Vb - Ve that the LED glows with a dim light (around 650 mV). Then grab the potentiometer sliders with both hands and start moving them simultaneously:
...in the same direction, with the same rate. Very interesting - both voltages simultaneously change but their difference Vb - Ve, Ic, VRc and Vout do not change. They name this &quot;common mode&quot; and, as a rule, introduce it when explaining op-amps. But you met it right now, at transistor circuits. Indeed, you could get to know it even from the bridge circuits (the so-called &quot;balanced bridge&quot;).
...in the opposite directions, with the same rate. Now both voltages simultaneously change and their difference Vb - Ve, Ic, VRc and Vout vigorously change. They name this &quot;differential mode&quot; and also introduce it when explaining op-amps but you could meet it when investigating bridge circuits (&quot;unbalanced bridge&quot;). This circuit is the prototype of the OP's transistor differential stage (aka &quot;differential pair&quot; or &quot;long-tailed pair&quot;).
It is interesting that, in the circuits above, when Vb - Ve &gt; 0.7 V, the base-emitter junction practically connects (like a bridge) the two input voltage sources that can cause interesting effects. If Vb - Ve &lt;= 0, the base-emitter junction is cut off and there is no any connection between them.
5. Both base and buffered emitter input. The problem of the simple 1-transistor comparator above is that the big emitter current flows through the input voltage source connected to the emitter. We can solve this problem by connecting (another) emitter follower between the input source and emitter... and so we get the famous circuit of a 2-transistor differential amplifier (comparator)...

I hope my story would be useful to you not only with its content but also with the way circuit ideas are presented. With it I wanted to show that circuitry can be entertaining and fascinating... and not just a boring craft...