Assembly Quiz 5

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

212. In binary, 1011 - 100 = (179) A. 0x7 B. 1100 C. 0xE D. 1010 E. 0xC F. 11 G. 111

A. 0x7 G. 111

251. which number below is the hex representation of a negative floating point number? (202) A. 0xC0100000 B. 0x20400000 C. 0x08010000 D. 0x40200000 E. 0x80100000 F. 0x10800000 G. 0x0C010000

A. 0xC0100000 E. 0x80100000

219. In multimedia arithmetic, an overflow often results in (181) A. Achieving a maximum value, but no greater. B. Exceptions. C. an exception D. Numbers less than zero. E. a blue screen F. a black screen G. saturation

A. Achieving a maximum value, but no greater. G. saturation

231. An invalid mathematical operation which can happen when computers do calculations is (189) A. Arithmetic overflow.0 B. Division by zero C. Adding zero to a negative number. D. Subtracting minus zero E. Adding zero F. Multiplying by zero G. Dividing by 1.

A. Arithmetic overflow.0 B. Division by zero

226. The most common use of processor arithmetic is for (184) A. Determining locations in mmemory. B. calculating loop variables. C. floating-point adds. D. Address calculations E. graphics calculations. F. Calculating colors. G. floating point multiplies.

A. Determining locations in memory. D. Address calculations

236. Signed division can be done by (192) A. Doing unsigned division and setting the signs of the quotient and remainder based on signs of the operands B. Transistors which have three states. C. Doing unsigned division, totally disregarding signs D. Doing unsigned division and setting the sign of the remainder based on sign of the dividend E. Doing unsigned division and setting the sign of the quotient based on sign of the divisor F. Checking for overflow. G. XORing the sign bits of the operands and calculating the signs of the remainders.

A. Doing unsigned division and setting the signs of the quotient and remainder based on signs of the operands G. XORing the sign bits of the operands and calculating the signs of the remainders.

256. When binary floating point numbers are multiplied, what in the following list does not happen? (206) A. Exponents are made equal. B. Signs are XORed. C. The result is normalized. D. Exponents are added. E. The result is rounded. F. Fractional parts are multiplied. G. Twos-complementation is performed.

A. Exponents are made equal. G. Twos-complementation is performed.

213. In a 32-bit register, overflow can occur when adding a positive and negative number (179) A. F B. T

A. F

248. Negative exponents in floating point binary are represented as twos-complement numbers (200) A. F B. T

A. F

242. Normalized scientific notation (196) A. In binary means that there is only a 1 to the left of the binary point. B. Makes it difficult to multiply numbers. C. Applies to binary but not decimal numbers. D. Makes sense only in the decimal system. E. Means the number left of the point is not zero. F. Is widely used in integer calculations. G. Represents any real number with infinite precision.

A. In binary means that there is only a 1 to the left of the binary point. E. Means the number left of the point is not zero.

238. Using many adders to speed up division (194) A. Is limited in its effectiveness because there are branches in the logic. B. won't work because you also have to calculate the remainder. C. Is difficult because division involves subtraction. D. Won't work because decisions have to be made after the subtractions. E. Works because fast multiplies can check the answer. F. Is difficult because the result is unknown. G. works because of Moore's law.

A. Is limited in its effectiveness because there are branches in the logic. D. Won't work because decisions have to be made after the subtractions.

240. One way of making the division process faster is to (194) A. Looking up partial results in a table rather than use combinational logic to obtain them. B. Increase the power supply voltage. C. Guess the result if being wrong doesn't change the answer. D. Use combinational logic to obtain results rather than looking them up n a table. E. Produce multiple results and pick the one that is closest to the real answer. F. Guess intermediate results and make changes if the guesses are wrong. G. Add cache memory.

A. Looking up partial results in a table rather than use combinational logic to obtain them. F. Guess intermediate results and make changes if the guesses are wrong.

254. The first step in adding two floating point numbers is (205) A. Make the exponents equal B. Compare the signs. C. Convert negative numbers to twos-complement notation. D. Make the fractional parts equal. E. Express the numbers in binary fractions. F. Adjust the numbers so the exponents are the same. G. Make the numbers the same length.

