Binary Encoder

Binary Encoder
Stackable
Yes(64)

Overview

The Binary Encoder allows multiple digital signals to be transmitted through a single Redstone Wire or RedCu Wire by utilizing binary representation of signal strength.

Redstone signal values range from 0 to 15, which corresponds to 4 bits in binary. The Binary Encoder enables the player to control these bits individually, effectively turning a single wire into a 4-channel digital bus.

Each bit represents a separate channel, allowing up to four independent signals to be transmitted simultaneously. The encoded signal can later be converted back into separate outputs using a Binary Decoder.

Operation

The Binary Encoder reads:

All inputs are standard Redstone signals (values from 0 to 15).

The mark lights up when a signal at Pin Mark C is greater than 0.

The output depends on the signal at Pin Mark C:

Binary OR essentially passes each A and B bit pair through an OR Gate. For example:

A 0110 ( 6)
B 1010 (10)
O 1110 (14)

The resulting value is then output as a Redstone signal.

Example

Binary Encoder Example

Consider encoding two independent signals into a single bus. Each channel corresponds to a specific binary value:

These values act as binary filters used to encode signals. A Hexadecimal Indicator is useful for seeing active channels.

In this example, the filter values are provided from Analog Source:

The left encoder receives no input on the bus and a > 0 signal from Pin Mark C:

A 0000 (0)
B 0001 (1)
O 0001 (1)

The right encoder receives the bus signal from the left encoder, but because it receives 0 at Pin Mark C, the signal is not modified and it passes through.

This produces a combined signal that can be decoded later using a Binary Decoder (see example there).

Multiple channels can be activated at once by combining filter values. For example, enabling channels 4 and 2 can be done with a single binary filter with value:

4 (0100) + 2 (0010) = 6 (0110)

Applying this filter, when Pin Mark C receives a > 0 signal:

A 0001 (1)
B 0110 (6)
O 0111 (7)

This activates channels 4 and 2 while preserving existing signals.

Configuration

The pins can be configured to face any side by right-clicking the block.

Pin Mark ABus Input
Pin Mark BBinary Filter
Pin Mark CControl

Crafting

Version Log

VersionDescription
0.3.1Introduced.