how many bits are needed to represent decimal values ranging from 0 to 12,500?
8
As many as required for the accuracy needed
1 byte = 8 bits
Assuming it is an unsigned int (i.e. no negatives) it would be 11111111111 which is 2047. Another way to think about it is 11bits can represent 2048 different values, and since it starts at 0 that would be 2048 - 1 which is 2047.
how many bits are needed to represent decimal values ranging from 0 to 12,500?
5
1200
8
8 (assuming unsigned numbers - i.e., you don't reserve a bit for the sign).
103
45 in binary is 101101, so you need at least 6 bits to represent 45 characters.
Count them: 643(10)=1010000011(2)
18 in binary is 10010 Since 18 can't be written in term of 2 to the power x, the number of bits needed is 5. The answer is 5
4 bits. 24 = 16, so you have 16 different combinations.4 bits. 24 = 16, so you have 16 different combinations.4 bits. 24 = 16, so you have 16 different combinations.4 bits. 24 = 16, so you have 16 different combinations.
10 bits would be required. 10 bits long (10 digits long) can represent up to 1024.
There are 16 decimal numbers that can be represented by 4-bits.