Biggest number in computer ever

前端 未结 14 1139
傲寒
傲寒 2021-01-30 09:12

Just asked by my 5 year old kid: what is the biggest number in the computer?

We are not talking about max number for a specific data types, but the biggest number that a

14条回答
  •  没有蜡笔的小新
    2021-01-30 09:35

    That depends on the datatype you use to represent it. The computer only stores bits (0/1). We, as developers, give the bits meaning. (65 can be a number or the letter A).

    For example, I can define my datatype as 1^N where N is unsigned and represented by an array of bits of arbitrary size. The next person can come up with 10^N which would be ten times larger than my biggest number.

    Sure, there would be gaps but if you don't need them, that doesn't matter.

    Therefore, the question is meaningless since it doesn't have context.

提交回复
热议问题