Why use hex?

前端 未结 12 2006
你的背包
你的背包 2020-11-28 03:45

Hey! I was looking at this code at http://www.gnu.org/software/m68hc11/examples/primes_8c-source.html

I noticed that in some situations they used hex numbers, like i

12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-28 04:05

    0xffff0000 is easy to understand that it's 16 times "1" and 16 times "0" in a 32 bit value, while 4294901760 is magic.

提交回复
热议问题