Get detailed and accurate answers to your questions on IDNLearn.com. Ask anything and receive prompt, well-informed answers from our community of experienced experts.

A computer program uses 4 bits to represent integers when the program adds the decimal numbers 5 and 11 the result is 0 why?

Sagot :

Answer:

Because the answer would be 16 which is 10000 in binary, and the 1 drops off because there are only 4 bits for the answer.

Explanation:

All calculations will be modulo 2^bits.

So 4 bit storage: calculations modulo 2^4=16

16 modulo 16 is 0.

17 modulo 16 is 1. etc., it wraps around after 15.