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++
BITWISE SHIFT question
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="HARDCORECODER, post: 2554355"] ok I meant the first 4 bits....bit 0,1,2,3. I want to exract these and place them and place them into another variable. for example noone wrote: bits1to3=(x>>1)&0x0f; // bits 1 2 3 4 bits12to15=(x>>12)&0x0f; // bits 12 13 14 15 to extract bit fields you should shift right then use a bit mask containing all ones. I beleive this is correct! but anyone else have suggestions? [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C++
BITWISE SHIFT question
Top