Enter your mobile number or email address below and we'll send you a link to download the free Kindle App. Then you can start reading Kindle books on your smartphone, tablet, or computer - no Kindle device required.

  • Apple
  • Android
  • Windows Phone
  • Android

To get the free app, enter your mobile phone number.

Hacker's Delight (2nd Edition) 2nd Edition

4.7 out of 5 stars 32 customer reviews
ISBN-13: 978-0321842688
ISBN-10: 0321842685
Why is ISBN important?
ISBN
This bar-code number lets you verify that you're getting exactly the right version or edition of a book. The 13-digit and 10-digit formats both work.
Scan an ISBN with your phone
Use the Amazon App to scan ISBNs and compare prices.
Trade in your item
Get a $15.71
Gift Card.
Have one to sell? Sell on Amazon
Buy used On clicking this link, a new layer will be open
$39.89 On clicking this link, a new layer will be open
Buy new On clicking this link, a new layer will be open
$47.99 On clicking this link, a new layer will be open
More Buying Choices
49 New from $39.89 30 Used from $39.89
Free Two-Day Shipping for College Students with Prime Student Free%20Two-Day%20Shipping%20for%20College%20Students%20with%20Amazon%20Student


Security
ITPro.TV Video Training
Take advantage of IT courses online anywhere, anytime with ITPro.TV. Learn more.
$47.99 FREE Shipping. In Stock. Ships from and sold by Amazon.com. Gift-wrap available.
click to open popover

Frequently Bought Together

  • Hacker's Delight (2nd Edition)
  • +
  • Programming in C (4th Edition) (Developer's Library)
  • +
  • C Programming Absolute Beginner's Guide (3rd Edition)
Total price: $101.73
Buy the selected items together

Editorial Reviews

Review

“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. In the ten years since the first edition came out, it’s been absolutely invaluable to my work at Sun and Google. I’m thrilled with all of the new material in the second edition.”

— Joshua 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. The second edition covers two new major topics and expands the overall collection with dozens of additional little tricks, including one that I put to use right away in a binary search algorithm: computing the average of two integers without risking overflow. This hacker is indeed delighted!”

— Guy Steele

About the Author

Henry S. Warren, Jr., has had a fifty-year career with IBM, spanning from the IBM 704 to the PowerPC and beyond. He has worked on various military command and control systems and on the SETL (SET Language) project under Jack Schwartz. Since 1973, Hank has been with IBM’s Research Division, focusing on compilers and computer architectures. He currently works on a supercomputer project aimed at an exaflop. Hank received his Ph.D. in computer science from the Courant Institute at New York University.

NO_CONTENT_IN_FEATURE

The latest book club pick from Oprah
"The Underground Railroad" by Colson Whitehead is a magnificent novel chronicling a young slave's adventures as she makes a desperate bid for freedom in the antebellum South. See more

Product Details

  • Hardcover: 512 pages
  • Publisher: Addison-Wesley Professional; 2 edition (October 5, 2012)
  • Language: English
  • ISBN-10: 0321842685
  • ISBN-13: 978-0321842688
  • Product Dimensions: 6.2 x 1.3 x 9.2 inches
  • Shipping Weight: 1.8 pounds (View shipping rates and policies)
  • Average Customer Review: 4.7 out of 5 stars  See all reviews (32 customer reviews)
  • Amazon Best Sellers Rank: #39,361 in Books (See Top 100 in Books)

Customer Reviews

Top Customer Reviews

Format: Kindle Edition
Well written and (relatively) concise book. It contains numerous techniques for efficiently managing binary data and various examinations of bitwise arithmetic.

The algorithms explained are detailed and useful. I've used a number of them 'in anger' and they've worked perfectly. I haven't come across any other book that addresses the field as well as this one does.
2 Comments 25 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover Verified Purchase
The book is full of useful bit-twiddling tricks. How do you quickly count the number of bits set in a 2's complement long integer? If you can't imagine caring, then this book isn't for you, but if you need to write fast, low-level code on occasion, the price of the book will be repaid the first time you find a clear explanation of some trick, instead of having to figure it out for yourself. It's a more polished, restricted version of Hackmem, which I also recommend.
Comment 18 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover Verified Purchase
I rarely recommend a second edition of anything to someone who owns the first, but this stands out as a worthy exception. It starts with the amazing menagerie of slick tricks that the first edition had, but adds material regarding CRCs, error correction, creative arithmetic, and more. Oh, I'm sure you can get by without these for lots of purposes. When efficiency really matters, though, or when you need to work in constrained environments (like small embedded processors that lack floating point or maybe even division instructions), approaches like these more than make up for the effort involved in using them. And, if you code in VHDL or Verilog instead of sequential languages, tools like these can help you past that last nanosecond to meet timing.

Highly recommended, not just because my copy of the first edition came with so many poorly-bound, loose pages.

-- wiredweird
Comment 12 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover Verified Purchase
Hacker's Delight first edition was resourceful. This second edition even more so.

The bit manipulation chapters have lots of hints on how to code without branches.

There are some "scary" math on later chapters but you can ignore it.
1 Comment 12 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover Verified Purchase
I develop for embedded systems. Mostly in C, but sometimes in assembly. This book is fantastic. I just got it today and can't put it down. You may have picked up a few of these tricks along the line, but THIS is the definitive collection, and I plan to keep it right on my desk.
Comment 4 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover
Any book with the word "hacker" catches my attention. I probably have 10 books or more with this word in the title. This book is special because it was the first books with the word "hacker" that I ever got. The word "hacker" in this book is meant in original sense of an aficionado of computers - someone, who enjoys making computers do new things, and do old things in a new and clever way.

Hacker's Delight is another timeless classic. It's a collection of small programming tricks that the author, Harry Warren, software veteran with 50 years of experience, has come across in his career. These programming tricks exclusively revolve around low-level bithacks, creative arithmetic, and finding the most effective ways to count the number of 1 bits in a word, transposing bit matrices, permuting bits, reversing and rearranging bits and bytes, dividing by constants, and many more.

I've placed this book #19 in my Top 100 Programming, Computer and Science books list:

[...]
(If this link gets removed google for >>catonmat top 100 programming computer science books<< to find my article.)

Some of the most interesting parts of the book include computing reminders without computing quotient, cyclic redundancy checking (CRC), Hamming SEC-DED algorithm and error correcting codes, unusual bases for number systems, such as bases -2 and -1+i, generating Hilbert curves, and formulas for generating primes, and a gallery of graphs of discrete functions.

If you spend more than a week with this book you'll start dreaming in binary and hex, and your brain will get filled with tons of geeky magical numbers, such as, 0x40490FDB and 0x7F80000.
Read more ›
Comment 3 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover Verified Purchase
nice book, good for reviewing it once in a while. Don't read before interviews, it might confuse you and most interviewers won't understand what you want to do. This is for very advanced and out-of-norm programmers
Comment 2 people found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse
Format: Hardcover Verified Purchase
This book was recommended by my professor.

It's basically a collection of binary math tricks that really help out in understanding the algorithms that are best suited for whatever you are trying to accomplish.

It's pretty advanced so if you don't have a basic understanding of coding yet, then this will be pretty hard to grasp and make adequate use of it.
Comment One person found this helpful. Was this review helpful to you? Yes No Sending feedback...
Thank you for your feedback.
Sorry, we failed to record your vote. Please try again
Report abuse

Set up an Amazon Giveaway

Hacker's Delight (2nd Edition)
Amazon Giveaway allows you to run promotional giveaways in order to create buzz, reward your audience, and attract new followers and customers. Learn more about Amazon Giveaway
This item: Hacker's Delight (2nd Edition)