How many bits need to be addressed to 32 bytes?

Sorry, this is a really stupid question, I just looked at the old exam documentation for my Operating Systems class and noticed that this question may occur so often. How can you answer this question? I really do not understand.

Another question:

What are the maximum and minimum unsigned integers that can be represented by 7 bits, 9 bits and 10 bits?

Can anyone tell me how you do it? Is it just 2 ^ 7?

Thank you so much!:)

+3
source share
3 answers

How many bits need to be addressed to 32 bytes?

5 ( 2 ^ 5 == 32). log2(32). , (32), , .

, 7 , 9 10 ?

unsigned int , . ints 2 ^ 7-1 (127), 2 ^ 9-1 (511) 2 ^ 10-1 (1023) .

.

+11

0 99 ? 2, ?

? ? - 100 , 10 100 (, : 10 _ = 100). , 100 , 0..99 , 1..100.

, , 2 10. ( , - smart-aleck, " 10".)

+3

Someone will correct me if I am wrong, but max unsigend ints (2 ^ x - 1)

+2
source

Source: https://habr.com/ru/post/1778477/


All Articles