Set a splitter and see where each bit goes
| End | Bits | Value |
|---|---|---|
| End 0 | 0-3 | 0010 (0x2) |
| End 1 | 4-7 | 0001 (0x1) |
Per-bit mapping (bit 0 is the least significant bit)
| Bit | Goes to | Bit value |
|---|---|---|
| 0 | ||
| 1 | ||
| 0 | ||
| 0 | ||
| 1 | ||
| 0 | ||
| 0 | ||
| 0 |
Attributes Logisim stores for this splitter
fanout="2" incoming="8" bit0="0" bit1="0" bit2="0" bit3="0" bit4="1" bit5="1" bit6="1" bit7="1"
Splitters work in both directions: the same mapping joins the ends back into one bus. Changing Fan Out or Bit Width In in Logisim resets the mapping, as it does here. The drawing and the demo file use the default facing (east) and spacing 1.
What a splitter does
A splitter has one combined end and several fan-out ends. A value on the combined end is cut into groups of bits, one group per end. The component is bidirectional: the same mapping carries values from the ends back into the combined end.
Describe this circuit
Components: Input pin D; Splitter 1; Output pin Lo; Output pin Hi.
- Input pin D connects to Splitter 1 (net D), 8 bits wide.
- Splitter 1 connects to Output pin Lo (net e0, Lo), 4 bits wide.
- Splitter 1 connects to Output pin Hi (net e1, Hi), 4 bits wide.
| # | D | Lo | Hi |
|---|---|---|---|
| 0x00 | 0x0 | 0x0 | |
| 0x01 | 0x1 | 0x0 | |
| 0x0F | 0xF | 0x0 | |
| 0x10 | 0x0 | 0x1 | |
| 0x12 | 0x2 | 0x1 | |
| 0x1A | 0xA | 0x1 |
Download circ-splitter-8-to-4-4.circ.
Set it up in three attributes
- Bit Width In: the width of the bus on the combined end.
- Fan Out: the number of ends.
- Bit 0 to Bit n-1: for each bit, which output it goes to, or None. Leave the default for an even split.
| Attribute | What it does |
|---|---|
| Facing | Which way the ends point. |
| Fan Out | Number of ends, 1 to 64. |
| Bit Width In | Width of the combined end, 1 to 64. |
| Appearance | Left-handed, Right-handed, Centered or Legacy: where the ends sit relative to the combined end. |
| Spacing | Distance between ends. Only changes the drawing. |
| Bit x | The end that bit x goes to (Output n), or None. Distribute Ascending and Distribute Descending are menu shortcuts for the mapping. |
The attribute and option names are the ones in the 5.0.0 string table (F73). Ours are the explanations.
Which bit goes to which end
Bit 0 is the least significant bit. With the default mapping, end 0 carries the lowest bits.
Pick out one bit
Fan Out equal to Bit Width In gives one bit per end, and end i carries bit i.
Describe this circuit
Components: Input pin D; Splitter 1; Output pin B0; Output pin B1; Output pin B2; Output pin B3; Output pin B4; Output pin B5; Output pin B6; Output pin B7.
- Input pin D connects to Splitter 1 (net D), 8 bits wide.
- Splitter 1 connects to Output pin B0 (net e0, B0).
- Splitter 1 connects to Output pin B1 (net e1, B1).
- Splitter 1 connects to Output pin B2 (net e2, B2).
- Splitter 1 connects to Output pin B3 (net e3, B3).
- Splitter 1 connects to Output pin B4 (net e4, B4).
- Splitter 1 connects to Output pin B5 (net e5, B5).
- Splitter 1 connects to Output pin B6 (net e6, B6).
- Splitter 1 connects to Output pin B7 (net e7, B7).
Join wires into a bus (the opposite of a splitter)
Wire single bits into the ends and take the bus from the combined end. The ends’ order is the bit order.
Describe this circuit
Components: Splitter 1; Input pin I0; Input pin I1; Input pin I2; Input pin I3; Output pin Q.
- Splitter 1 connects to Output pin Q (net Q), 4 bits wide.
- Splitter 1 connects to Input pin I0 (net I0, i0).
- Splitter 1 connects to Input pin I1 (net I1, i1).
- Splitter 1 connects to Input pin I2 (net I2, i2).
- Splitter 1 connects to Input pin I3 (net I3, i3).
Custom mapping: uneven groups and skipped bits
A 16-bit instruction word cut into fields. OP takes bits 12 to 15, RD bits 9 to 11, RS bits 6 to 8 and IMM bits 0 to 4. Bit 5 is set to None, so it goes nowhere.
Describe this circuit
Components: Input pin I; Splitter 1; Output pin OP; Output pin RD; Output pin RS; Output pin IMM.
- Input pin I connects to Splitter 1 (net I), 16 bits wide.
- Splitter 1 connects to Output pin OP (net e0, OP), 4 bits wide.
- Splitter 1 connects to Output pin RD (net e1, RD), 3 bits wide.
- Splitter 1 connects to Output pin RS (net e2, RS), 3 bits wide.
- Splitter 1 connects to Output pin IMM (net e3, IMM), 5 bits wide.
Download circ-splitter-instruction-fields.circ.
Bit Extender: widening a value
The Bit Extender (Wiring library) has attributes Bit Width In, Bit Width Out and Extension Type: Zero, One, Sign or Input (strings in the 5.0.0 table). Our circuit widens 8 bits to 16 three ways:
| # | D | Zero | One | Sign |
|---|---|---|---|---|
| 0x00 | 0x0000 | 0xff00 | 0x0000 | |
| 0x70 | 0x0070 | 0xff70 | 0x0070 | |
| 0x80 | 0x0080 | 0xff80 | 0xff80 | |
| 0xF0 | 0x00f0 | 0xfff0 | 0xfff0 | |
| 0xFF | 0x00ff | 0xffff | 0xffff |
Use Sign to extend a signed immediate (“logisim sign extend”): the top bit is copied into the new bits. Use Zero for unsigned values. Download circ-splitter-bit-extender.circ.
When the wires turn orange
Incompatible widthsCanvas status line, orange wire
The wire is orange when two widths meet. With a splitter the usual causes are: Bit Width In not equal to the bus; an end carrying several bits wired to a 1-bit pin; and an end whose width changed after you changed Fan Out. See wire colours for the full fix (F09).
Common mistakes
Splitter in classic 2.7.1 and older Evolution
| Feature | 2.7.1 | 5.0.0 |
|---|---|---|
| Fan Out and Bit Width In attributes | 2.7.1: untestedsame names in classic files | 5.0.0: yesfanout and incoming (F84) |
| Default ports of a 2-end splitter | 2.7.1: yescombined end (0,0), ends (20,-20) and (20,-10) | 5.0.0: yesidentical (F23) |
| Maximum width | 2.7.1: partial32 bits, per the documentation | 5.0.0: partial64 bits, per the documentation |
| Appearance options | 2.7.1: untested | 5.0.0: yesLeft-handed, Right-handed, Centered, Legacy |
Cells say untested where we have no 2.7.1 capture. See also Tunnel for labelling a bus instead of drawing it, and all components.