Quiz #4

(Last Mod: 27 November 2010 21:38:40 )

ECE-1021 Home


Name:                                                             CODE:                 Section:           Date:                  

NO CALCULATORS MAY BY USED ON THIS QUIZ

  1. What is the value of m after the following code fragment executes?

int m, n, b;

n = 34;

b = 2;

for (m = 1; n/m >= b; m *= b);

  1. 1.

  2. 2.

  3. 10.

  4. 32. <====

  1. Which data types are the only ones for which all of the bit-oriented functions are fully defined?

     

    1. Floating point.

    2. Integer.

    3. Unsigned integer. <====

    4. Signed integer.

     

  2. If the bit pattern in m is originally '00101010', what is (m << 2) ?

  1. '00010101'.

  2. '00101010'.

  3. '01010100'.

  4. '10101000'. <====

  1. Performing a left-shift by N places is equivalent to which of the following:

     

    1. Multiplying by N.

    2. Multiplying by 2N. <====

    3. Dividing by 2N.

    4. Dividing by 10N.

     

  2. What is the term that is used when the least significant byte of a multi-byte value is stored at the base address?

    1. Big Endian.

    2. Little Endian. <====

    3. Base Endian.

    4. Intel Format.