Suppose that we need a way of computing whether the number of bits in a 32-bit word

Question:

Suppose that we need a way of computing whether the number of bits in a 32-bit word is odd or even. Devise an algorithm for performing this computation as fast as possible. You may use up to 256 KB of RAM for tables if need be. Write a macro to carry out your algorithm. Extra Credit: Write a procedure to do the computation by looping over the 32 bits. Measure how many times faster your macro is than the procedure.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Modern Operating Systems

ISBN: 978-0133591620

4th edition

Authors: Andrew S. Tanenbaum, Herbert Bos

Question Posted: