Shifter

Library: Arithmetic
Introduced: 2.3.0
Appearance:

Behavior

This component includes two inputs, data and dist, and it has one output, which is the result of shifting data by dist places. Both data and output have the same number of bits in them. The component supports the following shift types:

Note that if dist contains any floating or error inputs, then the output is composed entirely of error values, since there is no way to guess how far to shift the input.

Pins

West edge, north end (input, bit width matches the Data Bits attribute)
The value to be shifted.
West edge, south end (input, bit width is computed as below)
The number of bits by which to shift the data input. This input should have as many bits as is the minimum number to indicate any shift distance from 0 up to one less than Data Bits; that is, it should be the ceiling of the base-2 logarithm of Data Bits. For example, if Data Bits were 8, this input would require 3 bits; but if it were 9, it would require 4 bits.
East edge (output, bit width matches the Data Bits attribute)
The result of shifting the input value by the input distance.

Attributes

When the component is selected or being added, Alt-0 through Alt-9 alter its Data Bits attribute.

Data Bits
The bit width of the data input and of the output.
Shift Type
One of the five possible shift types as outlined above (Logical Left, Logical Right, Arithmetic Right, Rotate Left, Rotate Right).

Poke Tool Behavior

None.

Text Tool Behavior

None.

Back to Library Reference