It is entirely compiler and implementation specific:
- whether bitfields are packed from LSB to MSB or from MSB to LSB
- how much padding is applied to the end of the structure
- how much padding is applied between differently-typed items (IIRC)
The integer type you give to the left is only how the bitfield is to be interpreted when unpacked (that is, when you use it). It only actually uses the number of bits you specify on the right when packed into your structure.
You'll need to review your course notes for more information.
In real life, avoid bit fields. The standard makes a mistake by providing bitfields but not specifying exactly how they are to packed. IMO, at least. That makes bit-packed fields inconvenient when working with real bytes -- and requires the programmer to resort to manual bit-packing with the bit-operators anyway.
How would I do that? You've already got the answer: your compiler is free to pad the end of the structure. It looks like your compiler is padding the structure to four bytes -- a common integer size (the size of a long int).
What was the question, what was your answer? I think it's all about the bit field resulting in a size of 12Bit and the structure gaining a size of 4 chars (32 Bit) Through alignment. As said it's implementation specific - the result could have theoretically been anything.