|
| ||||||||||||||||||||||||||||||||||||||||||
8. reverse bit order bytes.commike7411@gmail.com wrote: Is there any easy way to reverse the order of the bits in a byte in C++? > (i.e. 00000001 becomes 10000000) > No. There is only the hard way ;) You have to shift the bits one by one. The best idea is to calculate an array of 256 values that contain the reversed bits. Then you can ... | |||||||||||||||||||||||||||||||||||||||||||
9. Arranging bits in specific order forums.devshed.comBitshifting is not very expensive, it all happens in the registers. Besides, there is no other way to make this happen. Either you encapsulate the the code so your main body is easier to read (risking a couple of thousand of function call overhead per second) or you place the relatively easy to read and follow code that clifford posted. If ... | |||||||||||||||||||||||||||||||||||||||||||
10. Reverse Bit Order in C daniweb.com#include |
| java2s.com | Contact Us | Privacy Policy |
| Copyright 2009 - 12 Demo Source and Support. All rights reserved. |
| All other trademarks are property of their respective owners. |