Chapter 1
Chapter 1
Note to instructors: To view the answers, select Tools | Options | View | Hidden Text in MS-Word.
Last update: 09/27/2002
Copyright Kip Irvine. All rights reserved. You may use and modify this test for instructional
purposes as long as you have adopted Assembly Language for Intel-Based Computers (Irvine) for
your current semester course. You are welcome to edit and extract questions from this test as long
as you do not reproduce or distribute the questions outside of your own classroom.
2. In any numbering system, the ____ specifies the number of different symbols that can be assigned
to a single digit. base or radix
8. Convert the following string to a sequence of hexadecimal ASCII codes: "AX123" 41h,
58h, 31h, 32h, 33h (supply students with an ASCII table if you use this question)
9. A program that combines object files into an executable program is called a _________.
a. compiler
b. loader
c. linker
d. assembler
answer: c
10. If virtual machine V2 is radically different that virtual machine V1, what major problem results
when we try to run V2 programs on machine V1?
a. translation is too difficult
b. machine V2 cannot run V1 programs
c. V1 would have to be written in microcode
d. V2 would have to be implemented by software
answer: a
12. What is the value of the booloean expression X (Y Z), when X=true, Y=false, and Z=true?
a. true
b. false
ans: a
14. The following C++ expression can be written using only two lines of assembly language code:
X = (Y + 4) * 3;
a. true
b. false
ans: b
18. The operating system is considered a virtual machine in the example hierarchy shown in this
chapter.
a. true
b. false
ans: a
19. If ISA-level instructions could be executed directly by computer hardware, a microcode interpreter
would be unecessary.
a. true
b. false
ans: a
26. A signed integer stores the sign in the least significant bit (LSB).
a. true
b. false
ans: b
29. Boolean algebra was invented by Samuel M. Boole, an American inventor who lived in the 1920's.
a. true
b. false
ans: b
30. The expression X Y is true only when X and Y are both true.
a. true
b. false
ans: a
31. The expression X Y is only true when X and Y are both true.
a. true
b. false
ans: b
33. The expression (X Y) is true when X and Y are both false.
a. true
b. false
ans: a
34. The three most basic operators in Boolean algebra are AND, OR, and NOT.
a. true
b. false
ans: a
38. Which of the following best describes the relationship between assembly language and machine
language?
a. one to many
b. one to one
c. many to one
d. many to many
answer: b
42. Suppose a program written in language L1 must be executed on a machine running a program
running in language L0. What important operation must take place?
a. translation of the entire L1 program into L0 code
b. translation of the L0 program into L1 code
c. creation of a language L3 that interprets L0 instructions
d. interpretation of each L1 statement using L0 code as the L1 program is running
answers: a, d
43. Conventional machine language instructions are executed by which virtual machine level?
a. microarchitecture level
b. ISA level
c. assembly language level
d. operating system level
answer: a
44. Which language (or virtual machine) uses short mnemonics such as ADD and SUB to identify
instructions?
a. conventional machine language
b. ISA-level language
c. assembly language
45. What is the largest unsigned integer that may be stored in 16 bits?
a. 32767
b. 65536
c. 65535
d. 32768
answer: c
46. What is the largest signed integer that may be stored in 32 bits?
a. 232 1
b. 232
c. 231 1
d. 231
answer: c
47. The two's complement of an integer is formed by doing which of the following?
a. reversing (inverting) the bits and adding 1
b. adding 1 and reversing the bits
c. calculating the integer's additive inverse
d. changing the highest bit to a 1
answers: a, c
48. Which of the following unsigned decimal values is equivalent to binary 10110101 ?
a. 179
b. 181
c. 182
d. 175
answer: b
49. Which of the following unsigned decimal values is equivalent to binary 11110000 ?
a. 216
b. 150
c. 240
d. 238
answer: c
50. Which list contains the correct hexadecimal translation (in order) of the following unsigned
decimal integers? 33, 95, 257
a. 21, 5F, 101
b. 22, 5E, 11A
51. Which of the following signed decimal values is equivalent to binar 11110000 ?
a. 8
b. 16
c. 240
d. +240
answer: b
52. Which of the following signed decimal values is equivalent to binar 00001111 ?
a.
b.
c. 15
d. +15
answer: d
55. Which of the following is the binary translation of signed decimal 33 ?
a. 11011111
b. 10101011
c. 11001100
d. 11100011
answer: a