There are a few functions of the redstone comparator. The reason I always find myself turning to comparators is because they can identify if a storage block is full or not.
Here are all the blocks in the 1.16 Bedrock version that a redstone comparator can receive a pulse from. (Pictured from left to right: Barrel, Furnace, Blast Furnace, Smoker, Brewing Stand, Hopper, Hopper in a Minecart, Dispenser, Dropper, Chest, Chest in a Minecart, Cake, Cauldron, End Portal Frame, Sandstone block with Item Frame, Shulker Box, Lectern, Respawn Anchor, Beehive, and Composter). The comparator will check the block it is connected to and emit a pulse when the storage item has filled up any inventory slots. The pulse will be stronger if the storage item has more inventory slots filled up.
This furnace has been filled with coal and now emits power to the redstone lamp.
The item frame works a bit differently than storage containers. The comparator will check the position of the item frame and emit a pulse accordingly.
Here the item frame is at its regular state and the door the comparator is outputting to is closed. Once you spin the item frame a few times, the door will open as the comparator’s signal strength will reach the door.
As you can see the torch has been moved to the bottom right orientation and the door has opened. An item frame has eight different configurations, the max signal strength an item frame can output is eight.
Comparators will emit a pulse equal to the strength of its input. The redstone lamp is placed fifteen blocks away.
In this picture, the redstone repeater inputs into the comparator. Repeaters will always repeat the signal strength back to its full capacity which is fifteen. The redstone comparator will emit a signal strength of fifteen in this case.
When the repeater is swapped out for a regular redstone dust, the comparator will check the strength of its input, in this case thirteen, and output thirteen, which will not reach the lamp. You can also have a comparator subtract the strength of any input to its side. When you right click on a redstone comparator the torch at its base will light up, this indicates that it is in subtraction mode.
It will still function normally with an input and output, but if you line another pulse into its side, it will identify the strength of its side input and subtract it from its base input.
The base input from the redstone torch and repeater to the right is fifteen. The side input has a strength of fourteen, this means that the comparator will only output a signal strength of one, which can power the redstone lamp. If you were to place the lamp an extra block away, the signal would not be strong enough to power it.
This comes with its own unique applications. You can make a comparator clock with one comparator, three redstone dust, and an input. This comparator takes the input value of fifteen and outputs fifteen.
Once its output travels to its side input it subtracts thirteen from the strength of the comparator. This means it will only output two which cannot reach its side input. So this is a clock that turns itself on and off with the base input.
ncG1vNJzZmivmaC2b7%2FPqKmtq5uasqWtjZympmednrumr9Gana1nopqxtMDOp5xmm5%2BivaK%2BwK2mqw%3D%3D