Snippet from the posix specification http://www.opengroup.org/onlinepubs/000095399/utilities/umask.html:
For a symbolic_mode value, the new value of the file mode creation mask shall be the logical complement of the file permission bits portion of the file mode specified by the symbolic_mode string.
In a symbolic_mode value, the permissions op characters '' shall cause the bits for the indicated permissions to be cleared in the mask; '' shall cause the bits for the indicated permissions to be set in the mask.
The interpretation of mode values that specify file mode bits other than the file permission bits is unspecified.
In the octal integer form of mode, the specified bits are set in the file mode creation mask.
The file mode creation mask shall be set to the resulting numeric value.