The Basics of Computer Arithmetic Made Enjoyable and
Accessible-with a Special Program Included for Hands-on
Learning
‘The combination of this book and its associated virtual computer
is fantastic! Experience over the last fifty years has shown me
that there’s only one way to truly understand how computers work;
and that is to learn one computer and its instruction set-no matter
how simple or primitive-from the ground up. Once you fully
comprehend how that simple computer functions, you can easily
extrapolate to more complex machines.’
-Fred Hudson, retired engineer/scientist
‘This book-along with the virtual DIY Calculator-is an incredibly
useful teaching and learning tool. The interesting trivia nuggets
keep you turning the pages to see what’s next. Students will have
so much fun reading the text and performing the labs that they
won’t even realize they are learning.’
-Michael Haghighi, Chairperson of the Business and Computer
Information Systems Division, Calhoun Community College,
Alabama
‘At last, a book that presents an innovative approach to the
teaching of computer architecture. Written with authority and
verve, witty, superbly illustrated, and enhanced with many
laboratory exercises, this book is a must for students and teachers
alike.’
-Dr. Albert Koelmans, Lecturer in Computer Engineering, University
of Newcastle upon Tyne, UK, and the 2003 recipient of the
EASIT-Eng. Gold Award for Innovative Teaching in Computer
Engineering
Packed with nuggets of information and tidbits of trivia, How
Computers Do Math provides an incredibly fun and interesting
introduction to the way in which computers perform their magic in
general and math in particular. The accompanying CD-ROM contains a
virtual computer/calculator called the DIY Calculator, and the
book’s step-by-step interactive laboratories guide you in the
creation of a simple program to run on your DIY Calculator.
How Computers Do Math can be enjoyed by non-technical individuals;
students of computer science, electronics engineering, and
mathematics; and even practicing engineers. All of the
illustrations and interactive laboratories featured in the book are
provided on the CD-ROM for use by high school, college, and
university educators as lecture notes and handouts.
For online resources and more information please visit the
author’s website at href=’http://www.diycalculator.com/’>www.DIYCalculator.com.
表中的内容
Laboratories ix
Do You Speak Martian? xi
Chapter 0 Why This Book is So Cool 1
This is where we discover just why this book is so cool, and also why this chapter is numbered ‘0.’
Chapter 1 Introducing Binary and Hexadecimal Numbers 7
In this chapter we introduce the concepts of the binary and hexadecimal number systems (but in a much more interesting manner than most computer books).
Chapter 2 Computers and Calculators 23
Here we rampage through the insides of a simple computer and calculator, and we also meet our virtual DIY Calculator.
Chapter 3 Subroutines and Other Stuff 35
In this smorgasbord of a chapter, we first discuss logical, shift, and rotate instructions; then we plunge headfirst into the stack, subroutines, recursion, and the concept of selfmodifying code.
Chapter 4 Integer Arithmetic 69
This is where we learn the concepts of signed and unsigned binary arithmetic, and multibyte data representations. In the labs associated with this chapter we create some integer-based math subroutines for use in Chapter 5.
Chapter 5 Creating an Integer Calculator 123
This is where things really start to get interesting because we use the subroutines we developed in Chapter 4 to implement a simple four-function integer calculator.
Chapter 6 More Functions and Experiments 135
This may be the last chapter, but turn that frown upside down into a smile because this is where we discover additional projects you can undertake, and also how you can compete with other readers to create better math routines for your DIY Calculator.
Interactive Laboratories 155-412
This is where you will find the interactive laboratories associated with Chapters 2 through 5 (see more details on page ix).
Appendix A Installing Your DIY Calculator 413
In this appendix, we learn how to install the virtual DIY Calculator presented on the CD-ROM accompanying this book.
Appendix B Addressing Modes 417
Here we learn about the various addressing modes supported by the virtual microprocessor powering the DIY Calculator.
Appendix C Instruction Set Summary 429
The tables in this appendix are useful for quickly determining which instructions are available with which addressing modes.
Appendix D Additional Resources 433
There is a wealth of additional resources for individual readers and educators on the CD-ROM accompanying the book and from the DIY Calculator’s website. Also, there are lots of other really interesting books to read. This appendix explains it all.
About the Authors 441
Acknowledgments 443
Index 445
关于作者
CLIVE ‘MAX’ MAXFIELD is a bestselling author and engineer with a large following in the electronic design automation (EDA) and embedded systems industries. He is also one of the founders and President of the high-technology marketing consultancy Tech Bites (www.Tech Bites.com).
ALVIN BROWN has spent over thirty years working in the electronics and computing industries. He currently acts as an engineering manager supervising remote development groups around the world.