Professional Documents
Culture Documents
Microprocessor Exit Exam Reviewer: "PUSHED" Last
Microprocessor Exit Exam Reviewer: "PUSHED" Last
1. Based from order, when the instruction PUSHA is applied, which of the following
register is "PUSHED" last?
A. CX
B. AX
C. SI
D. DI
Note:
PUSH – push data onto stack
PUSHW - push word onto stack
PUSHD - push double word onto stack
PUSHA - push all registers to stack (60)
*Processors pushed the registers in the order: AX, CX, DX, BX, SP, BP, SI and DI.
The SP word pushed is the value before the first register is pushed.
PUSHF - push flags onto stack (9C)
3. The lower byte of the flag register contains 83h. Which flag registers are cleared as
a result of executing LAHF instruction?
A. PF (PARITY, ZERO, AUXILLIARY ARE CLEARED : MICRO BOOK
PAGE 87)
B. SF
C. none of the choices
D. CF
4. The lower byte of the flag register contains 83h. Which flag registers are set as a
result of executing LAHF instruction?
A. PF
B. ZF
C. AF
D. SF (SIGN, AND CARRY FLAGS ARE SET: MICRO BOOK PAGE 87)
5. The lower byte of the flag register contains 83h. What is the result of an LAHF
instruction?
A. AH = 83h
B. AX = 83h
C. AL = 83h
D. all the flags are set to 83h
8. Prevent changing the location POPA which register is not loaded with data
Ans. SP or ESP
Note: POPA Pop All Registers; Intel 80x86; move memory pointed to by stack pointer
to all 16-bit general purpose registers (except for SP); does not affect flags
48. Which of the following is BIT 55. Type of RAM that changes during
MANIPULATION? regular interval
Choices: [SHL, OR, AND] Choices: [Static RAM, Dynamic RAM,
Ans. SHL (pero sa ibang ref. lahat ROM, NVRAM]
yan bit manipulation, check lecture Ans. Dynamic RAM
note 7 manlises)
56. INT AX, DX Ans. R=1 S=1
Ans. Read from DX, write to AX 62. If an ASCII of A is used with odd
parity, the results is
57. Where will you know if it is in 16 Ans. 1100 0001 (C 1)
bit or 32 bit? 63. If an ASCII of A is used with even
Choices: [AV, D, G, RPL] parity the results is
Ans. D (read COE121 LECTURE Ans. 0100 0001 (4 1)
NOTE 5_MICRO_COMANLISES)
64. A parity bit is used in error
58. Memory of 8 bit? detecting codes, if an ASCII of T is
Choices: [16kB, 8kB, 64kB] used with odd parity the result is
Ans. 64kB Ans. 0101 0100 (5 4)
59. Translation lookaside buffer 65. Decimal parallel adder that adds 5
- a memory cache that is used to reduce decimal digits requires how many BCD
the time taken to access a user memory adder stages?
location. It is a part of the chip’s A. 5
B. 6
C. 3
D. 4
Note:
parallel adder: n decimal digits need
n BCD adder stages
multiplier: n-1 sa isang OT, yung
sinulat ni gelo ndigits(ndigits-1)
001
C. 011
D. 010
80. Under precedence of logical D. (p->(p v q))’
operators which is performed last?
Ans. Biconditional 84. How many basic theorems and
postulates are used to prove the
81. Which of the ff logical operator is expression x + xy = x
performed first? A. 6
Ans. AND (wala daw sa choices yung B. 4
NOT) C. 5
D. 3
Note:
precedence of logical operators -
NOT(Negation), AND(Conjunction),
OR(Disjunction), Note:
IMPLICATION, 3 laws namely; LAW OF UNION,
BICONDITIONAL(Equivalence) DISTRIBUTIVE, and INTERSECTION
Note:
Definition(antisymmetric relation): A
relation R on a set A is called
antisymmetric if and only if for any a,
and b in A, whenever <a, b> R , and
<b, a> R , a = b must hold.
Equivalently, R is antisymmetric if and
only if whenever <a, b> R , and a b ,
<b, a> R . Thus in an antisymmetric
relation no pair of elements are related
to each other.
90. Determine which of the given
Example 7: The relation < (or >) on
any set of numbers is antisymmetric. So
is the equality relation on any set of
numbers.
91. Determine which of the given 95. Registers AX, BX and CX contain
relations on the set of all integers is an the following values respectively:
equivalence relation where (x, y) is an 1234h, 5678h and 9ABCh.
element of R. What is the result of the instruction
A. x is a multiple of y SHRD BX, CX, 8
B. x greater than or equal to y2 A. 9A78h
C. x = y2 B. 9A56h
D. x and y are both negative or both C. 2345h
nonnegative D. BC56h (MICROPROCESSOR
BOOK PAGE 118)
92. Machine code: 0FAC CB08
93.
96. SETNZ AL
If the zero flag indicates an NZ
condition (zero flag is clear), register
AL is set to 01H.
94. SHLD AX, BX, 4 Otherwise, AL is set to 00H.
AX= 1234H BX= 5678H
Ans. 2345H Machine Code: 0FA4 97. What is the result of NEG AX if
AX contains FFECh?
Ans. 0014h Machine Code: F7D8h
109. The 2-4-2-1 code of 7 is: 112. The adjacency matrix of the graph
Ans. 1101 is seen below, determine how many
edges are in the graph.
Note:
We can see that 2 + 4 + 1 will make 7
so we multiply them by 1. The 2 in the
most significant bit has more priority
than the other. Ans. 10
Note: count all the non-zeros to get the
2(1) + 4(1) + 2(0) + 1(1) = 7 no. of edges
Therefore 7 is 1101 in 2-4-2-1 code. 113. Give the adjacency matrix of the
graph G {a,b,c,d}, How many number
GRAPH / MATRIX QUESTIONS of paths from a to d has a length
exactly equal to 4?
110. Determine in-degree in vertex b? 0 1 1 0
Ans. 5
1 0 0 1
Matrix: abcd 1 0 0 1
a0230
b1221 0 1 1 0
c2110 Ans. 8
d1002
114. The graph is represented by the 118. How many pass will it take in
adjacency matrix below. Determine the order to sort the single digit array 3 5 4
out-degree in vertex d 1 2 using selection sort?
A. 5
B. 4
C. 6
D. 10
Ans. 3 Note: For Bubble Sort
115.
V = {a,b,c,d,e},
E = {(a,b),(a,c),(b,c),(c,d),(c,e),(d,e)} is
classified as?
A. Hamiltonian but not Eulerian
B. neither H or E
C. H and E
D. E but not H (Eulerian cycle but
not Hamiltonian)
Note:
Eulerian circuit - visits every edge
exactly once and starts and ends on the
same vertex
Hamiltonian path - visit every vertex
only once
119. Given the following points below,
what is the longest/shortest route?
117. Which of the ff vertex is called a
pendant? Gr to SW 113 mi Gr to Kal 56 mi
Gr to Det 147 mi Gr to Tol 167 mi Ans. eulerian cycle
Kal to SW 137 mi Kal to Det 135 mi
Kal to Tol 133 mi Tol to Det 58 mi
Tol to SW 142 mi Det to SW 98 mi
Ans. T=A’B’C’+A’B’C+A’BC’
A\BC 00 01 11 10
0 0 0 1 0
1 1 1 1 1
154.
When is it false?
149. what is a RISC design? Ans. every x, P(x) is true
Choices:
[PowerRISC, PowerPC, PowerLaptop, 155. ENIAC
none] Ans. Large Brain (Great Brain ‘di ko
Ans. PowerPC sure kung meron sa choices, Large
brain lang naaalala ko)
150.
MOV AL, AE 156. Which is not a program transfer
MOV BL, 9A instruction?
SUB AL,BL Choices:[ADD, CMPS, SHL]
Flags: SF=0 CF=0 ZF=0 IF=0 Ans. ADD (aralin nalang lahat ng
Ans. program transfer para masagutan
‘to)
151. MOV CX, 7, what machine code?
Ans.