Analog Subtractor

Analog Subtractor
Stackable
Yes(64)

Overview

The Analog Subtractor is an Analog Gate that functions similarly to the Minecraft Redstone Comparator in subtractor mode. It subtracts the secondary Redstone signal from the primary Redstone signal and outputs the result.

The equation for the Output Redstone signal (O) based on the primary input signal (IA) and the secondary input signal (IB) is:

O = IA - IB

If the result is negative, the output is set to 0, as Redstone operates only on signal levels from 0 to 15.

Configuration

The inputs can be configured to face any direction by right-clicking the block.

Parallel Analog Memory
Stackable
Yes(64)

Parallel Analog Subtractor

The Analog Subtractor also has a Parallel Gate version. In this version, either the primary input or the secondary input can face the Back of the block. This can be configured by right-clicking the gate. The output logic depends on the configuration:

Crafting

Normal Analog Subtractor

Parallel Analog Subtractor

Version Log

VersionDescription
0.0.0Introduced. On update from anywhere reads redstone signal only and updates neighbours when output changes.
0.0.1Unlike in the previous version, block first reads the blockstate on the input, and if suitable, uses blockstate value, if not, reads redstone signal.
0.1.1Changed registry name from analog_subtractor to floor_analog_subtractor and paralel_analog_subtractor to floor_parallel_analog_subtractor. Replaced bottom texture from being that on the top to Smooth Stone Block.
0.2.0Changed registry name from floor_analog_subtractor to normal_analog_subtractor and floor_parallel_analog_subtractor to parallel_analog_subtractor. Can be placed on walls and ceiling. Updates the block on the output when output changes instead of updating all neighbours. Output data is stored on Block Entity.