The Art of Computer Programming, Volume 1, Fascicle 1: Mmix -- A Risc Computer For The New Millennium by Donald E. KnuthThe Art of Computer Programming, Volume 1, Fascicle 1: Mmix -- A Risc Computer For The New Millennium by Donald E. Knuth

The Art of Computer Programming, Volume 1, Fascicle 1: Mmix -- A Risc Computer For The New…

byDonald E. Knuth

Paperback | February 14, 2005

Pricing and Purchase Info

$32.67 online 
$36.99 list price save 11%
Earn 163 plum® points

Prices and offers may vary in store


In stock online

Ships free on orders over $25

Not available in stores


Finally, after a wait of more than thirty-five years, the first part of Volume 4 is at last ready for publication. Check out the boxed set that brings together Volumes 1 - 4A in one elegant case, and offers the purchaser a $50 discount off the price of buying the four volumes individually.


The Art of Computer Programming, Volumes 1-4A Boxed Set, 3/e 

ISBN: 0321751043 


Art of Computer Programming, Volume 1, Fascicle 1, The: MMIX -- A RISC Computer for the New Millennium


This multivolume work on the analysis of algorithms has long been recognized as the definitive description of classical computer science. The three complete volumes published to date already comprise a unique and invaluable resource in programming theory and practice. Countless readers have spoken about the profound personal influence of Knuth's writings. Scientists have marveled at the beauty and elegance of his analysis, while practicing programmers have successfully applied his "cookbook" solutions to their day-to-day problems. All have admired Knuth for the breadth, clarity, accuracy, and good humor found in his books.

To begin the fourth and later volumes of the set, and to update parts of the existing three, Knuth has created a series of small books called fascicles, which will be published t regular intervals. Each fascicle will encompass a section or more of wholly new or evised material. Ultimately, the content of these fascicles will be rolled up into the comprehensive, final versions of each volume, and the enormous undertaking that began in 1962 will be complete.


Volume 1, Fascicle 1

This first fascicle updates The Art of Computer Programming, Volume 1, Third Edition: Fundamental Algorithms, and ultimately will become part of the fourth edition of that book. Specifically, it provides a programmer's introduction to the long-awaited MMIX, a RISC-based computer that replaces the original MIX, and describes the MMIX assembly language. The fascicle also presents new material on subroutines, coroutines, and interpretive routines.


Ebook (PDF version) produced by Mathematical Sciences Publishers (MSP),

Donald E. Knuth is known throughout the world for his pioneering work on algorithms and programming techniques, for his invention of the Tex and Metafont systems for computer typesetting, and for his prolific and influential writing. Professor Emeritus of The Art of Computer Programming at Stanford University, he currently devotes ful...
Title:The Art of Computer Programming, Volume 1, Fascicle 1: Mmix -- A Risc Computer For The New…Format:PaperbackDimensions:144 pages, 9.3 × 6.2 × 0.5 inPublished:February 14, 2005Publisher:Pearson EducationLanguage:English

The following ISBNs are associated with this title:

ISBN - 10:0201853922

ISBN - 13:9780201853926


Read from the Book

