----------Updated ------------
codymanix and moonshadow have been a big help thus far. I was able to solve my problem using the equations and instead of using right
You can express this as a series of arithmetic and bitwise operations, e.g.:
int myabs(const int& in) { const int tmp = in >> ((sizeof(int) * CHAR_BIT) - 1); return tmp - (in ^ tmp(; } int mymax(int a, int b) { return ((a+b) + myabs(b-a)) / 2; }