A. Make the exponents equal F. Adjust the numbers so the exponents are the same.

247. the NaN notion can result from (199) A. Performing an operation with a NaN value. B. Divide by zero C. Subtracting two numbers which are nearly the same D. Adding a large positive and negative numbers E. Multiplcation by zero.0 F. Incorrect use of associativity. G. A sign miscompare

A. Performing an operation with a NaN value. B. Divide by zero

229. How is multiply overflow handled in MIPS? (188) A. Software must check the hi half of the product B. There is no overflow if the multiplier and multiplicand are both less than 32 bits C. The EPC register contains the result of the overflow. D. the sign-bit logic prevents overflow E. It will not occur if a 64-bit result is used. F. The 32-bit product register is long enough to prevent overflow G. It triggers an exception.

A. Software must check the hi half of the product E. It will not occur if a 64-bit result is used.

220. The EPC register is used for (182) A. Storing the PC when an exception occurs. B. performing a crash dump C. resuming a halted program D. Figuring out if the program will be terminated or not. E. handling environmental protection faults F. Storing the address of the instruction causing overflow G. Determining the cause of the exception.

A. Storing the PC when an exception occurs. F. Storing the address of the instruction causing overflow

235. Whereas a simple multiplication algorithm is based on read a bit, conditionally add and shift, a simple division is based on (190) A. Subtract and shift and conditionally write a bit B. Checking to see if the result of a subtraction is positive, and setting a bit if so. C. Take the log2 of the divisor and shift left that many bits. D. Take the log2 of the divisor and shift right that many bits. E. Judicious placements of ones and zeros in the quotient. F. Successive subtractions without shifting. G. Add and shift the opposite direction.

A. Subtract and shift and conditionally write a bit B. Checking to see if the result of a subtraction is positive, and setting a bit if so.

208. Integer addition and subtraction use the same add-and-carry logic in the CPU. (178) A. T B. F

A. T

234. A simple and efficient way to implement division is to (189) A. use hardware to perform "grammar school" division B. Run multiply hardware with reversed voltages. C. Use transistors to add bits. D. perform successive subtractions at clock speed. E. Look up the answers in a division table. F. Implement long division in hardware. G. Group bits into fours and perform hexadecimal division.

A. use hardware to perform "grammar school" division F. Implement long division in hardware.

249. The length of a single-precision floating point binary number is ____ bits (200) A. 128 B. 32 C. 64 D. 16

B. 32

244. In single-precision binary floating point notation, the exponent is ______ bits long (198) A. Five B. Eight C. 52 D. 11 E. 23 F. 8 G. Ten

B. Eight F. 8

207. Computers write numbers to memory differently than characters (178) A. T B. F

B. F

210. Because binary representation involves only 0's and 1's, carrying in addition is unnecessary. (179) A. T B. F

B. F

246. The standard for floating point notation is (198) A. ISO-9000 B. IEEE-754 C. ASA-400 D. NFPA-1002

B. IEEE-754

228. Moore's law allows multiplications to be faster because (187) A. Faster circuits will consume less power. B. More hardware means operations can be done in parallel. C. High clock frequency means shorter clock period. D. Lower voltages operate with less resistance. E. More transistors means more adders, up to one per multiplier bit F. Longer instructions can do more. G. Loop unrolling provides adequate parallelism.

B. More hardware means operations can be done in parallel. E. More transistors means more adders, up to one per multiplier bit

225. A simple implementation of a multiplier (183) A. Is also the quickest. B. Performs a binary version of elementary school-style multiplication. C. Holds the product in a 48-bit register (not including the sign bit) D. Anticipates the carry at the mid-point E. shifts the multiplicand left for each bit of the multiplier, and adds it to the product if the multiplier bit is 1 F. Can be pipelined. G. Calculates the logarithm of the multiplier and multiplicand, adds them and then takes the antilog to form the product

B. Performs a binary version of elementary school-style multiplication. E. shifts the multiplicand left for each bit of the multiplier, and adds it to the product if the multiplier bit is 1

241. Binary representations of floating point numbers have greater range but less precision than binary representations of integers (196) A. F B. T

