They used bitwise operators to accomplish the task. Unless the person has very good understanding of C++, he probably won't understand what these codes are trying to do.
They may speed up things quite significantly but in exchange you have to sacrifice a large portion of code readability. So I would not recommend these for daily code writing unless you are writing performance critical code.
I would rather you learn these instead.
This is the binary representation : cout << bitset<32>(n);
This is the octal representation : cout << oct << n;
This is the hexa representation : cout << hex << n;
I do understand there's some other easier way of doing such operation. But i'm learning C++, so i'm trying to understand what the above codes mean. Hope if anyone could kindly explain the meaning of the above codes.