Respuesta :

You can convert 1000 to hex and see how many digits that requires:

[tex]1000_{10}=(3\cdot16^2+14\cdot16+8)_{10}=3\mathrm e8_{16}[/tex]

So every integer below 1000 needs up to 3 digits.

Alternatively, we know that [tex]16^2=256<1000<4096=16^3[/tex], and that [tex]16^n[/tex] requires [tex]n+1[/tex] digits in its hex representation (e.g. [tex]16_{10}=10_{16}[/tex]). Taking the logarithm, we get [tex]\log_{16}16^2=2[/tex], and adding 1 gives the number of digits needed to represent [tex]16^2[/tex]. Similarly,


[tex]\lfloor\log_{16}1000\rfloor+1=3[/tex]