Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
hex manip
//Microsoft (R) C/C++ Optimizing Compiler Version 19.00.23506 for x64 #include <iostream> int main() { using type = unsigned short; // B00F + 25B0 to get D5BF type left = 0xB00F; type right = 0x25B0; type first = ((left & 0xF000) >> 12) + ((right & 0xF000) >> 12); std::cout << "first value " << std::hex << first << std::endl; type second = ((left & 0x0F00) >> 8) + ((right & 0x0F00) >> 8); std::cout << "second value " << std::hex << second << std::endl; type third = ((left & 0x00F0) >> 4) + ((right & 0x00F0) >> 4); std::cout << "third value " << std::hex << third << std::endl; type fourth = (left & 0x000F) + (right & 0x000F); std::cout << "4th value " << std::hex << fourth << std::endl; type total = (first << 12) + (second << 8) + (third << 4) + fourth; std::cout << "total " << std::hex << total << std::endl; }
run
|
edit
|
history
|
help
0
div64 inline asm
Revers find file in windows
Postfix side effect returning 2
Test
Workaround for https://github.com/Project-OSRM/osrm-backend/pull/4385
Problem_onoff_3
base call virtual
Unicode_wcout
Hangman
dhar1