电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

ComputerSystems深入理解计算机系统

ComputerSystems深入理解计算机系统_第1页
1/89
ComputerSystems深入理解计算机系统_第2页
2/89
ComputerSystems深入理解计算机系统_第3页
3/89
Computer Systems: A Programmer’s PerspectiveInstructor’s Solution Manual 1Randal E. BryantDavid R. O’HallaronDecember 4, 20031Copyright c 2003, R. E. Bryant, D. R. O’Hallaron. All rights reserved.2Chapter 1Solutions to Homework ProblemsThe text uses two different kinds of exercises:Practice Problems. These are problems that are incorporated directlyinto the text, with explanatorysolutions at the end of each chapter. Our intention is that students will work on these problems as theyread the book. Each one highlights some particular concept.Homew ork Problems. These are found at the end of each chapter. Theyvaryin complexityfromsimple drills to multi-week labs and are designed for instructors to give as assignments or to use asrecitation examples.This document gives the solutions to the homework problems.1.1Chapter 1: A Tour of Computer Systems1.2Chapter 2: Representing and Manipulating InformationProblem 2.40 Solution:This exercise should be a straightforward variation on the existing code.2CHAPTER 1. SOLUTIONS TO HOMEW ORK PROBLEMS1011 void show_double(double x)12 {13show_bytes((byte_pointer) &x, sizeof(double));14 }code/data/show -ans.c1 int is_little_endian(void)2 {3/* MSB = 0, LSB = 1 */4int x = 1;56/* Return MSB when big-endian, LSB when little-endian */7return (int) (* (char *) &x);8 }1.2. CHAPTER 2: REPRESENTINGAND MANIPULATINGINFORMATION3There are many solutions to this problem, but it is a little bit tricky to write one that works for any wordsize. Here is our solution:code/data/shift-ans.cThe above code peforms a right shift of a word in which all bits are set to 1. If the shift is arithmetic, theresulting word will still have all bits set to 1.Problem 2.45 Solu tion:This problem illustrates some of the chall...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

ComputerSystems深入理解计算机系统

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部