B. T

222. Addition can be speeded up by (182) A. adding smaller numbers B. anticipating the high-order carry bit C. Using floating point numbers. D. Lengthening the clock cycle. E. Performing add operations in parallel with more hardware. F. increasing the processor voltage G. widening the address bus

B. anticipating the high-order carry bit E. Performing add operations in parallel with more hardware.

211. In binary, 1011 + 1 = (179) A. 1010 B. 1111 C. 1100 D. 11 E. 0x1100 F. 0xC G. 0x1010

C. 1100 F. 0xC

215. In binary, 1111...10001 - 1111...11000 = (180) A. 1111...11000 B. 0000...01000 C. 1111...11001 D. 0xffffffff E. 1000...01001 F. 0xfffffff7 G. 0xfffffff9

C. 1111...11001 G. 0xfffffff9

217. In which situation does an overflow occur? (180) A. Adding a positive and negative number and getting a negative result. B. Adding two negative numbers and getting a negative result. C. Adding two positive numbers and getting a negative result. D. Adding a positive and negative number and getting a positive result.

C. Adding two positive numbers and getting a negative result.

230. Faster multipliers (188) A. Perform shifts and adds sequentially. B. Cannot be pipelined. C. Are easier to implement than faster dividers. D. Use much higher clock speeds. E. Work better with smaller numbers. F. Can be created with less hardware than a standard multiploer. G. Perform more than one operation at once

C. Are easier to implement than faster dividers. G. Perform more than one operation at once

233. The two operands of the division process are (189) A. Must have the same sign. B. The quotient and the dividend C. Can be stored in conventional registers. D. The quotient and the remainder E. Are stored in the HI and LO registers. F. The dividend and the divisor G. The dividend and the remainder

C. Can be stored in conventional registers. F. The dividend and the divisor

223. Twos-complement is a method of (182) A. Adding logarithms. B. Performing addition. C. Expressing negative numbers D. Converting a number such that its sum with the original number is zero. E. A method of detecting overflow. F. A method of preventing overflow. G. Multiplying numbers.

C. Expressing negative numbers D. Converting a number such that its sum with the original number is zero.

232. The two parts of the integer division result are (189) A. Stored in consecutive floating point registers, e.g., $f0 and $f1. B. The quotient and the dividend C. Stored in the HI and LO registers. D. The dividend and the divisor E. The dividend and the remainder F. Stored in consecutive integer registers, e.g., $s0 amd $s1. G. The quotient and the remainder

C. Stored in the HI and LO registers. G. The quotient and the remainder

214. Which does not indicate an overflow? (179) A. Subtracting a positive number from a negative number and getting a positive result. B. Subtracting a negative number from a positive number and getting a negative result. C. Subtracting one positive number from another and getting a negative result. D. Adding two positive numbers and getting a negative result E. Borrowing from the sign bit when subtracting F. Subtracting two negative numbers and getting a positive result. G. adding two negative numbers and getting a positive result

C. Subtracting one positive number from another and getting a negative result. F. Subtracting two negative numbers and getting a positive result.

221. After an exception, the EPC register contains (182) A. The system exit instruction. B. The reason why the exception occurred. C. the PC when the exception occurred. D. The location of the crash dump E. the address of the exception handling routine F. the result of the overflow calculation G. The address of the instruction where processing may resume.

C. the PC when the exception occurred. G. The address of the instruction where processing may resume.

245. In single-precision binary floating point notation, the fraction is ______ bits long (198) A. 52 B. Nine C. 11 D. 23 E. Twenty-three F. Sixteen G. 8

D. 23 E. Twenty-three

250. The length of a double-precision floating point binary number is ____ bits (200) A. 32 B. 16 C. 128 D. 64

D. 64

209. Twos complement is (179) A. A way of adding positive numbers B. A simplification for long division C. How to figure out the sign of the result. D. A way of representing negative numbers E. A way of preventing overflow F. A way to speed up multiplication. G. A way of changing the sign of a number.

D. A way of representing negative numbers G. A way of changing the sign of a number.

