The number of bits required to represent an integer number depends on the size of the integer, there is no absolute answer. Generally speaking, a binary number made up of some number of bits can be considered to directly represent an integer number according to the rules of binary arithmetic. If you specify the question a little differently you can come up with a question that does have an absolute answer. For example, if you ask what range of integers can be represented by a binary number with N bits, the answer is exactly 0 to 2^N (ignoring alternate ways to characterize binary numbers such as signed two's complement). More specifically, an 8 bit binary number can represent the integers from 0 to 255. There is also another way to restate your original question. That would be to assume that you are asking how many bits (at a minimum) does it take to represent a particular integer. In that case, again assuming unsigned binary arithmetic, the answer would be found by determining the next higher power of two than the number in question and finding log base 2 of that number. For example, the minimum number of bits required to represent the integer 60 would be 6, where the next higher power of two than 60 is 64, and the log base 2 (simply the power to which 2 must be raised to arrive at the number) is 6. In theory, an infinite number of bits could represent an infinity of integers, but that is probably not really what you are asking.
There are 8 bits in a byte, so a two byte integer would be 16 bits. The largest 16 bit integer possible would be 11111111111111112, which is 65535 in base 10.
The number of bits in an integer is the number of times you can divide the integer by 2, truncating each result, before you reach zero.
The largest integer is 211 - 1 which is 2048 - 1 = 2047
From -524287 to 524288
Your website is useless
What is the decimal equivalent of the largest binary integer that can be obtained with (a) 11 bits and (b) 25 bits?
In computer programming, a variable can be (among other things) an integer or a long integer. An integer can be any whole number in the range of -32,768 to 32,767 A long integer can be any whole number in the range of -2,147,483,648 tp 2,147,483,647 I have never heard of an "integer" variable being called a "short integer" but it makes a kind of sense. Note: The size of integer types is platform-dependent, but usually: short: 16 bits int: 32 bits (16 in archaic systems: MSDOS OS Windows16) long: 32 bits (64 in unix64) long long: 64 bits
Bits administrator
There are 8 bits in a byte, so a two byte integer would be 16 bits. The largest 16 bit integer possible would be 11111111111111112, which is 65535 in base 10.
The number of bits in an integer is the number of times you can divide the integer by 2, truncating each result, before you reach zero.
2x-1
2x -1
8 bits = 1byte 2 bytes = 1int dint (double integer) = 4bytes = 32bits
The largest integer is 211 - 1 which is 2048 - 1 = 2047
65,535 in decimal = 1111111111111111 in binary.
From -524287 to 524288
11 bits (which actually allows -1024 to 1023)