We should make this as an unsigned int rather than int as we don't care about the sign for the bits.