Programming Books C Java PHP Python Learn more Browse Programming Books
Rent
$26.68
  • List Price: $59.99
  • Save: $33.31 (56%)
Rented from RentU
To Rent, select Shipping State from options above
Due Date: Aug 16, 2014
FREE return shipping at the end of the semester. Access codes and supplements are not guaranteed with rentals.
Trade in your item
Get a $18.12
Gift Card.
Have one to sell?
Flip to back Flip to front
Listen Playing... Paused   You're listening to a sample of the Audible audio edition.
Learn more
See all 2 images

Hacker's Delight Hardcover

ISBN-13: 078-5342914658 ISBN-10: 0201914654 Edition: 1st

See all 2 formats and editions Hide other formats and editions
Amazon Price New from Used from Collectible from
Hardcover
"Please retry"
$54.95 $41.63

There is a newer edition of this item:


Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student



NO_CONTENT_IN_FEATURE

Sell Your Books
Get up to 75% back when you sell your books on Amazon. Ship your books for free and get Amazon.com Gift Cards. Learn more.

Product Details

  • Hardcover: 306 pages
  • Publisher: Addison-Wesley; 1st edition (July 27, 2002)
  • Language: English
  • ISBN-10: 0201914654
  • ISBN-13: 978-0201914658
  • Product Dimensions: 9.4 x 6.5 x 0.9 inches
  • Shipping Weight: 1.3 pounds
  • Average Customer Review: 5.0 out of 5 stars  See all reviews (27 customer reviews)
  • Amazon Best Sellers Rank: #412,692 in Books (See Top 100 in Books)

Editorial Reviews

From the Back Cover

"This is the first book that promises to tell the deep, dark secrets of computer arithmetic, and it delivers in spades. It contains every trick I knew plus many, many more. A godsend for library developers, compiler writers, and lovers of elegant hacks, it deserves a spot on your shelf right next to Knuth."

--Josh Bloch

"When I first saw the title, I figured that the book must be either a cookbook for breaking into computers (unlikely) or some sort of compendium of little programming tricks. It's the latter, but it's thorough, almost encyclopedic, in its coverage."

--Guy Steele

These are the timesaving techniques relished by computer hackers--those devoted and persistent code developers who seek elegant and efficient ways to build better software. The truth is that much of the computer programmer's job involves a healthy mix of arithmetic and logic. In Hacker's Delight , veteran programmer Hank Warren shares the tricks he has collected from his considerable experience in the worlds of application and system programming. Most of these techniques are eminently practical, but a few are included just because they are interesting and unexpected. The resulting work is an irresistible collection that will help even the most seasoned programmers better their craft.

Topics covered include:

  • A broad collection of useful programming tricks
  • Small algorithms for common tasks
  • Power-of-2 boundaries and bounds checking
  • Rearranging bits and bytes
  • Integer division and division by constants
  • Some elementary functions on integers
  • Gray code
  • Hilbert's space-filling curve
  • And even formulas for prime numbers!

This book is for anyone who wants to create efficient code. Hacker's Delight will help you learn to program at a higher level--well beyond what is generally taught in schools and training courses--and will advance you substantially further than is possible through ordinary self-study alone.



0201914654B06272002

About the Author

Henry S. Warren, Jr., has had a forty-year career with IBM, spanning from the IBM 704 to the PowerPC. He has worked on various military command and control systems and on the SETL project under Jack Schwartz at New York University. Since 1973 he has been with IBM's Research Division, focusing on compilers and computer architectures. Hank currently works on the Blue Gene petaflop computer project. He received his Ph.D. in computer science from the Courant Institute at New York University.



0201914654AB06272002

More About the Author

There's a short bio on the back cover of Hacker's Delight.

I want to point out here the existence of www.HackersDelight.org. This site will have errata files for the book (second edition) as errors are found. It has C code for the algorithms in the book and many similar algorithms.

Customer Reviews

5.0 out of 5 stars
5 star
26
4 star
1
3 star
0
2 star
0
1 star
0
See all 27 customer reviews
Many descriptions of this book refer to it as a collection of programming "tricks".
Bret Victor
Warren does an admirable job of explaining not only what is going on but why, and in very casual/engaging prose.
Lance C. Hibbeler
I really enjoyed reading this book, and I will probably reference it from time to time.
Shlomo Yona

Most Helpful Customer Reviews

206 of 211 people found the following review helpful By Bret Victor on May 28, 2005
Format: Hardcover
First of all, the book itself is incredible.

The title was poorly chosen, I think. The connotation of "hacker" in the public mind is somewhat different than the word's meaning forty years ago at MIT, and I found (and continue to find) this book shelved alongside ephemera about firewalls and internet security. Thinking it was about "1337 hacking", I picked it off the shelf for a quick sneer. Six hours later, the bookstore had to kick me out because they were closing.

