user-1: Typing the following command (with a running lightningd):
 lightning-cli listpeers

I get peers which all have a features flag, for example 0252a1. In the manpage lightning-listpeers(7) it says, that it corresponds to the features mentioned in BOLT #9.
How do I get from 0252a1 to the features listed in the table seen in the BOLT #9 document?

user5406: A bit is a binary digit with the two possible expressions 0 and 1. Binary data is often represented as hexadecimal in writing as that is more compact and human-readable. Hexadecimal (base 16) encodes the (decimal) numbers 0 through 15 with the symbols 0-9 and A-F (where A-F represent 10-15).
A few examples (subscript indicates base):
110 = 116 = 00012
510 = 516 = 01012
1010 = A16 = 10102
1310 = D16 = 11012
The flag array that you quote, 0252a1 would translate to the binary array 100101001010100001
To use it as a flag array, we do not interpret it as a number but interpret a 1 as a feature being set and a 0 as a feature being unset. We refer to each bit by its position counting from the rightmost. The rightmost is the zeroth bit and even.
The Feature Flags (BOLT #9) in Lightning are always assigned in pairs. Even bits refer to features that our node will consider mandatory, odd bits refer to optional features our node supports. Other nodes will ignore odd bits that they don't understand ("It's okay to be odd."), but will disconnect if there are even bits set they don't support.
1001010010101000_01_
Bits 0/1 refer to the feature option_data_loss_protect. The flag is on the even bit (the 0th), thus the feature is mandatory.
10010100101010_00_01
Bits 2/3 refer to initial_routing_sync. Since neither bit is set, our node does not support that feature.
100101001010_10_0001
Bits 4/5 signal option_upfront_shutdown_script. The flag is on bit 5, and thus it's an optional feature.
1001010010_10_100001
Bits 6/7 signal gossip_queries. The flag is on bit 7, also optional.
10010100_10_10100001
Bits 8/9 signal var_onion_optin. As the flag is on the odd bit, it's an optional feature.
100101_00_1010100001
Bits 10/11 is for gossip_queries_ex. Our node does not support this feature.
1001_01_001010100001
Bits 12/13 indicate that option_static_remotekey is mandatory for this node's peers, as it is set on bit 12, the even bit.
10_01_01001010100001
Bits 14/15 refer to payment_secret which is also mandatory.
_10_0101001010100001
The flag on bit 17 indicates that basic_mpp is optional.
The absence of the feature flags on bits 18-27 indicates that the node does not recognize any of the corresponding features.

-1: <p>Typing the following command <em>(with a running lightningd)</em>:</p>
<pre><code> lightning-cli listpeers
</code></pre>
<p>I get peers which all have a <code>features</code> flag, for example <code>0252a1</code>. In the manpage <code>lightning-listpeers(7)</code> it says, that it corresponds to the features mentioned in BOLT #9.</p>
<p>How do I get from <code>0252a1</code> to the features listed in the table seen in the <a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md" rel="nofollow noreferrer">BOLT #9 document</a>?</p>
 5406: <p>A bit is a <strong>b</strong>inary dig<strong>it</strong> with the two possible expressions 0 and 1. Binary data is often represented as hexadecimal in writing as that is more compact and human-readable. Hexadecimal (base 16) encodes the (decimal) numbers 0 through 15 with the symbols 0-9 and A-F (where A-F represent 10-15).</p>
<p>A few examples (subscript indicates base):<br />
1<sub>10</sub> = 1<sub>16</sub> = 0001<sub>2</sub><br />
5<sub>10</sub> = 5<sub>16</sub> = 0101<sub>2</sub><br />
10<sub>10</sub> = A<sub>16</sub> = 1010<sub>2</sub><br />
13<sub>10</sub> = D<sub>16</sub> = 1101<sub>2</sub></p>
<p>The flag array that you quote, <code>0252a1</code> would translate to the binary array <code>100101001010100001</code></p>
<p>To use it as a flag array, we do not interpret it as a number but interpret a 1 as a feature being set and a 0 as a feature being unset. We refer to each bit by its position counting from the rightmost. The rightmost is the zeroth bit and even.</p>
<p>The <a href="https://github.com/lightningnetwork/lightning-rfc/blob/master/09-features.md" rel="nofollow noreferrer">Feature Flags (BOLT #9)</a> in Lightning are always assigned in pairs. Even bits refer to features that our node will consider mandatory, odd bits refer to optional features our node supports. Other nodes will ignore odd bits that they don't understand (&quot;It's okay to be odd.&quot;), but will disconnect if there are even bits set they don't support.</p>
<p><code>1001010010101000_01_</code><br />
Bits 0/1 refer to the feature <code>option_data_loss_protect</code>. The flag is on the even bit (the 0th), thus the feature is mandatory.</p>
<p><code>10010100101010_00_01</code><br />
Bits 2/3 refer to <code>initial_routing_sync</code>. Since neither bit is set, our node does not support that feature.</p>
<p><code>100101001010_10_0001</code><br />
Bits 4/5 signal <code>option_upfront_shutdown_script</code>. The flag is on bit 5, and thus it's an optional feature.</p>
<p><code>1001010010_10_100001</code><br />
Bits 6/7 signal <code>gossip_queries</code>. The flag is on bit 7, also optional.</p>
<p><code>10010100_10_10100001</code><br />
Bits 8/9 signal <code>var_onion_optin</code>. As the flag is on the odd bit, it's an optional feature.</p>
<p><code>100101_00_1010100001</code><br />
Bits 10/11 is for <code>gossip_queries_ex</code>. Our node does not support this feature.</p>
<p><code>1001_01_001010100001</code><br />
Bits 12/13 indicate that <code>option_static_remotekey</code> is mandatory for this node's peers, as it is set on bit 12, the even bit.</p>
<p><code>10_01_01001010100001</code><br />
Bits 14/15 refer to <code>payment_secret</code> which is also mandatory.</p>
<p><code>_10_0101001010100001</code><br />
The flag on bit 17 indicates that <code>basic_mpp</code> is optional.</p>
<p>The absence of the feature flags on bits 18-27 indicates that the node does not recognize any of the corresponding features.</p>
