On february 25 1991 during the gulf war an american

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: *a as a<<1 + a. What multiples of a can be computed with this instruction? ܼ , 2.3.7 Dividing by Powers of Two Integer division on most machines is even slower than integer multiplication—requiring 30 or more clock cycles. Dividing by a power of two can also be performed using shift operations, but we use a right shift rather than a left shift. The two different shifts—logical and arithmetic—serves this purpose for unsigned and two’s complement numbers, respectively. Integer division always rounds toward zero. For Ü ¼ and Ý ¼, the result should be Ü Ý , where for any ¼ · ½. As examples ¿ ½ real number , is defined to be the unique integer ¼ such that ¼ ¿, ¿ ½ , and ¿ ¿. Consider the effect of performing a logical right shift on an unsigned number. Let Ü be the unsigned integer represented by bit pattern ÜÛ ½ ÜÛ ¾ ܼ , and be in the range ¼ Û. Let ܼ be the ¼¼ be the unsigned number with unsigned number with Û -bit representation ÜÛ ½ ÜÛ ¾ Ü , and Ü -...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online