Applies to:
PcVue 10.0 SP2 onwards |
||
|
||
Summary:
This article explains how to extract bits from a word using an expression. Especially for very long words. |
||
|
||
Details:
(@Wordbit.Register01 & (2 POW 00)) >> 00 Version 10.0 SP2 You can extract every bit, 0 to 31, from a 32-bit word or from a 64-bit word Version 11.1 update 122 and later You can extract every bit, 0 to 31, from a 32-bits word or from a 64-bits word
@Wordbit.Register01>>00 Version 10.0 SP2 You can extract bit 0 to 30, from a 32-bits word or from a 64-bits word
Version 15.2.1 and later You can extract every bit, 0 to 31, from a 32-bits word or from a 64-bits word
Conclusion: you can never extract bit 53 to 63 from a 64-bits word The screenshot below, coming from attached sample project launched with version 11.1 update 122, illustrates it. Download sample project: WORDBIT.zip |
||
|
||
|
Created on: 21 Feb 2022 Last update: 30 May 2024