Unformatted text preview: three "pictures" of the
same memory locations. This last
picture describes the situation when
all statements of program
Game.java are executed. If 1234
was the value given from the keyboard, the value of variable
one_larger_integer is 1235,
4D3H, at the end. 12F8BEH: ??H ??H ??H 12F8BFH: ??H ??H ??H 12F8C0H: ??H ??H D3H 12F8C1H: ??H ??H 04H 12F8C2H: ??H ??H 00H 12F8C3H: ??H ??H 00H 12F8C4H: ??H D2H D2H 12F8C5H: ??H 04H 04H 12F8C6H: ??H 00H 00H 12F8C7H: ??H 00H 00H 12F8C8H: ??H ??H ??H 12F8C9H: ??H ??H ??H These four bytes are
reserved for variable
integer_from_keyboard. That variable has memory address
12F8C4H. Here the memory locations are shown right after a value
is given from the keyboard. We suppose that the given
value is 1234, which is 4D2H as a hexadecimal number.
In personal computers and many other computers, the
four bytes of an int variable are stored so that the least
significant byte is in a memory location that has the
smallest numerical address. The three other bytes are in
subsequent memory locations. 11010010
00000000 As each memory location is an
8-bit memory cell,...
View Full Document
This document was uploaded on 01/20/2014.
- Winter '14