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.
1.
Which popular programming language is well-known for executing its target programs on a virtual machine? Java
2.
In any numbering system, the ____ specifies the number of different symbols that can be assigned to a single digit. base or radix
3.
Translate the following decimal numbers to binary: a. 33 00100001 b. 16 00010000 c. 7 00000111 d. 72 01001000
4.
Translate the following decimal numbers to hexadecimal: a. 33 21 b. 95 5F c. 257 d. 74
101
4A
5.
Add the following binary integers: 101101 and 00111011
6.
Form the 8-bit two's complement of each binary integer: a. 00000001 11111111 b. 00001000 c. 11110000 d. 00001111
11111000
00010000
11110001
1101000
7.
Translate the following signed decimal numbers to binary: a.
33 11011111 b.
78 c.
7 d.
10110010
11111001
11111111
8.
Convert the following string to a sequence of hexadecimal ASCII codes: "AX123"
58h, 31h, 32h, 33h (supply students with an ASCII table if you use this question)
41h,
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4 th Edition 1
(Some of the following questions have more than one correct answer. Circle all correct answers.)
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
11.
A computer directly executes programs written in its _______ language. a. system b. native c. interpreted d. machine answer: b,d
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
13.
Is the expression X
(Y
Z) equivalent to (X
Y)
(X
Z) for all possible inputs of X, Y, and
Z? a. yes b. no 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
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4 th Edition 2
15.
A dynamic link library (DLL) is usually written in C++ or assembly language. a. true b. false ans: a
16.
A interpreter decodes and executes one program statement at a time. a. true b. false ans: a
17.
A virtual machine may only be constructed from software. 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
20.
A single hexadecimal digit can be used to represent 5 binary bits. a. true b. false ans: b
21.
The most significant bit in a binary byte is numbered bit 7. a. true b. false ans: a
22.
The sum of all powers of 2 between 2 0 and 2 7 is 255. a. true b. false ans: a
23.
A quadword is 8 bytes. a. true
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4 th Edition 3
b. false ans: a
24.
A word (on Intel systems) is 16 bits. a. true b. false ans: a
25.
A doubleword is 64 bits. a. true b. false ans: b
26.
A signed integer stores the sign in the least significant bit (LSB). a. true b. false ans: b
27.
If an integer's sign bit is 1, the integer is negative. a. true b. false ans: a
28.
A signed byte can be equal to +128. 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
32.
The expression
X
Y is true when X is false and Y is true .
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4 th Edition 4
a. true b. false ans: a
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
35.
The integer range of standard ASCII codes is: a. -128 to +127 b. 0 to 127 c. 0 to 270 d. 0 to 65,535 ans: b
36.
How many bits are used by Unicode characters? a. 7 b. 8 c. 16 d. 24 ans: c
37.
Which type of program must usually run on multiple platforms? a. device driver b. business application c. embedded system d. assembler answer: b
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
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4 th Edition 5
39.
A program is considered portable if it . . . a. can be rewritten in a different programming language without losing its meaning. b. can be quickly copied from conventional RAM into high-speed RAM. c. can be executed on multiple platforms. d. none of the above answer: c
40.
A device driver would ordinarily be written in . . . a. machine language b. assembly language c. a platform-independent language, such as Java d. an application-oriented language answer: b
41.
Which of the following are embedded systems applications? a. an accounting program b. a javascript program running on a Web page c. a Nintendo® video game d. a phone book searching program in a cellular phone answers: c, d
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
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4 th Edition 6
d. microcode interpreter answer: c
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. 2 32
1 b. 2 32 c. 2 31
1 d. 2 31 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
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4 th Edition 7
c. 6A, 5F, 101 d. 51, 149, 599 answer: a
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
53.
Which of the following binary values is equivalent to hexadecimal 4A2B? a. 0100 1010 0010 1101 b. 0100 1010 0010 1011 c. 0100 1010 0010 1011 d. 0110 1011 0010 1001 answer: c
54.
Which of the following binary values is equivalent to hexadecimal 7CBE? a. 0111 1101 1011 1110 b. 0111 1011 1011 1100 c. 0111 1100 1100 1110 d. 0111 1100 1011 1110 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
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4 th Edition 8
Irvine, Kip R. Assembly Language for Intel-Based Computers, 4 th Edition 9