answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

15y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Bits in a integer
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Decimal equivalent of the largest binary integer that can be obtained with 11 bits?

What is the decimal equivalent of the largest binary integer that can be obtained with (a) 11 bits and (b) 25 bits?


What is short integer?

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


What is range of 8 bit unsigned integer?

Bits administrator


What is the largest decimal number that a two byte integer can represent?

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.


How many bit in integer?

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.


What is the biggest signed integer that can be coded in X bits?

2x-1


What is the biggest integer that can be coded binary in X bits?

2x -1


How many bits are there in dint?

8 bits = 1byte 2 bytes = 1int dint (double integer) = 4bytes = 32bits


What is the decimal equivalent of the largest binary integer that can be obtained with 11 bits?

The largest integer is 211 - 1 which is 2048 - 1 = 2047


What is the largest integer that can be stored in 16 bits?

65,535 in decimal = 1111111111111111 in binary.


What is the range of signed integer that may be stored in 20 bits?

From -524287 to 524288


How many bits do you need to encode any signed integer between -1000 and 1000?

11 bits (which actually allows -1024 to 1023)