fas_ci_cle /fas_ ek el / n . . . 1: a small bundle . . . an inflorescence consisting of a compacted cyme less capitate than a glomerule. . . 2: one of the divisions of a book published in parts --P. B. Gove, Webster's Third New International Dictionary (1961) This is the first of a series of updates that I plan to make available at regular intervals as I continue working toward the ultimate editions of The Art of Computer Programming. I was inspired to prepare fascicles like this by the example of Charles Dickens, who issued his novels in serial form; he published a dozen installments of Oliver Twist before having any idea what would become of Bill Sikes! I was thinking also of James Murray, who began to publish 350-page portions of the Oxford English Dictionary in 1884, finishing the letter B in 1888 and the letter C in 1895. (Murray died in 1915 while working on the letter T; my task is, fortunately, much simpler than his.) Unlike Dickens and Murray, I have computers to help me edit the material, so that I can easily make changes before putting everything together in its final form. Although I'm trying my best to write comprehensive accounts that need no further revision, I know that every page brings me hundreds of opportunities to make mistakes and to miss important ideas. My files are bursting with notes about beautiful algorithms that have been discovered, but computer science has grown to the point where I cannot hope to be an authority on all the material I wish to cover. Therefore I need extensive feedback from readers before I can finalize the official volumes. In other words, I think these fascicles will contain a lot of Good Stuff, and I'm excited about the opportunity to present everything I write to whoever wants to read it, but I also expect that beta-testers like you can help me make it Way Better. As usual, I will gratefully pay a reward of $2.56 to the first person who reports anything that is technically, historically, typographically, or politically incorrect. Charles Dickens usually published his work once a month, sometimes once a week; James Murray tended to finish a 350-page installment about once every 18 months. My goal, God willing, is to produce two 128-page fascicles per year.Most of the fascicles will represent new material destined for Volumes 4 and higher; but sometimes I will be presenting amendments to one or more of the earlier volumes. For example, Volume 4 will need to refer to topics that belong in Volume 3, but weren't invented when Volume 3 first came out. With luck, the entire work will make sense eventually. Fascicle Number One is about MMIX, the long-promised replacement for MIX. Thirty-seven years have passed since the MIX computer was designed, and computer architecture has been converging during those years towards a rather different style of machine. Therefore I decided in 1990 to replace MIX with a new computer that would contain even less saturated fat than its predecessor. Exercise 1.3.1-25 in the first three editions of Volume 1 spoke of an extended MIX called MixMaster, which was upward compatible with the old version. But MixMaster itself has long been hopelessly obsolete. It allowed for several gigabytes of memory, but one couldn't even use it with ASCII code to print lowercase letters. And ouch, its standard conventions for calling subroutines were irrevocably based on self-modifying instructions! Decimal arithmetic and self-modifying code were popular in 1962, but they sure have disappeared quickly as machines have gotten bigger and faster. Fortunately the modern RISC architecture has a very appealing structure, so I've had a chance to design a new computer that is not only up to date but also fun. Many readers are no doubt thinking, "Why does Knuth replace MIX by another machine instead of just sticking to a high-level programming language? Hardly anybody uses assemblers these days." Such people are entitled to their opinions, and they need not bother reading the machine-language parts of my books. But the reasons for machine language that I gave in the preface to Volume 1, written in the early 1960s, remain valid today: One of the principal goals of my books is to show how high-level constructions are actually implemented in machines, not simply to show how they are applied. I explain coroutine linkage, tree structures, random number generation, high-precision arithmetic, radix conversion, packing of data, combinatorial searching, recursion, etc., from the ground up. The programs needed in my books are generally so short that their main points can be grasped easily. People who are more than casually interested in computers should have at least some idea of what the underlying hardware is like. Otherwise the programs they write will be pretty weird. Machine language is necessary in any case, as output of some of the software that I describe. Expressing basic methods like algorithms for sorting and searching in machine language makes it possible to carry out meaningful studies of the effects of cache and RAM size and other hardware characteristics (memory speed, pipelining, multiple issue, lookaside buffers, the size of cache blocks, etc.) when comparing different schemes. Moreover, if I did use a high-level language, what language should it be? In the 1960s I would probably have chosen Algol W; in the 1970s, I would then have had to rewrite my books using Pascal; in the 1980s, I would surely have changed everything to C; in the 1990s, I would have had to switch to C++ and then probably to Java. In the 2000s, yet another language will no doubt be de rigueur. I cannot afford the time to rewrite my books as languages go in and out of fashion; languages aren't the point of my books, the point is rather what you can do in your favorite language. My books focus on timeless truths. Therefore I will continue to use English as the high-level language in The Art of Computer Programming, and I shall continue to use a low-level language to indicate how machines actually compute. Readers who only want to see algorithms that are already packaged in a plug-in way, using a trendy language, should buy other people's books. The good news is that programming for MMIX is pleasant and simple. This fascicle presents 1) a programmer's introduction to the machine (replacing Section 1.3.1 of the third edition of Volume 1); 2) the MMIX assembly language (replacing Section 1.3.2); 3) new material on subroutines, coroutines, and interpretive routines (replacing Sections 1.4.1, 1.4.2, and 1.4.3). Of course, MIX appears in many places throughout the existing editions of Volumes 1--3, and dozens of programs need to be rewritten for MMIX before the next editions of those volumes are ready. Readers who would like to help with this conversion process are encouraged to join the MMIXmasters, a happy group of volunteers based at The fourth edition of Volume 1 will not be ready until after Volumes 4 and 5 have been completed; therefore two quite different versions of Sections 1.3.1, 1.3.2, 1.4.1, 1.4.2, and 1.4.3 will coexist for several years. In order to avoid potential confusion, I've temporarily assigned "prime numbers" 1.3.1', 1.3.2',1.4.1', 1.4.2', and 1.4.3' to the new material. I am extremely grateful to all the people who helped me with the design of MMIX. In particular, John Hennessy and Richard L. Sites deserve special thanks for their active participation and substantial contributions. Thanks also to Vladimir Ivanovic for volunteering to be the MMIX grandmaster/webmaster. D. E. K. Stanford, California May 1999

Table of Contents

Chapter 1: Basic Concepts 1

1.3' MMIX 2

1.3.1' Description of MMIX 2

1.3.2' The MMIX Assembly Language 28

1.3.3' Applications to Permutations 51

1.4' Some Fundamental Programming Techniques 52

1.4.1' Subroutines 52

1.4.2' Coroutines 66

1.4.3' Interpretive Routines 73

Answers to Exercises 94

Index and Glossary 127