according wikipedia,
32-bit registers can store 232 different values different values. goes further saying " 2 common representations, range 0 through 4,294,967,295 (232 - 1) representation (unsigned) binary number, , -2,147,483,648 (-231) through 2,147,483,647 (231 - 1) representation two's complement"
so how translate real example?
a. mean can store 0 , 1 , 2 , 3 , 4 .... 4,294,967,295 in 32 bit register?
b. if wanted store same number, in same register 4294967296 times. can that?
c. there way appropriately calculate when start overflowing? don't know if each integer has specific number of bits (like price tag) can add calculate when start overflowing.
- no. means can store value 0 or 1 or 2 ... or 4,294,967,295 in register.
- yes, although storing same value once suffice register can read infinite number of times.
- virtually microprocessors implement carry flag set when result of arithmetic operation (such adding 2 numbers) cannot stored in answer register due insufficient bit depth. can used form of overflow detection in assembly language.
Comments
Post a Comment