04-02-2025 08:07 AM
@billko wrote:And I forgot that Booleans aren't truly one bit; it actually takes 8 bits to represent each Boolean so thanks for reminding me about that.
It used to be even a 16-bit integer until LabVIEW 4.x. But boolean arrays were packed with 8 boolean values per byte. But that was changed in LabVIEW 5.0 because the packed boolean array was memory conserving but very CPU intense to pack/unpack and index.
04-03-2025 09:33 AM
@rolfk wrote:
@billko wrote:And I forgot that Booleans aren't truly one bit; it actually takes 8 bits to represent each Boolean so thanks for reminding me about that.
It used to be even a 16-bit integer until LabVIEW 4.x. But boolean arrays were packed with 8 boolean values per byte. But that was changed in LabVIEW 5.0 because the packed boolean array was memory conserving but very CPU intense to pack/unpack and index.
Did you have 8 booleans in 16 bits?
04-03-2025 10:01 AM
@rolfk wrote:
... until LabVIEW 4.x. But boolean arrays were packed with 8 boolean values per byte. But that was changed in LabVIEW 5.0 because the packed boolean array was memory conserving but very CPU intense to pack/unpack and index.
A side effect is that we still have that overlooked 4.x typecast mode that can be sometimes useful, but we need to remember that the index 0 is the MSB.
04-03-2025 03:47 PM
@Yamaeda wrote:
@rolfk wrote:
@billko wrote:And I forgot that Booleans aren't truly one bit; it actually takes 8 bits to represent each Boolean so thanks for reminding me about that.
It used to be even a 16-bit integer until LabVIEW 4.x. But boolean arrays were packed with 8 boolean values per byte. But that was changed in LabVIEW 5.0 because the packed boolean array was memory conserving but very CPU intense to pack/unpack and index.
Did you have 8 booleans in 16 bits?
No. A scalar boolean was an int16 and an array of booleans was 16 bit padded.
04-04-2025 02:11 AM
@rolfk wrote:
A scalar boolean was an int16 and an array of booleans was 16 bit padded.
Here's the proof that a scalar boolean was 2 bytes.
04-04-2025 06:24 AM
Cool. I like learning of the history, i first touched LV in ver 5 i think (very rudimental) and any form of advanced LV was 8.2 for me.