I'd like to know how to use Simulink's Bitwise Operator Block to find when a specific bit's value is 1.
Show older comments
I want to identify when the 9th bit is set to 1 as depicted in the diagram below. So, I've structured the model as shown.
I expected the output of the Bitwise Operator Block 4 to be 1, but it's showing as displayed below. I configured it as follows.

I think the only way to mask the value of the 9th bit as I initially intended is by changing the value of 'constant4' to 512. I'm wondering if I've understood this correctly.
Accepted Answer
More Answers (0)
Categories
Find more on Modeling in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!