I'm trying to understand a constant 0x9e3779b9.
What kind of data is this? It's not binary, not decimal, what is this?
It's a constant used on the TEA algorithm. It says it's derived from the golden number, but the golden number is 1.618?
As others have said, the constant is an integer in hexadecimal form. Specifically, it is a 32-bit integer in hexadecimal form. If the constant is a signed integer, then 0x9e3779b9 is negative 1640531527 decimal in two's complement form; therefore, it may be a scaled integer fraction that has been adjusted to deal with non-integral of 2 related problems.
Two's complement negative to positive conversion in hex
or using the 1's complement operator ~ in the C family of languages
Two's complement negative to positive conversion in binary
I think this StackOverflow question answers it:
Essentially, it is a "golden number" for hash functions, and it being an integer is quicker to calculate.
The number comes from the hexadecimal representation of the golden ratio.
You are not dividing
As others pointed out here and on http://stackoverflow.com/questions/4948780/magic-numbers-in-boosthash-combine, the number is indeed constructed from the golden ratio.
But there is another important reason why numbers such as pi, phi or e are used in cryptographic functions. Of course, in principle, any "reasonably random" bit sequence could be used as a constant. But it puts the creator of the function under suspicion of having engineered the value, e.g. in order to create a particular weakness in the algorithm (known only to him) that he can then exploit when you use his function.
By constructing the value from well-known "natural" constants, this kind of suspicion can be averted to some degree.
Thank you for your interest in this question.
Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.
Would you like to answer one of these unanswered questions instead?