Revi CAAL 020124
Revi CAAL 020124
Câu 2: A system programmer needs to divide 6247 by 300 (decimal). Instruct him
to code in debug (number must be in hex) and the result should be?
MOV AX, E799
CWD
MOV BX, 012C
IDIV BX
Result: AX = FFEC; DX = FF09
Câu 3: Write mask byte (in hex) to clear the lower 4 bit of a byte value with AND
instruction.
1111 00002 = 𝐹016
Câu 4: To isolate one or more bits in a byte value, use AND instruction.
Câu 5: EAX now stored a 32-bit IP address of a host. The network ID (netID) is 20 bit
and can be extracted from IP byte anding with a 32-bit mask. Write correct
instruction to extract netID from EAX register.
MOV EAX, FFFFF000
Câu 6: The following sequence of instructions are executed. What is the correct
values at watch point?
MOV AX, 67FE
MOV BX, AX BH = 6716 BL = FE16
MOV CL, BH CL: 6716
MOV CH, BL CH: FE16
Result: CX = FE67; BX = 67FE
Bee Kid
Câu 7: The following sequence of instructions are executed. What is the correct
value of flag bits at watch point?
MOV EAX, 12AE
SUB EAX, 12AF 12AE – 12AF = FFFF16 = -110
Sign flag: set
Zero flag: reset
Carry flag: set
0001 0010 1010 1110
-
0001 0010 1010 1111
1 1111 1111 1111 1111
Câu 8: Physical address of the stack pointer is 2DA82, stack segment located at
1DAE. Computer the value of SP register?
1𝐷𝐴𝐸16 = 759810
2𝐷𝐴8216 = 18701010
Address = 16 * segment + offset = 16 * SS + SP
Value of SP: 187010 − 16 ∗ 7598 = 6544210 = 𝐹𝐹𝐴216
Câu 10: Enter debug command to fill 256 bytes in data segment starting from 100
with value 0D
f 100 1FF 0D
1𝐹𝐹16 = 10016 + 10016 − 1
Câu 12: Match the correct answer for binary operations on the left
1111111 111 = 1111000
Bee Kid
Câu 14: The following sequence of instructions are executed. What is the correct
value of CF and OF at watch point?
MOV AX, 140h
MOV CX, 8h
MUL CX AH = 0A; AL = 00h
Result: CF = Reset; OF = Reset
0001 0100 0000
*
0000 0000 1000
0 1010 0000 0000
Câu 15: To test one bit in a byte value without destructing the byte, use TEST
instruction.
Câu 17: Select correct match for register values at watch points:
MOV AX, 152D
ADD AX, 003F AX = 156C
watch point #1:
ADD AH, 10 AX = 256C
watch point #2:
.....
Watch point #1: AH = 15 AL = 6C
Watch point #2: AH = 25 AL = 6C
Bee Kid
Câu 18: A memory location located in extra segment which now has value of 564F.
This memory managed by ES:SI registerpair. SI now points to 905F. Compute the
physical address of this memory
location
Address = 16 * segment + offset = 16 * SS + SP = 16 * 564F + 905F = 5F54F
Câu 19: Select correct match for AL and carry flag at watch point #1:
MOV BL, 8C BL = 8C
MOV AL, 7E AL = 7E
ADD AL, BL AX = 010A AH = 01 AL = 0A
watch point #1:
Result: AL = 0A CF = set
1000 1100
+
0111 1110
1 0000 1010
Câu 20: Convert the 32-bit floating-point number C4361000 (in hex) to decimal.
𝐶436100016 = 1100 0100 0011 0110 0001 0000 0000 00002
32-bit: 1-bit sign + 8-bit exponent + 23-bit mantissa
Sign: 1
Exponent: 100 0100 02 = 13610
Bias: 28−1 − 1 = 127
E = 136 – 127 = 9
865
Mantissa: 011 0110 0001 0000 0000 0000 = 2−2 + 2−3 + 2−5 + 2−6 + 2−11 = 2048
865
Result: (−1)1 (1 + 2048) 29 = −728,25
Câu 21: Which of the following instructions are not legal addressing?
Select one or more:
MOV AX, [DI]
MOV AX, [BX + SP]
MOV AX, [SP + 1]
MOV CX, [SI]
Câu 22: Compute the physical address of stack top if stack pointer is FFAE and stack
segment located at 1DAE
Address: 16 * SS + SP = 16 * segment + offset = 1016 ∗ 1𝐷𝐴𝐸 + 𝐹𝐹𝐴𝐸 = 2𝐷𝐴8𝐸
Câu 24: The following sequence of instructions are executed. What is the correct
value of AX, CX, DX at watch point?
MOV AX, 30 AX = 001E
MOV CX, FFFF CX = FFFF
MUL CX AX = FFE2; DX = 001D
watch point:
Result: AX = FFE2 CX = FFFF DX = 001D
Câu 25: Write mask byte (in hex) to set bit 6th, 4th of a byte value with OR
instruction (LSB is the 1st bit).
0010 1000 = 2812
Câu 28: Consider a 16-bit microprocessor, with a 16-bit external data bus, driven
by an 10-MHz input clock. Assume that this microprocessor has a bus cycle whose
minimum duration equals four input clock cycles. What is the maximum data
transfer rate across the bus that this microprocessor can sustain?
1
Cycle clock = seconds
10𝑀
1
1 bus cycle has 4 input clock cycles → 1 bus cycle = 4. 10𝑀 seconds
16-bit → 2 Bytes
1
Maximum data: 2/ (4. 10𝑀) = 5.106 𝑏𝑦𝑡𝑒𝑠/𝑠𝑒𝑐𝑜𝑛𝑑 = 5𝑀𝐵/𝑠
Bee Kid
Câu 29: The memory stack area of a program shown in figure. The value of SP
register is 1D50. What is the value of SP follows the execution of PUSH SI
Value AF 90 71 DA
SP = 1D50 – 2 = 1D4E
Câu 30: A benchmark program is run on a 40Mhz processor. The executed program
consists of 100000 instructions executions, with the following instructions mix and
clock cycle count:
Calculate MIPS rate for this program
Câu 32: What is the correct value of SI, AL (in hex) at watch point:
01: MOV SI, 300h
02: MOV AL, 10h AX = 0010
03: MOV CX, 7 CX = 0007
04: Loop_label:
05: MOV [SI], AL
06: ADD AL, 10h
07: INC SI
08: LOOP Loop_label
watch point:
Result: SI = 307h AL = 70h
Câu 33: The principle of cache memory relies on key features: locality of reference
which involves spatial and temporal locality. Match the definition to keywords on
the left
Temporal locality
- The tendency for a processor to access memory locations that have been used recently
- Be exploited by keeping recently used instruction and data in cache memory and by exploiting
a cache hierarchy
Spatial locality:
- The tendency of execution to involve a number of memory locations the are clustered. The
tendency to use large cache and prefetch mechanism
- be exploited by using larger cache blocks and by incorporating prefetching mechanisms into
the cache control logic
Câu 34: For memory hierarchy below, which relationship hold when moving
downward
Increasing access time
Decreasing cost per bit
Decreasing frequency of access by the processor
Increasing capacity
1
Result: (−1)0 (1 + ) 23 = 12
2
Câu 36: In computer organization, the CPU transfer rate is much higher than that
of memory. It is easy to match performance of these components by:
Select one:
increase the bus speed
increase I/O speed
producing faster memory module
Introducing cache memory
Câu 37: The instruction that loads the AH register with the lower byte of the flag
register is LAHF
LAHF = load AH from flag
SAHF = store AH to flag
PUSHF = push flag to stack
Câu 38: Which are correct about 32-bit index registers of IA-32 processors:
Select one or more:
☐ESH, EDH: 16-bit pointers to higher memory above 1M
☒SI: 16-bit pointer to source memory in data movement instructions
☒ESI: 32-bit pointer to source memory in data movement instructions
☒EDI: 32-bit pointer to destination memory in data movement instructions
☒DI: 16-bit pointer to destination memory in data movement instructions
Câu 39: The following sequence of instructions are executed. What is the correct
value of flag bits at watch point?
MOV AL, 0F AL = 0000 1111
ADD AL, F1 AL (8-bit) = 0000 1111 + 1111 0001 = 1 0000 0000
Result: ZF = set; CF = set;
Câu 43: 8088 is 16-bit processor, the maximum addressable memory is: 1MB =
1024KB
8088 has 8-bits datas and 20-bits addresses
Câu 44: Select correct definition of seek time, rotational delay, access time,
transfer time for hard drives with moveable-head system:
Access time: transfer time
Rotational delay: time for the sector in the request track to reach the head
Seek time: time for the head to settle at the request track
Câu 45: Which of the following instructions are not legal addressing?
Select one or more:
☒MOV AX, [SP + 1]
☐MOV AX, [DI]
☐MOV CX, [SI]
☒MOV AX, [BX + SP]
Chỉ lấy giá trị của SP, không thể lấy địa chỉ của SP
Câu 46: A memory chip has 12 address pins, determine the maximum memory
words of this chip?
212 = 4096
Câu 47: Convert 0.1015625 to IEEE 32-bit floating point format (1 sign + 8 exponent
+ 23 mantissa)
Convert to Binary: 0,0001101 = 1,101.10−4
Mantissa: 101 0000 0000 0000 0000 0000
Exponent: −4 + 28−1 − 1 = 12310 = 0111 10112
Sign: 0
Result: 0011 1101 1101 0000 0000 0000 0000 00002 = 3𝐷𝐷0000016
Bee Kid
Câu 49: Select the correct sequence of instructions to compute -1024/128 (all
values are in hex).
MOV AX, FC00 AX = FC00
CWD Convert Word to DoubleWord
MOV CX, 80h CX = 0080h
IDIV CX AX = FFF8 DX = 0000
Câu 51: Part of computer memory is shown in figure. What is the value of AX
register after instruction MOV AX, [1D4B] execute
Value 03 7F F5 2D 5A 12 7B C0
AX = 5A2D
Câu 52: Choose correct RAID volume definitions for a request 2T storage.
RAID 0 Striped volume: 2 x 1T HDDs are needed, enhance data transfer, no fault tolerance,
data lost when one HDD fails
RAID 1 Mirror volume: 2 x 2T HDDs are needed, no data lost when the primary storage fails
Spanned Volume: 2T HDD + more HDDs to extend storage, no fault tolerance, data lost
when one HDD fails
RAID5 Volume: At least 3 x 2T HDDs, fault-tolerance, no data lost, no down-time
Câu 53: Select correct level for contemporary computer multilevel machine
Level 0: Digital logic level
Level 1: Microarchitecture level
Level 2: Instruction set level
Level 3: Operating system level
Level 4: Assembly Language level
Bee Kid
Câu 54: the instruction, CMP to compare source and destination operands by
Subtracting
Câu 55: Write mask byte (in hex) to clear bit 2nd, 3rd, 5th of a byte value with AND
instruction (LSB is 1st bit).
1110 1001 = 𝐸916
Câu 56: To evaluate processor performance, the following indicators and formulas
are used:
∑𝒏
𝒊=𝟏 𝑪𝑷𝑰𝒊 ∗𝑰𝒊
Cycles in Instruction 𝑪𝑷𝑰 = 𝑰𝒄
Time to execute program 𝑻 = 𝑰𝒄 ∗ 𝑪𝑷𝑰 ∗ 𝝉
Or 𝑻 = 𝑰𝒄 ∗ [𝒑 + (𝒎 ∗ 𝒌)] ∗ 𝝉
In which:
𝒑: the number of processor cycles needed to decode and execute the instruction
𝒎: the number of memory references needed
𝒌: the ratio between memory cycle time and processor cycle time
𝝉: cycle time = 1/f
𝐼𝑐 𝑝 𝑚 𝑘 𝜏
Instruction set architecture x x
Complier technology x x x
Processor implementation x x
Cache and memory hirearchy x x
Câu 58: The following sequence of instructions are executed. What is the correct
value of AX, CX, DX at watch point?
MOV AX, 0020
MOV CX, 0010
MUL CL DX = 0000 AX = 0200
watch point:
Result: AX = 0200 CX = 0010 DX = 0000
Bee Kid
Câu 59: In multiplication instruction, the upper half of the result is nonzero implies
which state of Carry flag and Overflow flag?
Select one or more:
☐CF=0
☒OF=1
☐OF=0
☒CF=1
Câu 61: Consider a magnetic disk drive with 8 surfaces, 512 tracks per surface, and
64 sectors per track. Sector size is 1 kB. What is the disk capacity
Disk capacity: 1 ∗ 64 ∗ 512 ∗ 8 ∗ 1 = 262144𝐾𝐵 = 256𝑀𝐵
Disk capacity = (bytes/sector) * (avg. sectors/ track) * (tracks/ surface) * (surfaces/ platter) * (platters/
disk)
Câu 62: Which are the correct inputs for XLAT instruction
Select one or more:
☒look-up index must be loaded into AL
☐look-up index must be loaded into DL
☒DS : [BX] pointed to look-up table
☐DS : [SI] pointed to look-up table
Câu 63: A benchmark program is run on a 40MHz processor. The execute program
consists of 100000 instructions executions, with the following instructions mix and
clock cycle count. Calculate the execution time for this program
𝐼𝑐 ∗ 𝐶𝑃𝐼 100000.1,55 31
𝐶𝑃𝑈 𝑡𝑖𝑚𝑒 = 𝐼𝑐 ∗ 𝐶𝑃𝐼 ∗ 𝜏 = = 6
= = 3,875.10−3
𝑓 40.10 8000
Câu 64: In multiplication instruction, when the source operand is 8 bit, _________ will
be multiplied with source.
Select one:
BX
AL
AX
Whatever general purpose register
Câu 65: Which are the correct actions for LODSW string operation if DF is reset (=0).
Select one or more:
☒Load 16-bit value at memory location pointed by DS : [SI] into AX
☐decrease DI by 2
☐Load 16-bit value at memory location pointed by ES : [DI] into AX
☒increase SI by 2
LODSB: AL ← [DS:SI]
Nếu DF=0 thì : SI ← SI + 1
ngược lại thì : SI ← SI - 1
LODSW: AX ← [DS:SI+1,DS:SI]
Nếu DF=0 thì : SI ← SI + 2
ngược lại thì : SI ← SI – 2
Câu 67: The instruction that loads the AH register with the lower byte of the flag
register is
Select one:
LAHF
PUSHF
AH
SAHF
Bee Kid
Câu 68: For better speed, in CPU design, engineers make use of the following
techniques:
Select one or more:
☒Speculative execution
☒Branch prediction
☒Pipelining
☐Faster CPU internal bus
Câu 69: Which ones are not correct for static RAM?
Select one or more:
☒Cheaper than dynamic RAM because simpler chip controller
☒Cost per bit is lower than dynamic RAM
☒faster than dynamic RAM because they are made from capacitor
☐Cost per bit is higher than dynamic RAM
Câu 71: A system programmer needs to compute 163250 % 32767 + 257 (decimal).
Instruct him to code in debug (number must be in hex) and the result should be?
MOV EAX, 27DB2
MOV BX, 7FFF
DIV BX EDX =00007DB6 EAX = 00000004
ADD EDX, 101h EDX = 7EB7
Cộng vào phần dư
Câu 72: Convert the 32-bit floating point number 3E580000 (in hex) to decimal.
3𝐸58000016 = 0011 1110 0101 1000 0000 0000 0000 00002
Sign: 0
Exponent: 011 1110 02 = 12410
Bias: 28−1 − 1 = 127
E = 124 – 127 = – 3
11
Mantissa: 101 1000 0000 0000 0000 00002 = 2−1 + 2−3 + 2−4 = 16
11
Result: (−1)0 (1 + 16) 2−3 = 0,2109375
Câu 74: Convert the 32-bit floating point number 44363800 (in hex) to decimal.
4436380016 = 0100 0100 0011 0110 0011 1000 0000 00002
Sign: 0
Exponent: 100 0100 02 = 13610
Bias: 28−1 − 1 = 127
E = 136 – 127 = 9
1735
Mantissa: 011 0110 0011 1000 0000 00002 = 2−2 + 2−3 + 2−5 + 2−6 + 2−10 + 2−11 + 2−12 = 4096
1735
Result: (−1)0 (1 + 4096) 29 = 728,875
Câu 75: Select correct match for register values at watch points:
MOV AX, 4FCA AH = 4F AL = CA
ADD AX, DDA9 AX = 2D73
watch point #1:
ADD AH, F3 AX = 2073
watch point #2:
......
watch point #1: AH = 2D AL = 73
watch point #2: AH = 20 AL = 73
Câu 77: Given an assembly code copying the memory buffer Buff1 to Buff2:
PUSH DS
POP ES
LEA SI, Buff1
LEA DI, Buff2
MOV CX,20
;--- Start of block
Tăng SI, DI nên đang xét theo chiều
cp_loop:
tăng địa chỉ
MOV AL, Byte Ptr [SI]
đang thực hiện việc chuyển địa chỉ
MOV Byte Ptr ES:[DI], AL
SI sang DI
INC SI
INC DI
STD bien DF thanh 1 -> xu ly giam
LOOP cp_loop dia chi
; ---End of block
CLD bien DF thanh 0 -> xu ly tang
Choose equivalent string operations in place of block
dia chi
Select one or more:
☐STD
cp_loop:
MOVSB
LOOP cp_loop
☒CLD REP giong nhu LOOP lap lai neu
𝐶𝑋 ! = 0
cp_loop:
MOVSB MOVSB la chep ESI sang EDI
LOOP cp_loop
☒CLD
REP MOVSB
☒CLD
cp_loop:
REP MOVSB
LOOP cp_loop
Câu 79: Make use of string operations, write a sequence of instructions to locate
the last space character on the 10th line of screen by peeking at the display
memory starting from B800. The result is read from the SI register.
MOV BX, 0B800h ; Load base address of display memory
MOV AX, 80 ; Load number of characters per line
MUL 9 ; Multiply by line number (10th line - 1)
ADD BX, AX ; Add result to base address
SUB BX, 2 ; Move to the last character position in the 10th line
FIND_SPACE:
CMP BX, 0 ; Check if we reached the beginning of the display memory
JL NO_SPACE ; If yes, space not found
CMP BYTE PTR [BX], ' ' ; Compare character with space
JE SPACE_FOUND ; Jump if space is found
DEC BX ; Decrement address to check previous character
JMP FIND_SPACE ; Repeat loop
SPACE_FOUND:
MOV SI, BX ; Store address of space character in SI register
JMP AFTER_SEARCH
NO_SPACE:
MOV SI, -1 ; Set SI to a special value (-1) to indicate space not found
AFTER_SEARCH:
; Continue your code here...
Câu 81: The result of an IMUL instruction is 0060, what is the correct state of Carry
flag and Overflow flag? Select one or more: 1111 0000 0000 0110 0000
☐OF=1
☐CF=1
☒OF=0
☒CF=0
Câu 83: After executing PUSH EAX instruction, the stack pointer
Select one:
increment by 1
increment by 2
decrements by 4
decrement by 1
Câu 85: The following sequence of instructions are executed. What is the correct
value of flag bits at watch point?
MOV DL, FF DL = -110
MOV AL, F6 F6 = -1010
IMUL DL AX = 1010 = 000A16 = 0000 0000 0000 10102
watch point:
Result: CF = reset; OF = reset
Bee Kid
Câu 86: A SRAM memory chip labeled 32K x 8bit. Which of the following is correct
pinout regarding address and data lines?
Select one:
15 address pins, 8 data pins
32 address pins, 3 data pins
5 address pins, 3 data pins
32 address pins, 4 data pins
Câu 87: In multiplication instruction, the result is taken from AX means the source
operand is 8 bit
Câu 88: Part of memory as shown in figure. The value of BX register follows the
execution of MOV BX, [1D49] is F57F. What is the endian type of this computer
system
Value 03 7F F5 2D 5A 12 7B C0
big-endian
level-endian
little-endian
non-endian
Câu 89: The memory stack area of a program shown in figure. The value of SP
register is 1D48. What is the value of SP follows the execution of POP SI
1𝐷48 + 2 = 1𝐷4𝐴
Câu 90: Bus is a shared transmission medium, multiple devices connect to it but
only one at a time can successfully transmit. Which component in computer
facilitates this operation?
Select one:
Bus Arbiter
Direct Memory Access (DMA)
Bus master
Programmed I/O
Câu 91: Which set of registers are valid for addressing a memory location?
Select one or more:
☐SS:DI
☒DS:BX
☒DS:SI
☒CS:IP
Bee Kid
Câu 92: A processor with 16-bit instruction set. The instruction composed of 2
fields: the first byte contains the opcode and the remainder the operand or an
operand address. What is the maximum directly addressable memory capacity?
The maximum directly addressable memory capacity for this processor is 65,536 bytes
the processor can directly access 256 bytes of memory. → 256
Câu 93: Convert -89.2345 to IEEE 32-bit floating point format (1 sign+ 8 exponent +
23 mantissa) in hex
89,234510 = 0101 1001,0011 1100 0000 1000 0011 0001 0010 0110 1110 1001
= 1,01 1001 0011 1100 0000 1000 0011 0001 0010 0110 1110 1001.106
Mantissa: 01 1001 0011 1100 0000 1000 0
Exponent: 6 + 28−1 − 1 = 133 = 1000 0101
Sign: 1
Result: 1100 0010 1011 0010 0111 1000 0001 00002 = 𝐶2𝐵2781016
Câu 96: The following sequence of instructions are executed. What is the correct
value of CF and OF at watch point?
MOV AX, FFF6h 1111 1111 1111 0110 = -10
MOV CX, 1000h 0001 0000 0000 0000 = 4096
IMUL CX DX:AX = FFFF6000
watch point:
Result: CF = set; OF = set
Câu 97: Which could be correct ones for the destination operand in a data
movement instruction?
Select one or more:
☒register
☐immediate data
☒memory location
Value 03 7F F5 2D 5A 12 7B C0
Result: AX = 7B12 AH = 7B AL = 12
Value 03 7F F5 2D 5A 12 7B C0
AX = F57F
Bee Kid
Câu 104: Given a code snippet to look for a value (from AL) in memory buffer Buff
Buff DB 11,22,33,44,55
................
01: LEA DI, Buff
02: ------------ ; possibly missing code
03: MOV AL,33
04: MOV CX,5
a_label:
05: ------------ ; possibly missing code
06: CMP Byte Ptr [DI],AL
07: ------------ ; possibly missing code
08: LOOPNZ a_label
...
Choose correct missing instructions in the above sequence of instructions
02: Empty
05: INC DI
07: JE exit_label
Câu 106: The following sequence of instructions are executed. What is the correct
value of AX and DX (in hex) at watch point?
MOV AX, FFF6h 1111 1111 1111 0110 = -10
MOV CX, 1000h 0001 0000 0000 0000 = 4096
IMUL CX DX:AX = FFFFF000
watch point:
Result: DX = FFFF AX = 6000
Bee Kid
Câu 107: To test one bit in a byte value which can be destructive. use AND
instruction.
Câu 108: The following sequence of instructions are executed. What is the correct
value of AX, DX at watch point?
MOV DL, FF DL = FF = -1 DX = 00FF
MOV AL, 42 AL = 2Ah
IMUL DL AX = FFD6
watch point:
Result: AX = FFD6 DX = 00FF
Câu 109: In multiplication instruction, when the source operand is 16 bit, how can
the result be taken?
Select one:
from DX:AX pair
from EAX
from AX:DX pair
from AX
Câu 110: Here after is instruction sequence to compute the sum of 8 bytes starting
at memory address 200. Two lines of code are possibly missing. Choose correct one
to fill in?
01: _____________; possibly missing code
02: MOV AL, 0
03: MOV CX, 8
04: Loop_label:
05: _____________; possibly missing code
06: ADD AX, [SI];
07: INC SI
08: LOOP Loop_label
01: MOV [SI], 200h
05: CWD
Câu 113: Which set of registers are valid for addressing a stack memory location?
Câu 114: In computer, how does the processor serve multiple interrupt request from
devices?
Select one:
Each device are assigned an interrupt priority, the device with lower priority will be
served.
Device with higher priority will use interrupt enable flag
Each device are assigned an interrupt priority, the device with higher priority will be served.
The processor can not process multiple interrupt requests
Bee Kid
Câu 117: The instruction, MOV AX, 0005h belongs to which addressing mode?
Select one:
Register
Direct
Index
Immediate
Câu 118: Which are correct about the data registers of IA-32 processors:
Select one or more:
☒Lower halves of the 16-registers an be used as 8-bit data registers: AH, AL, BH, BL, CH, CL, DH,
DL
☒Lower halves of the 32-registers an be used as 4 16-bit data registers: AX, BX, CX, DX
☐Higher halves of the 32-bit registers can be used as 16-bit registers: EAH, EAL, EBH, EBL, ECH,
ECL, EDH, EDL
☒complete 32-bit registers: EAX, EBX, ECX, EDX
Câu 119: What are components of Von Neumann, namely IAS computer?
Select one or more:
☐Monitor
☒Memory
☒I/O Equipments
☐Punched card reader
☒Bus
☒CPU
Bee Kid
Câu 120: The following sequence of instructions are executed. What is the correct
value of flag bits at watch point?
MOV AL, -5
SUB AL, 124 AL = - 129 = 7F
watch point:
Result: OF = set; CF = set; ZF = reset; SF = set
Câu 121: Which are correct action for STOSB string operation if DF is reset (=0)
Select one or more:
☐decrease DI by 1
☒Store 8-bit value from AL into memory location pointed by ES:[DI]
☒increase DI by 1
☐Store 8-bit value from AL into memory location pointed by DS:[SI]
Câu 122: Which are correct action for SCASW string operation if DF is set (=1)
Select one or more:
☒decrease DI by 2
☒compare value in AL register with memory location pointed by ES:[DI]
☐compare value in AL register with memory location pointed by DS:[SI]
☐increase DI by 2
Câu 123: The instruction that subtracts 1 from the contents of the specified
register/memory location is
Select one:
SUB
DEC
SBB
INC
Câu 125: Which are correct action for SCASW string operation if DF is reset (=0)
Select one or more:
☐compare value in AL register with memory location pointed by DS:[SI]
Bee Kid
☐decrease DI by 2
☒increase DI by 2
☒compare value in AL register with memory location pointed by ES:[DI]
Câu 126: Which are correct about the Pointer registers of IA-32 processors:
Select one or more:
☐Base Pointer (BP): The 16 bit pointer refers to stack memory
☐Stack Pointer (SP): the 16 bit pointer to the top of stack
☐Instruction Pointer (IP): the 16 bit register points to the next instruction to be execute
☒Base Pointer (EBP): The 32 bit pointer refers to stack memory
☒Stack Pointer (ESP): the 32 bit pointer to the top of stack
☒Instruction Pointer (EIP): the 32 bit register points to the next instruction to be execute
Câu 128: Enter debug command to fill 250 bytes in the memory segment FED5 in
computer memory
starting from 100 with value AD
f 100 1F9 AD
1𝐹916 = 𝐹𝐴16 + 10016 − 1
Câu 129: The following sequence of instructions are executed. What is the correct
value of EAX, EBX, EDX at watch point?
MOV EAX, 00002000
MOV EBX, 00100000
MUL EBX EDX = 00000002 EAX = 00000000
watch point:
Result: EAX = 00000000 EBX = 00100000 EDX = 00000002
Câu 130: Convert 39887.5625 to IEEE 32-bit floating point format (1 sign + 8
exponent + 23 mantissa) in hex
39887,5625 = 1001 1011 1100 1111,10012 = 1,001 1011 1100 1111 1001.1015
Mantissa: 001 1011 1100 1111 1001 0000
Exponent: 15 + 28−1 − 1 = 14210 = 1000 11102
Sign: 0
Result: 0100 0111 0001 1011 1100 1111 1001 00002 = 471𝐵𝐶𝐹9016
Bee Kid
Câu 132: The following sequence of instructions are executed. What is the correct
value of flag bits at watch point?
MOV AL, 78
MOV BL, 2
MUL BL AL = 156
watch point:
Result: CF = reset OF = reset
Câu 133: The following sequence of instructions are executed. What is the correct
value of flag bits at watch point?
MOV AL, -5
ADD AL, 132
ADD AL, 1
watch point:
Result: ZF = reset OF = reset CF = reset SF = reset
Câu 136: Physical address of a memory location is 5FE2E. This memory address
located by DI register which now has value of 993E. Compute the memory address
of data segment register
Address = 16 * segment + offset = 16 * SS + SP
5𝐹𝐸2𝐸16 −993𝐸16
The memory address of data segment register: 1610
= 564𝐹16
Câu 138: After each execution of POP instruction, the stack pointer is
Select one:
increment by 1
increment by 2
Bee Kid
decrement by 2
decrement by 1
Câu 139: Which are the correct actions for LODSB string operation if DF is reset (=0)
Câu 140: The following sequence of instructions are executed. What is the correct
value of AX, DX at watch point?
MOV AL, 80 AL = 50h
MOV BL, 2 BL = 2h
MUL BL AL = A0h
watch point:
Result: CF = reset OF = reset
Câu 141: The instruction that supports addition when carry exists is ADC
Câu 144: To balance the super speed of CPU with the slow response of memory,
which of the following measures have been made by engineers in system design?
Câu 145: Which one best describe cache hit and cache miss?
Cache miss ratio: the number of memory accesses that CPU must retrieve from the main
memory per the total number of memory accesses
Cache hit ratio: the number of memory accesses that the CPU can retrieve from the cache per
the total number of memory accesses
Câu 146: For cache write policies, which are often used for writehit and writemiss
Writehit: Writeback
Writemiss: Writeallocate
Câu 147: Identify the correct sequence to update a page onto a flash memory?
Step 1: the entire block is being read from flash into RAM then request data in page is update
Step 2: The entire block of flash memory are erased
Step 3: The entire block from RAM then is written back to the flash memory
☐The number of transistors that could be put on a single chip was doubling every year except
1970s
Câu 152: When many devices of different transmission speed connect to the same
bus, the overall system performance suffers. How did the design engineers
resolved this:
PCI Express bus
PCI bus
Split system bus into local bus and memory bus
MultipleBus hierarchies
Câu 155: What is correct about the function of TRIM command in SSD?
Select one:
Allow SSD to allocate memory pages in blocks properly for faster access
Allow SSD to defragment scattered data stored in separate pages
Allow OS to notify SSD the presence of occupied blocks of data which are no longer in use
and can be erased internally
Allow SSD to manage occupied pages and remove them automatically for later use
Bee Kid
Câu 157: What can be concluded from the following chart of processor trends:
The multicore processors and level off clock speed help to make heat dissipation of CPU
chip less
The number of transistors in chips produce more heat dissipation
Heat dissipation in processor chip is increasing year after year since 1970
The processor speed keeps increasing after 2003
Câu 158: Key parameters to consider when evaluating processor hardware include:
Câu 159: Which of the following best describe the memory chip with pinout as
shown below:
𝐴0 → 𝐴7 = 8 ∗ 2 = 16 𝑏𝑢𝑠 𝑎𝑑𝑑𝑟𝑒𝑠𝑠(𝑅𝐴𝑆, 𝐶𝐴𝑆) → 216
𝐷1 → 𝐷4 = 4 𝑏𝑢𝑠 𝑑𝑎𝑡𝑎 → 4
Structure: 64K x 4bit
Câu 160: The three key characteristics of memory are: capacity, access time and
cost. Which of the following relationships hold for a variety of memory
technologies?
Select one or more:
☒Faster access time, greater cost per bit
☐Higher capacity, higher access time
☒Greater capacity, smaller cost per bit
☒Greater capacity, slower access time
Câu 161: A SRAM memory chip labeled 32x8bit. Which of the following is correct
pinout regarding address and data lines?
Select one:
☐32 address pins, 3 data pins
☐32 address pins, 4 data pins
☐5 address pins, 3 data pins
☒15 address pins, 8 data pins
Câu 162: In the interconnection system, the number of address lines are governs
by
Select one:
I/O Module
CPU
data bus line
Memory size
Câu 164: In the RCR instruction, the contents of the destination operand
undergoes function as
Select one:
carry flag is pushed into LSB then MSB is pushed into carry flag
overflow flag is pushed into MSB then LSB is pushed into carry flag
carry flag is pushed into MSB then LSB is pushed into carry flag
auxiliary flag is pushed into LSB then MSB is pushed into carry flag
Câu 166: When CPU is executing a Program that is part of the operating system, it
is said to be in
Simplex mode
Half mode
Interrupt mode
System mode
Câu 169: A computer System has an L1 and L2 cache, and a main memory unit
connected as shown below. The block size in L1 cache is 4 words. The block size in
L2 cache is 16 words. The memory access times are 2 nanoseconds, 20
nanoseconds and 200 nanoseconds for L1 cache, L2 cache and main memory unity
respectively. When there is a miss in L1 cache and a hit in L2 cache, a block is
transferred from L2 cache to L1 cache. What is the time taken for this transfer?
Câu 170: The device which used to connect a peripheral to bus is called
Communication protocol
None
Interface
Control register
Câu 171: In a virtual memory system the address space specified by the address
lines of the CPU must be _______ than the physical memory size and _________than the
secondary storage size
larger, larger
smaller, smaller
larger, smaller
smaller, larger
Câu 172: The ALU of a computer normally contains a number of high-speed storage
elements called
Registers
IC
Semi-conductor memory
Hard disk
Variable speed
Need to refresh the capacitor charge every once in two milliseconds.
Higher power consumption
Câu 176: Four memory chips of 16 x 4 size have their address bases connected
together. The system will be of size.
Final memory is 16 X 4(4) = 16 X 16
Câu 177: Consider a single-level paging system with 12-bit virtual addresses, 24-bit
physical addresses, and a 256 (𝟐𝟖 ) byte page size. A process P1 has the following
page table. Frame numbers are given in hexadecimal notation (recall that each
hexadecimal digit represents 4 bits). Convert physical address: 0x1100A0 into
virtual address.
Page Number Frame Number
0 0x1010
1 0x2034
2 0x43AC
3 0x1100
4 0xAC11
5 0x8000
Page Size = Frame Size = 256 = 28 → offset # = 8 bit
Virtual Addresses = 12 bit = Page # + offset # → page # = 4 bit
Physical Addresses = 24 bit = Frame # + offset # → Frame # = 16 bit
0x1100A0 = 0001 0001 0000 0000 1010 00002
Frame # = 0001 0001 0000 00002 = 0x1100 → Page # = 310 = 00112
Offset # = 1010 00002
Vitural Address of 0x1100A0 is 0011 1010 00002 (0x3A0)
Câu 178: Let us consider a memory hierarchy (main memory + cache) given by
- Memory size 1 Giga words of 16 bit (word addressed)
- Cache size 1 Mega words of 16 bit (word addressed)
- Cache block size 256 words of 16 bit
Main Memory = 1GigaBytes = 230 Bytes → kích thước địa chỉ 30 bit
Block = 256 words = 28 → b = 8 bit
Bee Kid
Câu 179: Consider the following paging memory system: There are 4 page table
entries (with values of 0xC, 0x2, 0x8, 0x5 for entries 0…3, respectively). The physical
memory is 128 bytes, with frames of 8 bytes each.
a. How large (the number of bits) is the physical address?
b. How large is the virtual address?
c. What is the physical address (in hex) that corresponds to virtual address 0x1D
d. What is the physical address (in hex) that corresponds to virtual address 0x03?
Page Number Frame Number
0 0xC
1 0x2
2 0x8
3 0x5
a. Physical memory = 128 bytes = 27 bytes → Physical address = 7 bit
b. Page Size = Frame Size = 8 bytes = 23 bytes → Offset # = 3 bit
Page number = 4 = 22 → Page # = 2 bit
Bee Kid
Câu 180: If processor A has a higher clock rate than processor B, and processor A
also has a higher MIPS rating than processor B, explain whether processor A will
always execute faster than processor B. Suppose that there are two
implementations of the same instruction set architecture. Machine A has a clock
cycle time of 20ns and an effective CPI of 1.5 for some program, and machine B has
a clock cycle time of 15 ns and an effective CPI of 1.0 for the same program. Which
machine is faster for this program, and for how much?
For Some program → 𝐼𝐶𝐴 = 𝐼𝐶𝐵
𝑀𝐼𝑃𝐴 𝐼𝐶𝐴 𝐶𝑃𝑈𝑡𝑖𝑚𝑒𝐵 . 106 𝐶𝑃𝑈𝑡𝑖𝑚𝑒𝐵 𝐼𝐶𝐵 ∗ 𝐶𝑃𝐼𝐵 ∗ 𝜏𝐵 1 ∗ 15 1
= . = = = = = 0,5
𝑀𝐼𝑃𝐵 𝐶𝑃𝑈𝑡𝑖𝑚𝑒𝐴 . 106 𝐼𝐶𝐵 𝐶𝑃𝑈𝑡𝑖𝑚𝑒𝐴 𝐼𝐶𝐴 ∗ 𝐶𝑃𝐼𝐴 ∗ 𝜏𝐴 1,5 ∗ 20 2
𝑀𝐼𝑃𝐴 = 0,5𝑀𝐼𝑃𝐵 → Machine A slower Machine B → Machine B faster Machine A
Câu 183: A group of bits that tell the computer to perform a specific operation is
known as
Micro-operation
Accumulator
Instruction code
Register
Câu 184: hrough which technique, the speed imbalance between memory access
and CPU operation can be reduced?
Cache memory
Bee Kid
Câu 185: The memory unit that communicates directly with the CPU is called the
auxiliary memory
Secondary memory
main memory
shared memory
Câu 186: In comparison with static RAM memory, the dynamic RAM memory has
Lower bit density and higher power consumption
Higher bit density and low power consumption
Lower bit density and lower power consumption
Câu 190: the following is the address generated by CPU: logical address
Câu 193: If the offset of the operand is stored in one of the index registers, then it
is
based indexed addressing mode
Bee Kid
Câu 194: If the data is present in a register and it is referred using the particular
register, then it is
direct addressing mode
register addressing mode
indexed addressing mode
immediate addressing mode
Câu 195: in an even parity coding system, transmitted data is 8-bit width comprise
1 parity bit (msb) and 7 data bits. Assuming that the byte to be parity-encoded is
in the AL register and the sum of 1 now is an odd number. The parity bit now needs
to be set with a mask byte without altering the remaining 7 bits. Write the correct
value of the mask byte
The value of the mask byte is: 1000 00002 = 12810 = 0x80