# Splitters

When you work with multi-bit values, you will often want to route different bits in different directions. The Wiring library's splitter tool () allows you to accomplish this.

For example, suppose we want a circuit that computes the bitwise AND of the two nibbles of its eight-bit input (the upper four bits and the lower four bits). We will have an eight-bit value coming from the input pin, and we want to split that into two four-bit values. In the below circuit, we have used a splitter to accomplish this: The 8-bit input comes into the splitter, which divides the 8 bits into two 4-bit values, which are then fed into the AND gate and from there to the output.

In this example, the splitter splits an incoming value into multiple outgoing values. But splitters can also work the other way: It can combine multiple values into a single value. In fact, they are non-directional: They can send values one way at one time and another way later, and they can even do both at the same time, as in the below example where a value travels eastward through the two splitters, then is routed back westward through them again, and then back eastward where it finally reaches its output.

The key to understanding splitters is their attributes. In the following, the term Split End refers to one of the multiple wires on one side, while the term data bus refers to the single wire on the other side.

- The Facing attribute tells where the split ends should be relative to the Fan Out.

  Data bus |  | Split End

- The Fan Out attribute specifies how many split ends there are.
- The Bit Width In attribute specifies the bit width of the combined end.
- The Appearence defines how the split end is drawn relative to its data bus.

  Right | Left

  Center | Legacy

- The Spacing specifies the space between the split end.
- The Bit x attributes define which separate split end corresponds to which bit x of the data bus. It is modifiable and allows you to organize the order of split end by hand. If several bits correspond to the same split end (first example above), then the relative order will be the same as in the bus. Logisim distributors cannot have a bus bit linked to more than one split end.

Note that any change to the Fan Out or Bit Width In attributes will reset all Bit x attributes so that they will distribute the bits of the combined value as evenly as possible among the split ends.

Next: Wire colors.