How does serializing in coins.h work?
(note: I'll be using a different bit numbering from the comment which goes from 0..B instead of 1..2^B, as I find that easier to read myself)

The binary representation of 0x9 separated in functional groups is 

bit# ...6543 21 0
        ---------
        0001 00 1



Bit 0 is set because this is a coinbase
Bit 2 and 1 are 0, because vout[0] and vout[1] are spent
Bit 3+ contain just the binary number 1. As bit 1 and 2 are not set, these bits encode N-1. N=(9&gt;&gt;3)+1=2. N here is the number of bytes in the subsequent bit vector.


These two bytes that follow are 04 and 40, encoding the number 0x440, the number with bits 2 (1&lt;&lt;4=0x04) and 14 (1&lt;&lt;14=0x4000) set. As described in the example this means vout[2+2] and vout[14+2] are unspent.

How do you end up at 0x11?