Book description
This, the first volume in Randall Hyde’s Write Great Code series, dives into machine organization without the extra overhead of learning assembly language programming. Written for high-level language programmers, Understanding the Machine fills in the low-level details of machine organization that are often left out of computer science and engineering courses.
Learn:
•How the machine represents numbers, strings, and high-level data structures, so you’ll know the inherent cost of using them.
•How to organize your data, so the machine can access it efficiently.
•How the CPU operates, so you can write code that works the way the machine does.
•How I/O devices operate, so you can maximize your application’s performance when accessing those devices.
•How to best use the memory hierarchy to produce the fastest possible programs.
Great code is efficient code. But before you can write truly efficient code, you must understand how computer systems execute programs and how abstractions in programming languages map to the machine’s low-level hardware. After all, compilers don’t write the best machine code; programmers do. This book gives you the foundation upon which all great software is built.
NEW IN THIS EDITION, COVERAGE OF:
•Programming languages like Swift and Java
•Code generation on modern 64-bit CPUs
•ARM processors on mobile phones and tablets
•Newer peripheral devices
•Larger memory systems and large-scale SSDs
Table of contents
- Cover Page
- Title Page
- Copyright Page
- About the Author
- About the Technical Reviewer
- BRIEF CONTENTS
- CONTENTS IN DETAIL
- ACKNOWLEDGMENTS
- 1 WHAT YOU NEED TO KNOW TO WRITE GREAT CODE
-
2 NUMERIC REPRESENTATION
- 2.1 What Is a Number?
- 2.2 Numbering Systems
- 2.3 Numeric/String Conversions
- 2.4 Internal Numeric Representation
- 2.5 Signed and Unsigned Numbers
- 2.6 Useful Properties of Binary Numbers
- 2.7 Sign Extension, Zero Extension, and Contraction
- 2.8 Saturation
- 2.9 Binary-Coded Decimal Representation
- 2.10 Fixed-Point Representation
- 2.11 Scaled Numeric Formats
- 2.12 Rational Representation
- 2.13 For More Information
- 3 BINARY ARITHMETIC AND BIT OPERATIONS
- 4 FLOATING-POINT REPRESENTATION
- 5 CHARACTER REPRESENTATION
- 6 MEMORY ORGANIZATION AND ACCESS
- 7 COMPOSITE DATA TYPES AND MEMORY OBJECTS
- 8 BOOLEAN LOGIC AND DIGITAL DESIGN
- 9 CPU ARCHITECTURE
- 10 INSTRUCTION SET ARCHITECTURE
-
11 MEMORY ARCHITECTURE AND ORGANIZATION
- 11.1 The Memory Hierarchy
- 11.2 How the Memory Hierarchy Operates
- 11.3 Relative Performance of Memory Subsystems
- 11.4 Cache Architecture
- 11.5 NUMA and Peripheral Devices
- 11.6 Virtual Memory, Memory Protection, and Paging
- 11.7 Writing Software That Is Cognizant of the Memory Hierarchy
- 11.8 Runtime Memory Organization
- 11.9 For More Information
-
12 INPUT AND OUTPUT
- 12.1 Connecting a CPU to the Outside World
- 12.2 Other Ways to Connect Ports to the System
- 12.3 I/O Mechanisms
- 12.4 I/O Speed Hierarchy
- 12.5 System Buses and Data Transfer Rates
- 12.6 Buffering
- 12.7 Handshaking
- 12.8 Timeouts on an I/O Port
- 12.9 Interrupts and Polled I/O
- 12.10 Protected-Mode Operation and Device Drivers
- 12.11 For More Information
- 13 COMPUTER PERIPHERAL BUSES
- 14 MASS STORAGE DEVICES AND FILESYSTEMS
- 15 MISCELLANEOUS INPUT AND OUTPUT DEVICES
- AFTERWORD: THINKING LOW-LEVEL, WRITING HIGH-LEVEL
- A ASCII CHARACTER SET
- GLOSSARY
- INDEX
Product information
- Title: Write Great Code, Volume 1, 2nd Edition
- Author(s):
- Release date: August 2020
- Publisher(s): No Starch Press
- ISBN: 9781718500365
You might also like
book
C Programming Language, 2nd Edition
This book is meant to help the reader learn how to program in C. It is …
book
Five Lines of Code
In Five Lines of Code you will learn: The signs of bad code Improving code safely, …
book
Effective Modern C++
Coming to grips with C++11 and C++14 is more than a matter of familiarizing yourself with …
book
Write Great Code, Volume 2, 2nd Edition
Today’s programming languages offer productivity and portability, but also make it easy to write sloppy code …