How does IEEE 754 decimal encoding work?
Fair question. First of all, it's worth noting that the IEEE decimal formats are fairly modern and not used particularly often—they're meant for the rare use cases where things need to round in a specific way, mostly in finances.

But, there are various ways to encode a truly decimal number (i.e. a number stored as a series of base-10 digits) in binary. The simplest is called BCD (Binary Coded Decimal), which uses four bits to represent each digit. Many early computers used this system because humans are used to decimal and found it more intuitive.

BCD is kind of wasteful, because four bits can represent any number from 0 to 15, and a single digit only need to represent a number from 0 to 9. So IEEE uses slightly different packings, called Binary Integer Decimal and Densely Packed Decimal. They're somewhat more complicated, but the idea is the same: you have a one-to-one mapping between decimal digits and binary bits, wasting as few bits as possible.