255. Normalization is (205) A. Converting the number from binary to hexadecimal. B. The same as rounding. C. Setting the exponents so they are equal. D. Ensuring the binary scientific notation has only a 1 left of the binary point. E. Adjusting the exponent so that the number is >=1 and < 2. F. Making the exponent equal to zero. G. Making the fractional part equal to zero.

D. Ensuring the binary scientific notation has only a 1 left of the binary point. E. Adjusting the exponent so that the number is >=1 and < 2.

243. A floating point number is composed of (197) A. 16 bits for the signed numerator, 16 bits for the denominator. B. Sign, Extent C. Exponent, Fraction, Logarithm D. One bit for the sign, 8 for the exponent and 23 for the fraction. E. Sign, Characteristic, Mantissa F. The logarithm of the number. G. Sign, Exponent, Fraction

D. One bit for the sign, 8 for the exponent and 23 for the fraction. G. Sign, Exponent, Fraction

239. If by mistake you divide a positive number by a negative number using unsigned divide (divu) (194) A. The remainder and the quotient are interchanged. B. The quotient is zero and the remainder is the divisor C. The result will overflow D. The quotient is zero. E. An exception occurs F. The remainder is the dividend. G. The remainder will be zero.

D. The quotient is zero. F. The remainder is the dividend.

227. Signed multiplication (187) A. Is no different fron unsigned multiplication. B. Throws an exception if the sign of the multiplier and multiplicand is not the same as the sign of the product C. Performs right-shifts if either multiplier or multiplicand but not both is negative D. XORs the sign bits to determine the sign of the result. E. forms the product from unsigned numbers and two-complements the product if the multiplicand and multiplier signs are different F. Performs successive subtractions to determine the result G. Cannot cause overflow conditions.

D. XORs the sign bits to determine the sign of the result. E. forms the product from unsigned numbers and two-complements the product if the multiplicand and multiplier signs are different

218. Processing data for multimedia, especially graphics, has led to (181) A. Smaller instruction sets. B. quad-precision floating-point instructions. C. Processor heat load D. register partitioning for vector math E. wider cache buses F. three-color processors G. Long registers with carry partitions.

D. register partitioning for vector math G. Long registers with carry partitions.

224. Ignoring the sign bit, the length of the product of an m-bit multiplicand and an n-bit multiplier is (183) A. 2n bits B. 32 bits. C. 2m bits D. up to m + n bits E. 64 bits. F. The sum of the lengths of the shortest expression of the operands. G. m + n + 1 bits

D. up to m + n bits F. The sum of the lengths of the shortest expression of the operands.

237. In determining the sign of the quotient, what rule must always hold? (193) A. The sign bit of the remainder is the XOR of the operands' sign bits. B. sign of Remainder = sign of quotient C. Remainder = Quotient * Divisor - Dividend D. The remainder is always positive. E. Remainder = Dividend - Quotient * Divisor F. sign of Remainder = sign of divisor G. Dividend = Quotient * Divisor + Remainder

E. Remainder = Dividend - Quotient * Divisor G. Dividend = Quotient * Divisor + Remainder

216. When MIPS detects an overflow condition a(n) _____ occurs (180) A. reboot B. branch C. halt D. dump E. interrupt F. crash G. exception

E. interrupt G. exception

253. Another name for the fractional part of a floating point number is the (204) A. Exponent. B. Reduction. C. Denominator. D. Precision. E. Numerator. F. Significand.

F. Significand.

252. Which is (are) the most complex operation(s) for floating point calculations in the list below? (203) A. Rounding B. Comparison with zero C. Division D. Multiplication. E. magnitude sorting F. Subtraction G. Addition

F. Subtraction G. Addition


Kaugnay na mga set ng pag-aaral

Ch.3 Introduction to Classes, Objects, Methods and Strings

View Set

SOS HIGH SCHOOL HEALTH QUIZ 1: MENTAL, SOCIAL, AND EMOTIONAL HEALTH.

View Set

eCommerce Exam 1 Chapter 3 Pt. 1

View Set

Partnerships (GP, LLP, LP, LLC, etc)

View Set

Career Essentials in Generative AI by Microsoft and LinkedIn

View Set