Lemonergy · Studio block
Pack Boolean bits
Packs Boolean values into an unsigned word, least significant bit first.
- Implementation ID
native-bit-pack- Reviewed
- 2026-10-27
Behavior
word = Σᵢ bitᵢ × 2ⁱ. The worked example connects this operation to signals in Lemonergy Studio.
Interface
| Name | Direction | Unit | Meaning |
|---|---|---|---|
in0 | input | 1 | Bits; bool 4 array. |
out0 | output | 1 | Word; u32 scalar. |
Parameters
No configurable parameters for this component.
Equations and rules
word = Σᵢ bitᵢ × 2ⁱ
Worked example
Pack Boolean bits — worked example
Bits = [1,0,1,1]. Word at 0 s = 13.
Open Studio example after release →| Output | Time (s) | Expected value | Unit | Absolute tolerance |
|---|---|---|---|---|
Wordout0 | 0 | 13 | 1 | 1e-08 |
Explore the recorded outputs
Pack Boolean bits recorded example
Pack Boolean bits2 actual recorded samples. Lines are visual guides between samples. Synthetic example, not measured cell data.
Read the selected signal as a table
| Time (s) | Value |
|---|
Download the recorded samples (JSON) · Open this Studio example after release
Use in a workflow
Pack Boolean bits — worked example
Packs Boolean values into an unsigned word, least significant bit first.
- Pack Boolean bits: word = Σᵢ bitᵢ × 2ⁱ. 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.
Connected concepts
Limits and interpretation
- Up to32 Boolean bits; least significant bit first; exact u32 output.
- 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)