This item ships for FREE with
Super Saver Shipping
Due Date: Sep 30, 2013

FREE return shipping at the end of the semester
 
   
Sell Us Your Item
For a $7.38 Gift Card
Trade in
Have one to sell? Sell yours here
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.
Sorry, this item is not available in
Image not available for
Color:
Image not available

To view this video download Flash Player

 

Hacker's Delight [Hardcover]

Henry S. Warren Jr.
5.0 out of 5 stars  See all reviews (26 customer reviews)

Rent
$31.80 & this item ships for FREE with Super Saver Shipping. Details
In Stock.
Rented by RentU and Fulfilled by Amazon.
Free Two-Day Shipping for College Students with Amazon Student

Rent Your Textbooks
Save up to 70% when you rent your textbooks on Amazon. Keep your textbook rentals for a semester and rental return shipping is free.
There is a newer edition of this item:
Hacker's Delight (2nd Edition) Hacker's Delight (2nd Edition) 4.9 out of 5 stars (7)
$43.56
In Stock.

Book Description

July 27, 2002 0201914654 978-0201914658 1st
A collection useful programming advice the author has collected over the years; small algorithms that make the programmer's task easier. * At long last, proven short-cuts to mastering difficult aspects of computer programming * Learn to program at a more advanced level than is generally taught in schools and training courses, and much more advanced than can be learned through individual study/experience. * An instant cult classic for programmers! Computer programmers are often referred to as hackers -- solitary problem solvers engrossed in a world of code as they seek elegant solutions to building better software. While many view these unique individuals as "madmen," 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 collected wisdom -- namely tips and tricks -- from his considerable experience in the world of application development. The resulting work is an irresistible collection that will help even the most seasoned programmers better their craft. Henry S. Warren Jr. has had a 40-year career with IBM, spanning the computer field from the IBM 704 to PowerPC. He has worked on various military command and control systems, and on the SETL project under Jack Schwartz at NYU. Since 1973 he has been in IBM's Research Division at Yorktown Heights, New York. Here he has done compiler and computer architecture work on the 801 computer and its several variants through PowerPC. Presently he is working on the Blue Gene petaflop computer project. He received his Ph.D. in Computer Science from the Courant Institute at New York University in 1980.


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

Product Details

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

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
(26)
5.0 out of 5 stars
3 star
0
2 star
0
1 star
0
Not to mention, so much fun! Bret Victor  |  6 reviewers made a similar statement
This book also *explains* the tricks very clearly. T. B. Gausen  |  6 reviewers made a similar statement
Most Helpful Customer Reviews
201 of 206 people found the following review helpful
5.0 out of 5 stars Magic 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.

Even for those working at a lower level, the caching and pipelining schemes of modern architectures can complicate some of the assumptions in this book. For example, branch performance is highly architecture-dependent, and the efficiency that can be gained through branch tuning can outweigh that of shaving off a few instructions. Warren is careful to provide and identify branch-free algorithms whenever possible, but it often is not. As another example, parallel instruction scheduling means that not only is a routine no longer the sum of its instructions' cycles, it's not even completely deterministic, at least from the programmer's perspective.

But I work in the embedded field, and my targets have ranged from 1 MHz 8-bit 6502s through 50 MHz 32-bit Coldfires to creatively-handicapped DSPs of various sorts. Not a FPU or branch predictor in sight. In such situations, the algorithms in "Hacker's Delight" can be lifesavers. Not to mention, so much fun! If you approach optimization as a puzzle, wherein the solution is its own reward, this book is indeed a compendium of delights.

Many descriptions of this book refer to it as a collection of programming "tricks". I dislike that word; it implies a casualness and triviality that does not befit a book of this rigor and scope. I prefer the subtitle of Johnson and Graham's text on high-speed digital design: "A Handbook of Black Magic".

If your magic dust is bits and cycles, this is your spellbook.
Was this review helpful to you?
71 of 72 people found the following review helpful
5.0 out of 5 stars Reader's Delight August 18, 2002
By A Customer
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?
71 of 74 people found the following review helpful
5.0 out of 5 stars Excellent Catalog of Techniques October 22, 2002
Format:Hardcover|Amazon 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?
Most Recent Customer Reviews
5.0 out of 5 stars Excellent
This is a truly exceptional book for learning fast implementations of the base-2 operations that are used to do arithmetic and comparison on computers. Read more
Published 1 month ago by Hmm...
5.0 out of 5 stars Awesome!
Outer cover arrived with a few dings and scratches on it. Not the end of the world though. A great book.
Published 4 months ago by Alinani Simukanga
5.0 out of 5 stars Would give a 4.5
Interesting content. Very good to have a different view of bit-wise tricks. Also good for a brain teaser I guess =)
Published 5 months ago by ERIC WANG
4.0 out of 5 stars Interesting, but Regular Programmers Beware
This book presents a ton of bit-shifting tricks and techniques, along with detailed discussion of why we can be sure that they work and even some discussion of how/why it might be... Read more
Published 9 months ago by J. Schneider
5.0 out of 5 stars At least one copy is necessary for your development team library
Hacker's Delight bridges the gap between Hamming code theory and practical software application with working source code samples. Read more
Published 13 months ago by gregb
5.0 out of 5 stars Misleading title
The title is misleading, in that its content would enhance the toolbox of any serious programmer, while hackers attack programs at a much higher system level. Read more
Published 14 months ago by Allyn Rothman
5.0 out of 5 stars Fun, nifty, informative
Based on the famous HAKMEM AI Memo 239 from MIT, this is a really great book for anyone who enjoy low level bit twiddling. Read more
Published 15 months ago by Shae Erisson
5.0 out of 5 stars Must have!
This is great book that you must have somewhere around when you are writing some code. But I must say that this book is, in some way, Introduction to Donald Knuth's books: Concrete... Read more
Published 17 months ago by Boris
5.0 out of 5 stars Full of Useful Bit Mastering Tricks
If you want to get the most out of your clock ticks, this book will help. It has a wide variety of useful tips for programming challenges.
Published on February 21, 2011 by John Morrison
5.0 out of 5 stars Amazing
Don't be fooled by the title, this is not a book about hacking in the sense of compromising a computer, but rather the original sense of the word "hacker," as in, thinking outside... Read more
Published on January 2, 2011 by Lance C. Hibbeler
Search Customer Reviews
Only search this product's reviews

What Other Items Do Customers Buy After Viewing This Item?


Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Forums

There are no discussions about this product yet.
Be the first to discuss this product with the community.
Start a new discussion
Topic:
First post:
Prompts for sign-in
 





Look for Similar Items by Category