324_Book - Computer Systems A Programmers Perspective...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
Computer Systems A Programmer’s Perspective 1 ( Beta Draft ) Randal E. Bryant David R. O’Hallaron November 16, 2001 1 Copyright c 2001, R. E. Bryant, D. R. O’Hallaron. All rights reserved.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
2
Background image of page 2
Contents Preface i 1 Introduction 1 1 .1 I n f o rm a t i o ni sB i t si nCo n t e x t ................................. 2 1 .2 P r o g r am sa r eT r a n s l a t e db yO t h e rP r o g r n t oD i f f e r e n tF o s............... 3 1 .3 I tP a y st oUn d e r s t a n dHowComp i l a t i o nSy s t em sW o r k.................... 4 1.4 Processors Read and Interpret Instructions Stored in Memory. ................ 5 1 .4 .1 H a r dw a r eO r g a n i z a t i o no faSy s t em . ......................... 5 1.4.2 Running the hello P r o g r am . ............................ 8 1 .5 C a c h e sM a t t e r.......................................... 9 1 .6 S t o r a g eD e v i c e sF o rmaH i e r a r c h y............................... 1 0 1 .7 Th eOp e r a t i n gSy s t emM a n a g e h eH a r a r e......................... 1 1 1.7.1 Processes . ....................................... 1 3 1 .7 .2 Th r e a d s......................................... 1 4 1.7.3 Virtual Memory . . ................................... 1 4 1 .4 F i l e s........................................... 1 5 1 .8 Sy s t sCommu n i c a t eW i t hO t h e rSy s t sU s i n gN e tw o r k s ................. 1 6 1 .9 Summ a r y ............................................ 1 8 I Program Structure and Execution 19 2 Representing and Manipulating Information 21 2 n f o a t i o nS t o r a g e....................................... 2 2 2 .1 e x a d e c im a lNo t a t i o n ................................. 2 3 2 .2 W o r d s.......................................... 2 5 3
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
4 CONTENTS 2 .1 .3 D a t aS i z e s........................................ 2 5 2.1.4 Addressing and Byte Ordering . ............................ 2 6 2.1.5 Representing Strings . ................................. 3 3 2.1.6 Representing Code . .................................. 3 3 2 .7 Bo o l e a nA l g e b r a sa n dR i n g s.............................. 3 4 2.1.8 Bit-Level Operations in C . . ............................. 3 7 2 .9 Lo g i c a lOp e r a t i o n si nC . ............................... 3 9 2 0 Sh i f tOp e r a t i o n nC. 4 0 2.2 Integer Representations . . ................................... 4 1 2 .2 .1 I n t e g r a lD a t aT y p e s................................... 4 1 2 .2 Un s i g n e da n dTw o sComp l em e n tEn c o d i n g s ..................... 4 1 2 .3 Co n v e r s i o n sB e tw e e nS i g n e n dUn s i g n e d...................... 4 5 2 .4 S i g n e dv s .Un s i g n e di 4 7 2.2.5 Expanding the Bit Representation of a Number . . .................. 4 9 2 .6 T r u n c a t i n gNumb e r s .................................. 5 1 2 .7 Ad v i c eo i g n e s s i g n e d ............................ 5 2 2.3 Integer Arithmetic . ....................................... 5 3 2.3.1 Unsigned Addition . 5 3 2.3.2 Two’s Complement Addition . ............................. 5 6 2 .3 .3 Tw o l e n tN e g a t i o n.............................. 6 0 2.3.4 Unsigned Multiplication . 6 1 2.3.5 Two’s Complement Multiplication. .......................... 6 2 2.3.6 Multiplying by Powers of Two . 6 3 2 .7 D i v i d i n gb yPow e r so fTw o .............................. 6 4 2 .4 F l o a t i n gPo i n t.......................................... 6 6 2 .4 .1 F r a c t i o n a lB i n a r yNumb e r s............................... 6 7 2.4.2 IEEE Floating-Point Representation . . ........................ 6 9 2 .3 Ex amp l eNumb e r s ................................... 7 1 2.4.4 Rounding . 7 4 2 .5 F l o a t i n g -Po i n e r a t i o n s ............................... 7 6 2 .6 F l o a t i n i n ti 7 7 2 .5 Summ a r y ............................................ 7 9
Background image of page 4
CONTENTS 5 3 Machine-Level Representation of C Programs 89 3 .1 AH i s t o r i c a lP e r s p e c t i v e .................................... 9 0 3 .2 P r o g r amEn c o d i n g s....................................... 9 2 3 .2 .1 M a c h i n e -L e v e lCo d e.................................. 9 3 3 .2 Co d eEx amp l e s..................................... 9 4 3.2.3 A Note on Formatting . ................................ 9 7 3 .3 D a t aF o rm a t s .......................................... 9 8 3.4 Accessing Information . . ................................... 9 9 3 .4 .1 Op e r a n dSp e c ifi e r s................................... 1 0 0 3 .2 D a t aMo v em e n tI n s t r u c t i o n s..............................
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 783

324_Book - Computer Systems A Programmers Perspective...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online