Muutke küpsiste eelistusi

Introduction to Computer Organization: An Under the Hood Look at Hardware and x86-64 Assembly [Pehme köide]

  • Formaat: Paperback / softback, 512 pages, kõrgus x laius: 234x177 mm
  • Ilmumisaeg: 25-Jan-2022
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1718500092
  • ISBN-13: 9781718500099
Teised raamatud teemal:
  • Formaat: Paperback / softback, 512 pages, kõrgus x laius: 234x177 mm
  • Ilmumisaeg: 25-Jan-2022
  • Kirjastus: No Starch Press,US
  • ISBN-10: 1718500092
  • ISBN-13: 9781718500099
Teised raamatud teemal:
Tutorial-style book provides an introductory "look under the hood" of a modern computer. Covers fundamental topics like data storage formats, computer arithmetic, basic data types, logic gates and circuits, and the CPU.

Unlike other books about assembly language and computer organization, Introduction to Computer Organization is written with the understanding that most programmers will never have to write x86-64 assembly language or design hardware. This book is written to give those programmers a practical and concrete understanding of what's happening in a computer in the hopes that that knowledge will help them become a better programmer in their chosen field. Readers learn how transistors are used to construct the binary switches that are used to implement the logic circuits that make up a computer; how these circuits are programmed to implement basic programming constructs; and how data items are organized and manipulated. By the end of the book readers should have a strong understanding of how binary is used to store data; how Boolean logic works, and how it's implemented in a computer; the basics of computer hardware; assembly language; program flow; and Input/Output.

Arvustused

"A really good assembly language learning resource for x86-64 using Linux and GNU tools." @Jobutex

Muu info

