Home [CSAPP] Chapter 2: Data Representation
Post
Cancel

[CSAPP] Chapter 2: Data Representation

0. Bit-Level Operations in C

For Practice Problem 2.13, we take advantage of this property: x ^ y = (x & not(y)) | (not(x) & y)

xor_in_and_or

1. Integer number

1.1 Unsigned Encodings

Figure 2.12 shows the mapping, from bit vectors to ingeters.

xor_in_and_or


xor_in_and_or

UMax = 2^w - 1

1.2 Two’s-Complement Encodings

2. Float number

TBC.

Copyright: all contents are from CS:APP3e.

This post is licensed under CC BY 4.0 by the author.