Works both ways: fields in, bitmap out β or bitmap in, fields out, with all 64/128 bits drawn.
The bitmap tells the receiver which data elements are present. The primary bitmap is 8 bytes, 64 bits, one per field, and you count from bit 1, not bit 0 β the off-by-one that catches almost everyone once.
Bit 1 is special: setting it means a secondary bitmap follows, covering fields 65β128. So the moment you use any field above 64, bit 1 must be set and the bitmap grows from 8 bytes to 16. The calculator above handles that for you.
Take the first hex character: 7 is binary 0111, so bit 1 is clear (no secondary bitmap) and bits 2, 3 and 4 are set (DE2, DE3 and DE4 present). One hex character is four bits β carry on that way and you can verify any bitmap manually.
Don't count the bitmap itself as DE1. DE1 is the secondary-bitmap indicator, not a data element in its own right, which is why the reverse lookup above never lists field 1. And match the bitmap length to the encoding: 16 characters represent 8 bytes under ASCII, whereas under binary encoding those 8 bytes are the bitmap itself.