This preview shows page 1. Sign up to view the full content.
Unformatted text preview: .8, these different sizes allow different ranges of values to be represented. The C standard deﬁnes a minimum range of values each data type must be able to represent. As shown in the ﬁgure, a typical 32bit machine uses a 32bit representation for data types int and unsigned, even though the C standard allows 16bit representations. As described in Figure 2.2, the Compaq Alpha uses a 64bit word to represent long integers, giving an upper limit of over ½ ¢ ½¼½ for unsigned values, and a range of over ¦ ¾¾ ¢ ½¼½ for signed values.
New to C? Both C and C++ support signed (the default) and unsigned numbers. Java supports only signed numbers. End 2.2.2 Unsigned and Two’s Complement Encodings
Assume we have an integer data type of Û bits. We write a bit vector as either Ü, to denote the entire vector, or as ÜÛ ½ ÜÛ ¾ Ü¼ to denote the individual bits within the vector. Treating Ü as a number written in binary notation, we obtain the unsigned interpretation of Ü. We express this interpretat...
View
Full
Document
This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.
 Spring '10
 Schultz
 The American, Gulliver's Travels, 2.2.5 2.2.6 2.2.7 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5

Click to edit the document details