chapter_5_beginning_javabook

0ch 41h 00h a variable of type char takes two bytes

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: memory. The value stored in this variable is 12 in the decimal numbering system. 0CH 41H 00H A variable of type char takes two bytes of memory. Here the variable stores the value 41H, the character code of uppercase letter A. 41H is 65 in the decimal system. D2H 04H 0EH Here, the two bytes of a variable of type short store the value 4D2H, which is 1234 in the decimal system. 6FH 05H 00H 4BH 09H A variable of type int reserves 4 bytes of memory. The value 56F0EH, or 356110, is stored by this variable. The four bytes 00H, 05H, 6FH, and 0EH are stored so that the least significant byte has the smallest memory address. F2H 14H 01H 00H 00H 00H 79H E9H A variable of type long reserves 8 bytes of memory. The value stored in this variable is 114F2094BH, or 4646373707. Also the bytes of a long variable are stored so that the more significant bytes come after the less significant bytes. The processors of personal computers generally store bytes of integral variables in this order, which is said to be the little-endian order. There a...
View Full Document

Ask a homework question - tutors are online