Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
Getting a range of bits from a bit vector
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="BartC, post: 4195312"] If you've made an error, then you will get wrong results. Specifying a bit range both ways is useful: some tend to use 0 to 31 for generic bit arrays, and 31 to 0 for bits within a word (which also matches the perceived order of the bits, with msb on the left, and lsb on the right). This is what I did when I had a similar sort of library. Of course, specifying 8 to 3 might also mean you want 3 to 8, but reversed; but here I'd be happier with a specific reversal function. Or, allowing 8 to 3 as a synonym for 3 to 8 could be an option. [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
Getting a range of bits from a bit vector
Top