Analog Gates

Introduction to Analog Gates

Analog gates differ from Digital gates by producing variable outputs based on variable inputs. Instead of interpreting Redstone signals as strictly on or off, analog gates use the full range of Redstone signal levels, from 0 to 15.

An example of an analog device is the Minecraft Redstone Comparator, which changes its output signal strength based on its mode and the strength of Redstone signals at its inputs. Unlike digital gates, analog devices operate using mathematical equations instead of strict Boolean states.

Analog gates make Redstone calculations simple, as they typically involve basic arithmetic, such as addition or subtraction.

Example of an Analog Gate

Analog Bias

The Analog Bias gate simply adds its input signals together. The equation governing its output (O) based on its inputs (IA and IB) is:

O = IA + IB

However, since Redstone signals are limited to a range of 0 to 15, any output greater than 15 is capped at 15. For example:

Example of an Analog Bias

Analog Subtractor

The Analog Subtractor gate performs subtraction on its input signals. Its equation is:

O = IA - IB

Similar to the Analog Bias gate, the output is capped within the range of 0 to 15. If the result of the subtraction is less than 0, the output is set to 0. For example:

Example of an Analog Subtractor

Redstone Comparator

This is a quick explanation for those who dont know how Minecraft Redstone Comparator works and do not want to read Usage of Redstone Comparator(I do not know why, but here we are).

The Minecraft Redstone Comparator is a built-in analog device that operates in two modes: comparator mode and subtractor mode.

Comparator Mode

In comparator mode, the output signal depends on the strength of the side and back signals:

Subtractor Mode

In subtractor mode, the Redstone Comparator functions like a Parallel Analog Subtractor, with the side inputs as IB and the back input as IA. The output follows the equation:

O = IA - IB

Output values are capped at 0 if the result is negative.

Comparator in comparator and subtractor modes

On the left is Minecraft Redstone Comparator in comparator mode, on the right it is in subtractor mode.

Usage Notes

Analog gates, while seemingly more complex than Digital gates, operate on straightforward mathematical principles. They are useful for creating circuits where variable signal strengths are needed, such as proportional controls or dynamic systems.