Tutorial-style book provides an introductory "look under the hood" of a modern computer. Covers fundamental topics like data storage formats, computer arithmetic, basic data types, logic gates and circuits, and the CPU.
Preface xv
Who This Book Is For xv
About This Book xvi
The Programming in the Book xvi
Why Read This Book? xvii
Chapter Organization xvii
Efficient Use of This Book xix
Acknowledgments xxi
Chapter 1 Setting the Stage
1(8)
Computer Subsystems
1(1)
Program Execution
2(2)
The Programming Environment
4(2)
What You've Learned
6(3)
Chapter 2 Data Storage Formats
9(30)
Describing Switches and Groups of Switches
10(1)
Representing Switches with Bits
10(1)
Representing Groups of Bits
10(2)
Using Hexadecimal Digits
12(1)
The Mathematical Equivalence of Binary and Decimal
13(1)
Getting to Know Positional Notation
13(2)
Converting Binary to Unsigned Decimal
15(1)
Converting Unsigned Decimal to Binary
16(2)
Storing Data in Memory
18(1)
Expressing Memory Addresses
19(1)
Characters
20(3)
Unsigned Integers
23(2)
Exploring Data Formats with C
25(1)
C and C++ I/O Libraries
25(2)
Writing and Executing Your First C Program
27(3)
Examining Memory with a Debugger
30(1)
Using Your Debugger
31(4)
Understanding Byte Storage Order in Memory
35(1)
What You've Learned
36(3)
Chapter 3 Computer Arithmetic
39(18)
Adding and Subtracting Unsigned Integers
40(1)
Adding in the Decimal Number System
40(1)
Subtracting in the Decimal Number System
41(2)
Adding and Subtracting Unsigned Integers in Binary
43(2)
Adding and Subtracting Signed Integers
45(1)
Two's Complement
45(3)
Computing Two's Complement
48(2)
Adding and Subtracting Signed Integers in Binary
50(3)
Circular Nature of Integer Codes
53(2)
What You've Learned
55(2)
Chapter 4 Boolean Algebra
57(32)
Basic Boolean Operators
58(2)
Boolean Expressions
60(1)
Boolean Algebra Rules
61(1)
Boolean Algebra Rules That Are the Same as Elementary Algebra
61(2)
Boolean Algebra Rules That Differ from Elementary Algebra
63(3)
Boolean Functions
66(1)
Canonical Sum or Sum of Minterms
67(2)
Canonical Product or Product of Maxterms
69(1)
Comparison of Canonical Boolean Forms
70(1)
Boolean Expression Minimization
71(1)
Minimal Expressions
71(2)
Minimization Using Algebraic Manipulations
73(3)
Minimization Using Karnaugh Maps
76(10)
Combining Basic Boolean Operators
86(2)
What You've Learned
88(1)
Chapter 5 Logic Gates
89(24)
Crash Course in Electronics
90(1)
Power Supplies and Batteries
90(1)
Passive Components
91(9)
Transistors
100(1)
MOSFET Switch
101(3)
CMOS Switch
104(3)
NAND and NOR Gates
107(1)
NAND as a Universal Gate
108(3)
What You've Learned
111(2)
Chapter 6 Combinational Logic Circuits
113(22)
The Two Classes of Logic Circuits
114(1)
Adders
115(1)
Half Adder
115(1)
Full Adder
116(1)
Full Adder from Two Half Adders
117(2)
Ripple-Carry Addition and Subtraction Circuits
119(2)
Decoders
121(3)
Multiplexers
124(1)
Tristate Buffer
125(2)
Programmable Logic Devices
127(1)
Programmable Logic Array
128(2)
Read-Only Memory
130(1)
Programmable Array Logic
131(2)
What You've Learned
133(2)
Chapter 7 Sequential Logic Circuits
135(28)
Latches
136(1)
SR Latch Using NOR Gates
136(3)
SR Latch Using NAND Gates
139(2)
SR Latch with Enable
141(1)
The D Latch
142(2)
Flip-Flops
144(1)
Clocks
144(1)
D Flip-Flop
145(2)
T Flip-Flop
147(1)
JK Flip-Flop
148(3)
Designing Sequential Logic Circuits
151(1)
Designing a Counter
152(4)
Designing a Branch Predictor
156(5)
What You've Learned
161(2)
Chapter 8 Memory
163(14)
The Memory Hierarchy
163(1)
Mass Storage
164(1)
Main Memory
165(1)
Cache Memory
166(2)
Registers
168(1)
Implementing Memory in Hardware
168(1)
Four-Bit Register
168(3)
Shift Register
171(1)
Register File
172(1)
Read-Write Memory
172(1)
Static Random-Access Memory
173(2)
Dynamic Random-Access Memory
175(1)
What You've Learned
176(1)
Chapter 9 Central Processing Unit
177(18)
CPU Overview
178(1)
CPU Subsystems
178(2)
Instruction Execution Cycle
180(2)
x86-64 Registers
182(1)
General-Purpose Registers
183(3)
Status Register
186(1)
C/C++ Integral Data Types and Register Sizes
187(1)
Using gdb to View the CPU Registers
188(5)
What You've Learned
193(2)
Chapter 10 Programming in Assembly Language
195(26)
Compiling a Program Written in C
196(1)
From C to Assembly Language
197(2)
Assembler Directives That We Won't Use
199(3)
Assembler Directives That We Will Use
202(1)
Creating a Program in Assembly Language
203(1)
Assembly Language in General
204(1)
First Assembly Language Instructions
205(3)
Minimal Processing in a Function
208(2)
Using gdb to Learn Assembly Language
210(7)
AT&T Syntax
217(1)
What You've Learned
218(3)
Chapter 11 Inside the Main Function
221(24)
The write and read System Call Functions
222(1)
Passing Arguments in Registers
223(2)
Position-Independent Code
225(2)
The Call Stack
227(1)
Stacks in General
227(2)
Inside the Function Prologue and Epilogue
229(4)
Local Variables in a Function
233(1)
Variables on the Stack
234(3)
Stack Corruption
237(4)
Not Using the C Runtime Environment
241(2)
What You've Learned
243(2)
Chapter 12 Instruction Details
245(18)
Looking at Machine Code
246(1)
Instruction Bytes
247(1)
Opcode Bytes
247(1)
ModR/MByte
248(2)
REX Prefix Byte
250(1)
Immediate Addressing Mode
250(2)
Memory Addressing Modes
252(1)
Direct Memory Addressing
252(1)
Register Indirect with Offset
253(2)
Register Indirect with Indexing
255(1)
SIB Byte
255(1)
Jump Instructions
256(2)
Assemblers and Linkers
258(1)
The Assembler
258(2)
The Linker
260(1)
What You've Learned
261(2)
Chapter 13 Control Flow Constructs
263(24)
Jumps
264(1)
Unconditional Jumps
264(1)
Conditional Jumps
265(2)
Iteration
267(1)
While Loop
267(5)
For Loop
272(2)
do-while Loop
274(2)
Selection
276(1)
If Conditional
276(2)
if-then-else Conditional
278(4)
Switch Conditional
282(4)
What You've Learned
286(1)
Chapter 14 Inside Subfunctions
287(32)
Scope of Variable Names in C
288(1)
Overview of Passing Arguments
289(1)
Global Variables
290(4)
Explicitly Passing Arguments
294(1)
Passing Arguments in C
294(2)
What's Going On in Assembly Language
296(3)
Handling More Than Six Arguments
299(1)
Pushing Arguments onto the Stack
299(4)
Storing Arguments Directly on the Stack
303(3)
Summary of Stack Frame Usage
306(3)
Static Local Variables
309(9)
What You've Learned
318(1)
Chapter 15 Special Uses of Subfunctions
319(16)
Recursion
319(7)
Accessing CPU Features in Assembly Language
326(1)
A Separate Function Written in Assembly Language
326(6)
Inline Assembly Language
332(2)
What You've Learned
334(1)
Chapter 16 Computing With Bitwise Logic, Multiplication, and Division Instructions
335(36)
Bit Masking
335(1)
Bit Masking in C
336(3)
Logic Instructions
339(1)
Bit Masking in Assembly Language
340(3)
Shifting Bits
343(1)
Shifting Bits in C
343(4)
Shift Instructions
347(2)
Shifting Bits in Assembly Language
349(3)
Multiplication
352(1)
Multiplication in C
352(3)
Multiply Instructions
355(2)
Multiplication in Assembly Language
357(3)
Division
360(1)
Division in C
360(4)
Division Instructions
364(2)
Division in Assembly Language
366(4)
What You've Learned
370(1)
Chapter 17 Data Structures
371(24)
Arrays
272(100)
Arrays in C
372(4)
Arrays in Assembly Language
376(4)
Records
380(1)
Records in C
380(2)
Records in Assembly Language
382(1)
Passing Records to Other Functions in C
383(6)
Passing Records to Other Functions in Assembly Language
389(5)
What You've Learned
394(1)
Chapter 18 Object-Oriented Programming
395(20)
Objects in C++
396(2)
Using Objects in C++
398(3)
Defining Class Member Functions
401(4)
Letting the Compiler Write a Constructor and Destructor
405(2)
Objects in Assembly Language
407(6)
What You've Learned
413(2)
Chapter 19 Fractional Numbers
415(28)
Fractional Values in Binary
416(1)
Fixed-Point Numbers
417(1)
When the Fractional Part Is a Sum of Inverse Powers of Two
417(4)
When the Fractional Part Is in Decimal
421(4)
Floating-Point Numbers
425(1)
Floating-Point Representation
425(1)
IEEE 754 Floating-Point Standard
426(1)
SSE2 Floating-Point Hardware
427(1)
XMM Registers
428(2)
Programming with Floating-Point Numbers
430(3)
Floating-Point Arithmetic Errors
433(7)
Comments About Numerical Accuracy
440(1)
What You've Learned
441(2)
Chapter 20 Input/Output
443(22)
Timing Considerations
444(1)
Memory Timing
444(1)
I/O Device Timing
444(1)
Bus Timing
445(1)
Accessing I/O Devices
446(1)
Port-Mapped I/O
447(1)
Memory-Mapped I/O
447(2)
I/O Programming
449(1)
Polled I/O
449(1)
Interrupt-Driven I/O
449(1)
Direct Memory Access
450(1)
Polled I/O Programming Algorithms
450(2)
UART Memory-Mapped I/O in C
452(5)
UART Memory-Mapped I/O in Assembly Language
457(3)
UART Port-Mapped I/O
460(4)
What You've Learned
464(1)
Chapter 21 Interrupts and Exceptions
465(12)
Privilege Levels
466(1)
CPU Response to an Interrupt or Exception
467(1)
External Interrupts
468(1)
Exceptions
469(1)
Software Interrupts
469(1)
System Calls
470(1)
The int 0×80 Software Interrupt
470(2)
The syscall Instruction
472(2)
What You've Learned
474(3)
Index 477
Bob Plantz started his career designing electronics for the horizon scanners on the Gemini spacecraft and Apollo Lunar Module. He earned his PhD in electrical engineering at the University of California Berkeley and worked as a software engineer for eight years before becoming an educator. He was a professor at Sonoma State University for 21 years.