0
Binary->HELLPP!!đ©
With all the bits being used to represent zero and positive integer values, what are the integers that can be represented by those bits? List them all from smallest to largest values.
10 Answers
+ 4
It could have 16 different values.
0001 0010 0100 1000
1 2 4 8
and so on
+ 4
Basically the amount of numbers binary can represent is infinite.
We could have like a binary string with 8 bits that repercents a number 01101011 which is 107.
Every bit has its decimal value which doubles on every bit starting from right to left.
64 + 32 + 8 + 2 + 1 is 107. 0 bits are ignored
+ 3
Take a look at BCD code
+ 2
If the first bit from the left repercents the sign then the actual number is half less.
With 4 bits we can have numbers between 0 and 15. But if the left bit is used for the sign we can then have number from -7 to 7.
We used 4 bits for number 15 but for negative -15 we actually need 5 bits.
0
so im on the website tutorialspoint.com; im confused on the question itself.. could you help
0
for instance i have 4 bits, so i would list all the possible combinations along with its value?
0
okay cool, one more question; then what if the leftmost bit being used to represent the sign, and the rest of the bits being used to represent integer values, what are the integers that can be represented by those bits
0
so that will be 2^5=32 combinations
0
Toni Isotalo
" Basically the amount of numbers binary can represent is infinite. "
Theoritically, yes. But in reality, for example, in a PC machine with 4GB ram and a custom library which allows you to define data type with ridiculosly huge size like 1GB for each data type, the underlying binary sequence is still finite.
That is, 1GB * 8 = 8 Gbit = 8,000,000,000 bits. 8 billion combination of 1's and 0's is still finite.
0
as i understand it depends on the data type and what those bits represent but in the simplest sense it depends mostly it depends on the number of bits used aproxximatly 2^n where n is the number of bits used in a (word? //standard size used in memory )