Think of it as "The Art of Computer Programming, Volume 0: Bit Manipulation". Except without the annoying Knuth attitude.

"Hacker's Delight" is a timeless classic, a scholarly and exhaustive treatment of finite-word-length arithmetic and other bit-manipulation algorithms. The book is excellently written and the material lovingly presented. For some people (such as me), the mathematical beauty and cleverness of the solutions is reason enough to find the book fascinating. For other people (such as me), there are extensive practical applications.

However, the size of the latter group (or, perhaps, relative percentage) is dwindling with time. A programmer who thinks that the universe begins and ends with Oracle and PHP respectively is unlikely to need an 8-RISC-instruction algorithm for dividing integers by 7. The essence of programming is abstraction, and as computational resources become more abundant, the path of progress abstracts further and further away from the machine. For many modern programmers, there are no bits -- there are only "numbers" (double-precision floats, typically), and the hardware handles these floats just as gracefully as integers. In this world, one's complementing and shifting have no meaning.
Read more ›
6 Comments Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
73 of 74 people found the following review helpful By A Customer on August 18, 2002
Format: Hardcover
Early drafts of Dr Warren's book have circulated for several years samizdat style among a group of hardware, compiler and OS people at a large computer research lab. One copy in particular always sits about three feet from me. If the building were to catch on fire, you might very well hear shouts of "who's taking Hacker's Delight?"
How do you determine, using the smallest number of instructions, if a word contains at least one zero byte? How do you transpose a bit matrix? Divide by 5? Count the number of ones in a word? Permute bits? Maybe you're smart enough to already know. Or perhaps you know someone else who does. For the rest of us there's Hacker's Delight.
Some years back, in the course of building a large machine, we made a mistake that resulted in some very expensive rework. Just one particular paragraph in this book would have saved us an amount of money best not admitted in print. If you have Knuth on your shelf then there's a good chance that you'll want Hacker's Delight right next to it.
And just in case life is getting too serious, there are some entertaining chapters on prime numbers and Hilbert curves, written so compellingly that you can't stop reading until the end.
Highly recommended. If this book relates to the kind of work you do, then don't leave home without it.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
71 of 74 people found the following review helpful By Mike Blaszczak on October 22, 2002
Format: Hardcover Verified Purchase
I feel compelled to point out that this book is _not_ a few things: It's not a book that teaches you how to break into computers, or crack codes. It's also not the kind of book that teaches you how to do something which you don't know how to do.
This book is a collection of tricks that show the reader better ways to do things they already know how to do. And it's also a book that can give the reader insight into different approaches and mechanisms for solving problems.
Computer programmers translate their ideas and requirements into any of several computer languages. Those expressions are limited by the language the programmer is using, and maybe even the machine the programmer is targeting. But there is a wide continum of expressions that result in the same -- hopefully correct -- results. Choosing the most efficient, and most elegant, expression to some is "real" hacking.
This book is for real hackers. It's a great collection of tricks for performing usually simple operations in an elegant way. What's elegant? Well, elegant is efficeint. If there's a side-effect of an elegant operation, it turns out that side-effect is probably useful and not simply discarded.
This book catalogs insights into concrete binary math, shortcuts derived from different boolean operators, and even approaches some interesting numerical analysis problems.
If you already know how to write software, and you already know you want to find faster or more efficient ways to check for overflows on integers, divide nubmers, count bits, search for binary patterns, or do other twiddling, then this book is for you.
If the application of such techniques doesn't seem important to you, then this book probably isn't going to be of interest to you.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again
8 of 8 people found the following review helpful By JLC on April 27, 2005
Format: Hardcover Verified Purchase
Warren was one of the editors of the PowerPC compiler guide and that book had two neat chapeters, "Clever Examples," and "Optimal Code Sequences," which introduced the use of the gnu superoptimzer. The PPC Compiler Writer's guide was useful for more than Compiler Writers! Warren's book Hacker's Delight is a greatly expanded version of that material. He introduces a basic RISC and proceeds to give C, pseudocode and basic RISC assembly for many different operations. What distinguishes Hacker's Delight is that he goes into cycle counts and optimzation strategies for some of the algorithims and analyzes tradeoffs for different solutions. Some of bits I have applied the techniques to my day job are in ch. 7: Rearranging Bits and Bytes and Chs. 5 & 6 "Counting Bits" and "Searching Words" There is some good material on computer arithmetic including using a radix -2 system, and a chapter on Hilbert's Curves as well as Primes, which I haven't gotten a chance to enjoy yet. Be sure to check his website for errata and some additional material. Highly Recommended.
Comment Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback. If this review is inappropriate, please let us know.
Sorry, we failed to record your vote. Please try again

Product Images from Customers

Most Recent Customer Reviews

Search
ARRAY(0xa29f86b4)

What Other Items Do Customers Buy After Viewing This Item?