When set to 1 the represented value is negative and

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: .8, these different sizes allow different ranges of values to be represented. The C standard defines a minimum range of values each data type must be able to represent. As shown in the figure, a typical 32-bit machine uses a 32-bit representation for data types int and unsigned, even though the C standard allows 16-bit representations. As described in Figure 2.2, the Compaq Alpha uses a 64-bit 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.

Ask a homework question - tutors are online