The sizeof operator specifies the number of bytes retrieved to get an element, not (number-of-bits +7)/8.