1 of 5
Question # 1. Multiple-Choice (20 points; 2 points each)
1. Flat addressing is used in which processor mode(s)?
a. Protected
b. Virtual-8086
c. Real-address
d. System management
2. 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
d. microcode interpreter
3. Which directive identifies the part of a program containing instructions?
a. .DATA
b. .CODE
c. .STACK
d. .PROG
4. Segment-offset addressing is used in which processor mode(s)?
a. Protected
b. Virtual-8086
c. Real-address
d. System management
5. The three types of buses connected to the CPU are:
a. data, system, address
b. address, control, memory
c. data, address, control
d. fetch-decode, control, execution
2 of 5
6. What is the smallest signed integer that may be stored in 16 bits?
a. -32767
b. -65536
c. -65535
d. -32768
7. Which flag is set when the result of a signed arithmetic operation is too large to fit?
a. Sign
b. Carry
c. Overflow
d. Auxiliary Carry
8. Which register is known as an accumulator?
a. EDX
b. EBX
c. ECX
d. EAX
9. During which phase of the instruction execution cycle does the program counter is incremented?
a. decode
b. execute
c. operand fetch
d. fetch
10. List the three primary steps of the instruction execution cycle, in sequential order:
a. fetch, decode, memory write
b. fetch, memory read, execute
c. decode, fetch, execute
d. fetch, decode, execute
3 of 5
Question # 2. Short Answer (20 points; 5 points each)
1. What is the range of signed integers that may be stored in a 32 bit register?
2. What is the value and the order of operations in the expression 6 MOD 5+ (24+1) * 4?
3. In real-address mode, convert the following hexadecimal segment-offset address to a 20-bit
physical address: 8AF4:C92D.
4. Construct the truth table for the Boolean expression X (Y Z)
X Y Z Y Z X (Y Z)
4 of 5
Question # 3. Tracing Problem (10 points)
What is the final hexadecimal value of AX when this code executes? Add comments next to each
instruction.
TITLE AddSub program
INCLUDE Irvine32.inc
.code
main PROC
mov ax, 4000h ; ax =
mov bx, 2000h ; bx =
mov cx, 1500h ; cx =
sub ax, bx ; ax =
sub ax, cx ; ax =
add ax, ax ; ax =
call DumpRegs
exit
main ENDP
END main
AX =
______________________
Question # 4. Hexadecimal Arithmetic (20 pts, 10 points each)
Perform the following operations:
5ECE
16
286B
16
+3CDF
16
- 584A
16
5 of 5
Question # 5. Base Conversion (20 points, 5 points each)
Change the following:
1. 4456
8
to Hexadecimal
2. 2AB
16
to Decimal
3. 4766
8
to Binary
4. 5AEE
16
to Binary
Question # 6. Two's Complement Arithmetic (10 points)
Perform the following calculation in 8-bit 2s complements arithmetic. Be sure to give the final
answer in decimal. In each case, indicate when arithmetic overflow occurs. Also indicate when a
carry out is discarded from the most significant bit position.
(65) + (66)