Expanding these into binary we get bit patterns for x

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: 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 file <limits.h> defines 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 defines 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.

Ask a homework question - tutors are online