Write Great Code, Volume 1, 2nd Edition cover

Write Great Code, Volume 1, 2nd Edition

Understanding the Machine
by Randall Hyde
August 2020, 472 pp.
ISBN-13: 
9781718500365

Look Inside!

WGC_v1-2edWriteGreatCode_v1-2edWriteGreatCode_v1-2edWriteGreatCode_v1-2edWriteGreatCode_v1-2edWriteGreatCode_v1-2edWrite Great Code 1

Download Chapter 2: NUMERIC REPRESENTATION


Check out the book's support forum here.


MACHINE ARCHITECTURE FOR MERE MORTALS

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
Author Bio 

Randall Hyde is the author of The Art of Assembly Language, one of the most highly recommended resources on assembly, and the three volume Write Great Code series (all No Starch Press). He is also the co-author of The Waite Group's MASM 6.0 Bible. He has written for Dr. Dobb’s Journal, Byte, as well as professional journals.

Table of contents 

Chapter 1: What You Need to Know to Write Great Code
Chapter 2: Numeric Representation
Chapter 3: Binary Arithmetic and Bit Operations
Chapter 4: Floating-Point Representation
Chapter 5: Character Representation
Chapter 6: Memory Organization and Access
Chapter 7: Composite Data Types and Memory Objects
Chapter 8: Boolean Logic and Digital Design
Chapter 9: CPU Architecture
Chapter 10: Instruction Set Architecture
Chapter 11: Memory Architecture and Organization
Chapter 12: Input and Output
Chapter 13: Computer Peripheral Buses
Chapter 14: Mass Storage Devices and Filesystems
Chapter 15: Miscellaneous Input and Output Devices
Afterword: Thinking Low-Level, Writing High-Level
Appendix A: ASCII Character Set
Glossary

View the detailed Table of Contents

Reviews 

"Sooner or later it makes sense to get a grip on what happens underneath the interpreter and compiler, even below the abstraction layer that the operating system provides. . . . This book leads you a part of the way to this knowledge. In a clear and understandable writing that makes it a joy to read."
—Thomas Manthey, Amazon Reviewer

Praise for the first edition of Write Great Code, Volume 1:

"Today's programmers can hardly keep up with the race against inhumane deadlines and new technologies; therefore, they rarely have a chance to learn the basics of computer architectures and the inner-working of their programming languages. This book fills in the gaps. I strongly recommend it."
—InformIT.com

Write Great Code "isn't your typical 'teach yourself to program' book. . . It's relevant to all languages, and all levels of programming experience. . . Run, don't walk, to buy and read this book."
—Bay Area Large Installation System Administrators (BayLISA)

5/5 stars: "[Write Great Code] fills in the blanks nicely and really could be part of a Computer Science degree required reading set... Once this book is read, you will have a greater understanding and appreciation for code that is written efficiently - and you may just know enough to do that yourself. At least you will have a great start at the art of crafting efficient software."
—MacCompanion

"Great fun to read."
—VSJ Magazine

"Write Great Code: Understanding the Machine should be on the required reading list for anyone who wants to develop terrific code in any language without having to learn assembly language."
—WebServerTalk

Extra Stuff 
  • Download the 1st Edition source code.
  • View the errata for the 1st Edition here
  • .