chapter_5_beginning_javabook

Normally we do not need to worry about the order in

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: re processors which use the opposite order, the big-endian order of bytes. Normally we do not need to worry about the order in which bytes of integral variables are stored because the processor automatically writes and reads the bytes in correct order. F6H 42H 77H BEH A variable of type float takes 4 bytes of memory. float is the single-precision floating-point type. Here, the value 123.456 is stored by a float variable, but as the numerical value is encoded in a special way into the 32 bits, we cannot easily read the content of the variable. 9FH 1AH 2FH DDH 5EH 40H A variable of type double, the double-precision floating-point variable, takes 8 bytes of memory. Here, a double variable is used to store the value 123.456 which is encoded into the 64 bits. We do not need to know the details about how numerical values are stored in floatingpoint variables because the compiler takes care of correct encoding and decoding of the numerical values. A note for experienced programmers: When memory is reserved for the "small" variables (e.g. type byte), it is possible that the vari...
View Full Document

This document was uploaded on 01/20/2014.

Ask a homework question - tutors are online