CSAPP-3e icon indicating copy to clipboard operation
CSAPP-3e copied to clipboard

Solutions of Computer Systems: A Programmer's Perspective ,Third Edition

Results 10 CSAPP-3e issues
Sort by recently updated
recently updated
newest added

failed for test case: lower_one_mask(32) == 0xFFFFFFFF

/** P 3-61 long cread(long *xp) { return (xp ? *xp : 0); } Explain: The key point is to avoid * and xp come together. */ long cread_alt(long *xp)...

On my textbook, line 10 of the assembly code says "salq %cl, %rdx" and hence the reason for my pull request

Found a small mistake in the comment on the last line. Changed the high_y to sign_y

This code does not work properly when x contains most significant bit set to 1, e.g. `0xFFFFFFFF`. Maybe this solution might avoid this problem: 0. Main idea is to shift...

`long switch_prob(long x, long n) { long result = x; switch (n) { case 60: case 62: result = 8 * x; break; case 63: result = x >> 3;...

B (c) n should be 19/63

Line 4 is wrong. It should be $5 * 2^{-16}$ and $1 * 2^{-10}$

this answer is wrong

Current implementation of saturating_add: `return (-neg & INT_MIN) + (-pos & INT_MAX) ` always returns either INT_MAX or INT_MIN, even when there is no overflow. Proposed solution: `return (-neg &...