Maker Pro
Maker Pro

largest decimal value.

fahad_zia1988

Aug 19, 2010
8
Joined
Aug 19, 2010
Messages
8
What is the largest decimal value that can be represented in binary using two bytes?
 

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
Firstly, I'll assume you mean 8-bit bytes.

If I allow 1 bit for the sign, 1 for the mantissa and 14 bits for a signed exponent then the largest number that can be stored is 1 x 2 ^ ( ( 2 ^ 13) - 1) or approximately 5.4x10^2465, however there are some drawbacks to this number format :)

As an unsigned binary number, the largest number is (2^16) - 1, or 65535

The first silly example does have a point. You can define the interpretation of the bits however you like. If your requirements do not include being able to store a representation of zero and each integer up to and including a maximum number, the range of numbers stored is largely limited to the fact that there are 65536 different combinations of 16 bits and how you decide to interpret them.
 
Top