or
Sign in to turn on 1-Click ordering.
 
 
Express Checkout with PayPhrase
What's this? | Create PayPhrase
Sorry!
More Buying Choices
38 used & new from $31.02

Have one to sell? Sell yours here
 
   
Hacker's Delight
 
 
Tell the Publisher!
I’d like to read this book on Kindle

Don’t have a Kindle? Get your Kindle here.
 
  

Hacker's Delight (Hardcover)

~ (Author)
5.0 out of 5 stars  See all reviews (15 customer reviews)

List Price: $54.99
Price: $31.02 & this item ships for FREE with Super Saver Shipping. Details
You Save: $23.97 (44%)
o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o o
In Stock.
Ships from and sold by Amazon.com. Gift-wrap available.

Want it delivered Tuesday, November 10? Choose One-Day Shipping at checkout. Details
18 new from $31.02 20 used from $35.68

Frequently Bought Together

Hacker's Delight + Programming Pearls (2nd Edition) + The Algorithm Design Manual
Price For All Three: $115.97

Show availability and shipping details

  • This item: Hacker's Delight by Henry S. Warren

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details

  • Programming Pearls (2nd Edition) by Jon Bentley

    In Stock.
    Ships from and sold by Amazon.com.
    Eligible for FREE Super Saver Shipping on orders over $25. Details

  • The Algorithm Design Manual by Steven S. Skiena

    In Stock.
    Ships from and sold by Amazon.com.
    This item ships for FREE with Super Saver Shipping. Details


Customers Who Bought This Item Also Bought

Elements of Programming

Elements of Programming

by Alexander Stepanov
4.8 out of 5 stars (6)  $31.35
Concrete Mathematics: A Foundation for Computer Science (2nd Edition)

Concrete Mathematics: A Foundation for Computer Science (2nd Edition)

by Ronald L. Graham
4.4 out of 5 stars (30)  $48.20
Programming in C (3rd Edition)

Programming in C (3rd Edition)

by Stephen G. Kochan
4.6 out of 5 stars (25)  $31.49
The Algorithm Design Manual

The Algorithm Design Manual

by Steven S. Skiena
4.5 out of 5 stars (34)  $61.15
Absolute Beginner's Guide to C (2nd Edition)

Absolute Beginner's Guide to C (2nd Edition)

by Greg Perry
4.6 out of 5 stars (107)  $23.09
Explore similar items

Editorial Reviews

Product Description

Veteran programmer Hank Warren shares the tricks he has collected from his considerable experience in the worlds of application and system programming. For anyone who wants to create efficient code. Self-directed study.


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

Product Details

  • Hardcover: 306 pages
  • Publisher: Addison-Wesley Professional (July 27, 2002)
  • Language: English
  • ISBN-10: 0201914654
  • ISBN-13: 978-0201914658
  • Product Dimensions: 9.3 x 6.5 x 0.9 inches
  • Shipping Weight: 1.3 pounds (View shipping rates and policies)
  • Average Customer Review: 5.0 out of 5 stars  See all reviews (15 customer reviews)
  • Amazon.com Sales Rank: #65,845 in Books (See Bestsellers in Books)

    Popular in these categories: (What's this?)

    #29 in  Books > Computers & Internet > Web Development > Security & Encryption > Encryption
    #33 in  Books > Computers & Internet > Business & Culture > Hacking
    #37 in  Books > Computers & Internet > Computer Science > Systems Analysis & Design

More About the Author

Henry S. Warren
Discover books, learn about writers, read author blogs, and more.

Visit Amazon's Henry S. Warren Page

Look Inside This Book


What Do Customers Ultimately Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 

Your tags: Add your first tag
 

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

 

Customer Reviews

15 Reviews
5 star:
 (15)
4 star:    (0)
3 star:    (0)
2 star:    (0)
1 star:    (0)
 
 
 
 
 
Average Customer Review
5.0 out of 5 stars (15 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

 
55 of 57 people found the following review helpful:
5.0 out of 5 stars Magic, May 28, 2005
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.
Comment Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
39 of 40 people found the following review helpful:
5.0 out of 5 stars Reader's Delight, August 18, 2002
By A Customer
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 Comment | Permalink | Was this review helpful to you? Yes No (Report this)



 
47 of 50 people found the following review helpful:
5.0 out of 5 stars Excellent Catalog of Techniques, October 22, 2002
By Mike Blaszczak (Mercer Island, WA, USA) - See all my reviews
(REAL NAME)   
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 Comment | Permalink | Was this review helpful to you? Yes No (Report this)


Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews

5.0 out of 5 stars Comprehensive!
Hacker's Delight really is delightfully comprehensive, not to mention fantastically dense. It's really more of a reference but you can certainly read it from cover to cover... Read more
Published 8 months ago by Brian Gordon

5.0 out of 5 stars Bit-banger's delight. More fun than a barrel of monkeys.
If you find delight in the optimization of code--and you SHOULD--this is the book for you.

The book contains a great collection of techniques and tricks for highly... Read more
Published 14 months ago by jose.r-s

5.0 out of 5 stars This is a fantastic book!
I have a virtual calculator called the DIY Calculator that accompanies my own book "How Computers Do Math" The Definitive Guide to How Computers Do Math : Featuring the Virtual... Read more
Published on March 23, 2007 by Clive (Max) Maxfield

5.0 out of 5 stars Absolute essential
This book is an absolute essential to the right reader. That right reader is either a low-level coder, a high-level logic designer, or someone who builds tools and libraries for... Read more
Published on February 27, 2007 by wiredweird

5.0 out of 5 stars Fun, interesting and useful
My first introduction to binary operators wizardry was in a 1st year, 1st semester course in Digital Systems at the Technion, IIT. I thought it was fun. Read more
Published on January 23, 2007 by Shlomo Yona

5.0 out of 5 stars A rich resource for low-level arithmetic tricks
The term "hacker" in this book means someone who enjoys making computers do interesting tricks regardless of whether it turns out to be useful, not someone who is intent on... Read more
Published on January 23, 2007 by calvinnme

5.0 out of 5 stars Super Book
They don't make them like this anymore. Amid the "Learning XXX in 21 days" and various other computer book for which depth is almost non existent (and are read like eating... Read more
Published on August 14, 2005 by Daniel

5.0 out of 5 stars Lots of fun, + lots of uses for firmware engineers
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... Read more
Published on April 27, 2005 by JLC

5.0 out of 5 stars Binary arithmetic at its best
I would rate this book up there as to eventually be one of the CS classics. I can't imagine anything pertaining to binary arithmetic that's not covered! Read more
Published on February 25, 2005 by James Upton

5.0 out of 5 stars the quick way to twiddle bits
Anyone can reverse the bits in a byte, so the LSB is in the MSB position etc., using a while loop. Only thing is, there's a quicker way using multiplication, and that way is in... Read more
Published on January 27, 2005 by Seattle Listener 1001

Only search this product's reviews



Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 

Search Customer Discussions
Search all Amazon discussions
   




Product Information from the Amapedia Community

Beta (What's this?)


Look for Similar Items by Category


Look for Similar Items by Subject

 

Feedback

If you need help or have a question for Customer Service, contact us.
 Would you like to update product info or give feedback on images?
Is there any other feedback you would like to provide?

Your comments can help make our site better for everyone.


Your Recent History

 (What's this?)

After viewing product detail pages or search results, look here to find an easy way to navigate back to pages you are interested in.