5
log2 200 = ln 200 ÷ ln 2 = 7.6... → need 8 bits. If a signed number is being stored, then 9 bits would be needed as one would be needed to indicate the sign of the number.
To represent the days of the week, you would need at least 3 bits. With 3 bits, you can represent up to 8 different values (2^3 = 8), which is sufficient to cover all 7 days of the week (Monday to Sunday). Each additional bit would double the number of possible values, but 3 bits are the minimum required to uniquely represent all 7 days.
Well, honey, to represent months of the year, you need at least 4 bits because you've got 12 months in a year, and you need 4 bits to represent numbers from 0 to 15. So, technically, you could do it with just 4 bits, but if you want to be fancy, you could use 5 bits for a more efficient representation.
byte has 8 bits all bits at 0 = zero all bits at 1 = 255
45 in binary is 101101, so you need at least 6 bits to represent 45 characters.
8 bits if unsigned, 9 bits if signed
how many bits are needed to represent decimal values ranging from 0 to 12,500?
5
log2 200 = ln 200 ÷ ln 2 = 7.6... → need 8 bits. If a signed number is being stored, then 9 bits would be needed as one would be needed to indicate the sign of the number.
1200
23 can be represented in binary as 10111 and would therefore require 5 bits to represent.
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.1 bit for 2,2 bits for 4,3 bits for 8,4 bits for 16.
Packing a lot of meaning into a small space
17 bits would allow a value up to 131071.
To represent the days of the week, you would need at least 3 bits. With 3 bits, you can represent up to 8 different values (2^3 = 8), which is sufficient to cover all 7 days of the week (Monday to Sunday). Each additional bit would double the number of possible values, but 3 bits are the minimum required to uniquely represent all 7 days.