Unformatted text preview: ve values. The other cases are the constants ½ and ¼. Note that ½ has the same bit representation as ÍÅ Ü Û —a string of all 1s. Numeric value ¼ is represented as a string of all 0s in both representations. The C standard does not require signed integers to be represented in two’s complement form, but nearly all machines do so. To keep code portable, one should not assume any particular range of representable values or how they are represented, beyond the ranges indicated in Figure 2.2. The C library ﬁle <limits.h> deﬁnes a set of constants delimiting the ranges of the different integer data types for the particular machine on which the compiler is running. For example, it deﬁnes constants INT_MAX, INT_MIN, and UINT_MAX describing the ranges of signed and unsigned integers. For a two’s complement machine where data type int has Û bits, these constants correspond to the values of ÌÅ Ü Û , ÌÅ Ò Û , and ÍÅ Ü Û . Practice Problem 2.12:
Assuming Û , we can assign a numeric value to each possible hex digit, assuming either an unsigned or two’s complemen...
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