The Definitive Guide to How Computers Do Math : Featuring the Virtual DIY Calculator

The Definitive Guide to How Computers Do Math : Featuring the Virtual DIY Calculator

Clive Maxfield

Language: English

Pages: 464

ISBN: 0471732788

Format: PDF / Kindle (mobi) / ePub


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 www.DIYCalculator.com.

 

Numerical Methods for Ordinary Differential Equations: Initial Value Problems (Springer Undergraduate Mathematics Series)

Evolutionary Optimization Algorithms

Distributions, Partial Differential Equations, and Harmonic Analysis (Universitext)

Foundations of Modern Probability

 

 

 

 

 

 

 

 

 

 

 

 

accumulator every time we call this particular subroutine. As an alternative, we can remove the push and pop instructions from the main body of the program and relocate them into the subroutine itself as follows (note the lines highlighted in gray): SUBROUTINES : LDA $3F # Load ACC with ASCII code for “?” JSR [CLEAR] # JSR = “Jump to subroutine” AFTER: STA [MAINDISP] # Copy ACC to display : : # Body of the program : ########## Start of “clear display” subroutine CLEAR: PUSHA # Push the ACC

SUBA subsequently calls itself, then this would be a classic example of recursion. In the case where the recursion involves a series of subroutines— for example, subroutine SUBA calls subroutine SUBB, and then SUBB 63 64 SUBROUTINES AND OTHER STUFF calls SUBA, then SUBA calls SUBB again, and so on—this group of subroutines are said to be “mutually recursive.” The canonical example of a recursive function is a factorial. For example, 5! (which indicates “the factorial of 5”) is evaluated as 5

rather than subtracting 1 from the 6 in the hundred’s column of the minuend to leave 5, we instead add 1 to the 2 in the hundreds column of the subtrahend to give 3. Thus, when we come to the hundred’s column, we now perform the operation 6 – 3 = 3 (as opposed to 5 – 2 = 3 using the American technique). The end result is the same, of course, because we’d be in something of a pickle if performing a simple math operation such as an integer subtraction gave conflicting results on the opposite sides

bit of an 8bit value; that is, it exchanges 0s for 1s, and vice versa. For example, if the inputs to the inverter block are 000111102, then the outputs from that A[7:0] B[7:0] Select these inputs for a SUB 8-bit Inverter Select these inputs for an ADD 8-bit Mux a[7:0] cout C (carry ) flag select b[7:0] 8-bit Adder s[7:0] cin 0 (ADD) 1 (SUB) 2:1 Mux S[7:0] Figure 4-17. Block diagram of combined adder/subtractor function. 89 90 INTEGER ARITHMETIC block will be 111000012. Thus,

28.4 Ǟ 28 (g) 28.5 Ǟ 28 (h) 28.6 Ǟ 29 ț Round-half-odd. This is similar to the previous mode, the difference being that if the digits to be discarded are equal to 0.5, the integer portion of the result will be rounded so as to make an odd number: DIVIDING SIGNED BINARY NUMBERS (a) 27.0 Ǟ 27 (b) 27.4 Ǟ 27 (c) 27.5 Ǟ 27 (d) 27.6 Ǟ 28 (e) 28.0 Ǟ 28 (f) 28.4 Ǟ 28 (g) 28.5 Ǟ 29 (h) 28.6 Ǟ 29 This mode is never used in practice because it never rounds to zero, which is often desirable;

Download sample

Download

About admin