Allow me to carry on with an already solved topic
Using typecast:
WriteLn(IntToHex(uint16(MyBits)));
Using
absolute:
var
MyBitsWord: word absolute MyBits;
WriteLn(IntToHex(MyBitsWord));
So how to convert that to 'FF00' string?
Do you actually want
FF00 as output for your example, i.e. the little endian representation of your bit name convention? In that case the answers so far is not generating the required output, since the convention for representing human readable numbers(*) is big endian, hence using the built-in conversions to human readable hex strings is not directly applicable. If this is indeed what the OP wants(**), then one option is to to swap the endianness of the underlying value before converting to hex format, for example using the
SwapEndian function:
WriteLn(IntToHex(SwapEndian(uint16(MyBits))));
* There are of course other representations, of which left to right big endian is only one, but for the sake of this discussion (Pascal language with English roots) I make this assumption.
** This may not be the first time I completely misread a discussion, especially given that the OP is already satisfied with the previous information in this thread...