Search
 
SCRIPT & CODE EXAMPLE
 

CPP

c++ reverse bits

uint32_t reverse(uint32_t x)
{
    x = ((x >> 1) & 0x55555555u) | ((x & 0x55555555u) << 1);
    x = ((x >> 2) & 0x33333333u) | ((x & 0x33333333u) << 2);
    x = ((x >> 4) & 0x0f0f0f0fu) | ((x & 0x0f0f0f0fu) << 4);
    x = ((x >> 8) & 0x00ff00ffu) | ((x & 0x00ff00ffu) << 8);
    x = ((x >> 16) & 0xffffu) | ((x & 0xffffu) << 16);
    return x;
}
Comment

PREVIOUS NEXT
Code Example
Cpp :: .txt file into .cpp 
Cpp :: PCL normal specific point 
Cpp :: how to draw a rectangle with diagonals and axes of symmetry in c ++ in the console? 
Cpp :: sfml time set 
Cpp :: entering char in int c++ avoid loop 
Cpp :: loops in c++ with example 
Cpp :: CPP Find options passed from command line 
Cpp :: Edmonds-Karp algorithm C++ 
Cpp :: convert char to string c++ 
Cpp :: c++ enter name and surname one string 
Cpp :: sort using comparator anonymous function c++ 
Cpp :: c++ insertion in astack 
Cpp :: max in c++ with three elements 
Cpp :: initialize object as null in c++ 
Cpp :: how to find the left most bit 1 in binary of any number 
Cpp :: create a table using pointers in C++ 
Cpp :: find number of 1s in a binary cv::mat image 
Cpp :: find maximum contiguous Sub arrays 
Cpp :: xor in c++ 
Cpp :: partition in STL using vector 
Cpp :: variabili in c++ 
Cpp :: c++ program to use nmap 
Cpp :: void linux java 
Cpp :: C++: Methods of code shortening in competitive programming 
Cpp :: windows install cppcheck 
Cpp :: convert c++ program to c online 
Cpp :: icon on win32 button 
Cpp :: tutti i tipi di equazioni trigonometriche 
Cpp :: how to analyse a poem 
Cpp :: subsequence 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =