深入理解计算机系统第三版答案第二章,深入理解计算机系统习题答案.pdf

Computer Systems: A Programmer’s Perspective

Instructor’s Solution Manual 1

Randal E. Bryant

David R. O’Hallaron

December 4, 2003

1Copyright c 2003, R. E. Bryant, D. R. O’Hallaron. All rights reserved.

2

Chapter 1

Solutions to Homework Problems

The text uses two different kinds of exercises:

Practice Problems. These are problems that are incorporated directly into the text, with explanatory

solutions at the end of each chapter. Our intention is that students will work on these problems as they

read the book. Each one highlights some particular concept.

Homework Problems. These are found at the end of each chapter. They vary in complexity from

simple drills to multi-week labs and are designed for instructors to give as assignments or to use as

recitation examples.

This document gives the solutions to the homework problems.

1.1 Chapter 1: A Tour of Computer Systems

1.2 Chapter 2: Representing and Manipulating Information

Problem 2.40 Solution:

This exercise should be a straightforward variation on the existing code.

code/data/show-ans.c

1 void show_short(short int x)

2 {

3 show_bytes((byte_pointer) &x, sizeof(short int));

4 }

5

6 void show_long(long int x)

7 {

8 show_bytes((byte_pointer) &x, sizeof(long));

9 }

1

2 CHAPTER 1. SOLUTIONS TO HOMEWORK PROBLEMS

10

11 void show_double(double x)

12 {

13 show_bytes((byte_pointer) &x, sizeof(double));

14 }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值