The main documentation page fot LUT5 could be clearer about what is going on. |
Internally the 5 inputs are interpreted as a binary number.
Then that number is used to select one of 32 possible outputs from the table. (2^5 = 32)
The outputs could have been individual HAL bits, but that would have been tedious, so instead the 32 possible output states are encoded into a binary number.
(This is where the "Weights" in the docs come in)
Rather than add up a bunch of hex numbers, it is easier to open the Ubuntu calculator in "Programmer mode" which can handle up to 64 bit binary numbers (just click the 0s and 1s below the display).
Bit 31 is the bottom row of LUT5. Bit 0 is the top one.