why sizeof(0xF) is 4 bytes in C++? : I have following code,

    unsigned short code = 0x12E0;
    code = code & 0x0FFF;

In my CLion IDE, i am getting a warning that "Values of type *'int'* may not fit into the receiver type *unsigned short*"

if i put it like `code &= 0x0FFF;`, the warning is gone. 

Why it is taking 0x0FFF as int?

the sizeof(0xF) is 4, can someone explain why?