HP‑41C series, 18 B
You must place \$n\$ on top of the stack first (a. k. a. the X
register).
TheThen you can XEQ
(execute) the following program:
01♦LBL "Y" 5 Bytes global label requires 4 + (length of string) Bytes
NULL 1 Byte invisible Null byte before numbers
02 31 2 Bytes X ≔ 31; Y ≔ 𝘯
03 − 1 Byte X ≔ 𝘯 − 31
NULL 1 Byte invisible Null byte before numbers
04 16 2 Bytes place the value 16 on top of the stack; X ≔ 16
05 ∕ 1 Byte X ≔ (𝘯 − 31) ∕ 16
06 E↑X 1 Byte 𝘦 raised to the power of X
07 FIX 2 2 Bytes show (up to) two place after the radix point
08 RND 1 Byte round the value
09 RTN 1 Byte `RTN` does not affect local label search
The fixed decimal point display is always rounded.
However, the display settings do not affect the internally stored numbers.
To ensure all digits after the second decimal place are zero, too, RND
(round) is applied.