Lemonergy · Studio block

Arithmetic bit shift

Shifts signed 32-bit words with explicit arithmetic-right and wrapping-left rules.

Implementation ID
native-arithmetic-shift
Reviewed
2026-10-27

Behavior

y = signed 32 arithmetic right shift, or wrapping left shift. The worked example connects this operation to signals in Lemonergy Studio.

Interface

Arithmetic bit shift interfaceInputs or arguments on the left, observed outputs on the right. Conserving terminals appear below the component. The tables give units and behavior.Arithmetic bit shiftStudio blockin0out0
Original Lemonergy interface view. Lines identify ports; they are not a completed simulation circuit.
Ports and observed outputs
NameDirectionUnitMeaning
in0input1Signed word; i32 scalar.
out0output1Result; i32 scalar.

Parameters

Defaults are initial model values. Select values for your own model and operating conditions.

Configuration fields
ParameterUnitDefaultMeaning and limits
Shift count
params[0]
1-1Positive left (32-bit wrapping); negative arithmetic right.

Equations and rules

  • y = signed 32 arithmetic right shift, or wrapping left shift

Worked example

Arithmetic bit shift — worked example

Signed word = -8. Result at 0 s = -4.

Open Studio example after release →
Numerical checks for the bundled synthetic example
OutputTime (s)Expected valueUnitAbsolute tolerance
Result
out0
0-411e-08

Explore the recorded outputs

Arithmetic bit shift recorded example

Arithmetic bit shift
Arithmetic bit shift against timeRecorded synthetic simulation values. Time in seconds; output in —.-4.50-4.250.25-40.5-3.750.75-3.51—Time (s)
Arithmetic bit shift: -4 — at 0 s

2 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.

Download the recorded samples (JSON) · Open this Studio example after release

Use in a workflow

Arithmetic bit shift — worked example

Shifts signed 32-bit words with explicit arithmetic-right and wrapping-left rules.

  1. Arithmetic bit shift: y = signed 32 arithmetic right shift, or wrapping left shift. The worked example connects this operation to signals in Lemonergy Studio.
    • Use the block reference for settings and connections.
    • Implementation tested locally; public release pending.
Open Studio example after release

Connected concepts

Limits and interpretation

  • Signed32-bit values, shifts -31..31; arithmetic right shift and wrapping left shift.
  • Shapes and element types are explicit. Values must be finite; automatic reshaping and unit conversion are not performed.

Reference basis

This software operation and its numerical conventions are defined by the public contract and worked example; no external research result is claimed.

Implementation sources

This reference follows the public interface and locally verified numerical checks for an upcoming release.

Contract: Lemonergy Studio public contract · Verification record: verification-2026-10-27

  • docs/glossary/native-block-verification.json

This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)