Listing 3: The toUnsigned Function function toUnsigned(n) { return ((n >>> 1) * 2) + (n & 1); }