RedstoneChips

comparator

A digital comparator circuit that compares two input numbers of any size and outputs the result.

There are 2 modes of operation:

The 2nd input number can be a constant number set in the sign arguments. In that case the 1st number is the value of all the input pins and the 2nd number is the argument constant. When the constant argument is not used, the 1st half of input bits are treated as the 1st number and the 2nd half of input bits are treated as the 2nd number.

When the last sign argument is clockpin the 1st input of the comparator is the clock input. In this mode the chip outputs will update only after the clock input is triggered.

on Wikipedia

source code


I/O setup

Sign text

  1. comparator
  2. [constant] (optional)
  3. [clockpin] (optional)

Version history: Added to BasicCircuits 0.77

Fork me on GitHub