Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

10:17 19/05/2023 Review Quiz: Xem lại lần làm thử

Kien truc may tinh va hop ngu_ Nhom 01CLC


 Nhà của tôi / Các khoá học của tôi / CAAL230180_22_2_01CLC / Chapter 8: Macro & Function / Review Quiz

Bắt đầu vào lúc Friday, 19 May 2023, 9:46 AM


Trạng thái Đã xong
Kết thúc lúc Friday, 19 May 2023, 10:16 AM
Thời gian thực 29 phút 36 giây
hiện
Điểm 14,06/29,50
Điểm 4,77 trên 10,00 (48%)

Câu hỏi 1
Hoàn thành

Đạt điểm 1,00 trên 1,00

Part of memory as shown in figure

Address 1d48 1d49 1d4a 1d4b 1d4c 1d4d 1d4e 1d4f


Value 03 7F F5 2D 5A 12 7B C0
The value of dx register follows the execution of mov dx, word[1d4d] is 7B12. What is the endian type of this computer system?

Select one:
big-endian

little-endian

level-endian

non-endian

Câu hỏi 2
Hoàn thành

Đạt điểm 0,50 trên 0,50

To test one bit in a byte value without destructing the byte, use __________ instruction.

Select one:
TEST

AND

NOT

OR


https://fhqx.hcmute.edu.vn/mod/quiz/review.php?attempt=4508470&cmid=1107883 1/9
10:17 19/05/2023 Review Quiz: Xem lại lần làm thử

Câu hỏi 3
Hoàn thành

Đạt điểm 0,64 trên 1,50

A system programmer needs to compute 63250/258+256 (decimal). Instruct him to code in Assembly (number must be in hex)
What the result should be?

Step 1:
MOV AX,F712

Step 2
MOV BX,102

Step 3:
XOR DX,DX

Step 4:
DIV BX
Step 5:
ADD AX,BX

Result:

AX =
01F5

DX = 00F5

Câu hỏi 4
Hoàn thành

Đạt điểm 0,75 trên 1,50

A system programmer needs to compute quotient and reminder of the division of -1257 by 2 (decimal). Instruct him to code in Assembly
(number must be in hex).

What the result should be?

Step 1: MOV AX,FB17

Step 2: MOV CX,2

Step 3: IDIV CX

Step 4: CWD
Result:

AX = FD8C

DX = FFFF


https://fhqx.hcmute.edu.vn/mod/quiz/review.php?attempt=4508470&cmid=1107883 2/9
10:17 19/05/2023 Review Quiz: Xem lại lần làm thử

Câu hỏi 5
Hoàn thành

Đạt điểm 0,25 trên 1,00

Given a code snippet:

if (a>=0 && a <=9)

x = a + 30h;

else if (a >=10 && a <=15)

x = a + 55;

The logic of the above code snippet in assembly is (with missing lines):
01: CMP DL, 0
02: ------------ ; possibly missing code
03: CMP DL, 9
04: ------------ ; possibly missing code
05: ADD DL, 30h
06: ------------ ; possibly missing code
a_label:
08: CMP DL, 0Fh
09: ------------ ; possibly missing code
10: ADD DL, 55
x_label:
12: MOV AL, DL

...

Choose correct missing instructions in the above sequence of instructions

09: JBE x_label

04: JMP a_label

06: JMP x_label

02:
JA a_label

Câu hỏi 6
Hoàn thành

Đạt điểm 1,00 trên 1,00

The following sequence of instructions is executed. What is the correct values at watch point?

MOV AX, 0x67FE


MOV BX, AX

MOV CL, BH
MOV CH, BL

watch point:

BX =
0x67FE

CX =
0xFE67


https://fhqx.hcmute.edu.vn/mod/quiz/review.php?attempt=4508470&cmid=1107883 3/9
10:17 19/05/2023 Review Quiz: Xem lại lần làm thử

Câu hỏi 7
Hoàn thành

Đạt điểm 2,00 trên 2,00

Consider a 4-way set associative mapped cache of size 64 KB with block size 512 bytes. The size of main memory is 4MB.

Find:
1. Number of bits in tag

8
2. Tag directory size

128
bytes

Câu hỏi 8
Hoàn thành

Đạt điểm 1,00 trên 1,00

The following sequence of instructions are executed. What is the correct value of CF and OF at watch point?
MOV AX,FFF6h

MOV CX,1000h
IMUL CX

watch point:

OF= set

CF=
set

Câu hỏi 9
Hoàn thành

Đạt điểm 0,00 trên 1,00

What is the correct value of SI, AL (in hex) at watch point:

01: MOV ESI, 0x0300


02: MOV AL, 0x10
03: MOV CX, 7
04: Loop_label:
05: MOV byte[ESI], AL
06: ADD AL,0x10
07: INC ESI
08: LOOP Loop_label

watch point:

AL = 0x70h

ESI 0x0308h


https://fhqx.hcmute.edu.vn/mod/quiz/review.php?attempt=4508470&cmid=1107883 4/9
10:17 19/05/2023 Review Quiz: Xem lại lần làm thử

Câu hỏi 10
Hoàn thành

Đạt điểm 0,00 trên 1,00

Given a row of memory image in debug


0x0bfff120 13 96 D0 E0 D0 E0 A2 1E - 99 80 3E 20 99 00 75 24

Initially, eax=ebx=ecx=edx=0, esi=0x0bfff125


What are value of eax,edx after execution of the following instructions?

MOV edx,dword[esi]
MOV eax,dword[esi+4]

edx =
0x99203E80

eax =
0x991EA2E0

Câu hỏi 11
Hoàn thành

Đạt điểm 0,50 trên 1,00

Consider the following assembly instruction sequence


CMP DL, 0
JB x_label
CMP DL, 9
JA a_label
ADD DL, 30h
JMP x_label
a_label:
CMP DL, 0Fh
JA x_label
ADD DL, 31h
x_label:

MOV AL, DL
watch point:

...
Choose correct value of AL register at watch point for different value of DL?

DL=8 39h

DL=0FFh 0FFh

DL=10 41h

DL=55h 85h


https://fhqx.hcmute.edu.vn/mod/quiz/review.php?attempt=4508470&cmid=1107883 5/9
10:17 19/05/2023 Review Quiz: Xem lại lần làm thử

Câu hỏi 12
Hoàn thành

Đạt điểm 0,25 trên 1,00

Given a row of memory image in gdb

0x0ae80120 13 96 D0 E0 D0 E0 A2 1E - 99 80 3E 20 99 00 75 24
esi = 0x0ae80120, edi = 0x0ae80128
Select correct sequence of instructions to subtract words at [edi] from [esi] then store the result at memory location 0x0ae8012a

Step 1:
MOV ax, word[esi]

Step 2:
SUB ax, word[esi]

Step 3:
MOV word[ebx], ax

Step 4:
SUB ax, word[edi]

Câu hỏi 13
Hoàn thành

Đạt điểm 1,00 trên 1,00

Memory dump at 0x1d200200 as below:


0x1d200200 00 20 10 5D 55 47 00 90 - 00 10 20 30 40 50 60 70

Given value of registers:

edi = 0x1d20020a, esi = 0x1d200208,

bx = 0x0202, ax = 0x0103, cx = 3
and flag bit DF = 1

What is the correct value of AX, SI, DI registers after the instruction REP LODSW is executed?

AX =
0x5d10

SI =
0x0202

DI =
0x020a

Câu hỏi 14
Hoàn thành

Đạt điểm 0,50 trên 0,50

Which are the correct inputs for XLAT instruction

Select one or more:


ebx pointed to look-up table
look-up index must be loaded into DL

[esi] pointed to look-up table


look-up index must be loaded into al


https://fhqx.hcmute.edu.vn/mod/quiz/review.php?attempt=4508470&cmid=1107883 6/9
10:17 19/05/2023 Review Quiz: Xem lại lần làm thử

Câu hỏi 15
Hoàn thành

Đạt điểm 0,00 trên 1,00

The following sequence of instructions are executed. What is the correct value of EAX, EBX, EDX at watch point?

MOV EAX,0x00002000
MOV EBX,0x00100000

MUL EBX

watch point:

EDX = 00100000

EAX =
0x00021000

EBX = 0x00000002

Câu hỏi 16
Hoàn thành

Đạt điểm 1,00 trên 5,00

A 512 KB cache memory that organized in 256-bytes blocks, operates along with the main memory of 4GB.

1. The number of address bits used to index the main memory:

32

2. The number of bits used to index a particular memory block:

3. The number of bits used to index the cache:

12

4. The number of bits used to index every cache line:

5. The number of bits used to index every single byte on a cache line:


https://fhqx.hcmute.edu.vn/mod/quiz/review.php?attempt=4508470&cmid=1107883 7/9
10:17 19/05/2023 Review Quiz: Xem lại lần làm thử

Câu hỏi 17
Hoàn thành

Đạt điểm 0,67 trên 1,00

Given an assembly code snippet to look up a value (stored in AL) against a region of bytes (buff)

buff db 11,22,33,44,55

................
01: MOV edi, buff
02: ------------ ; possibly missing code
03: MOV al,33
04: MOV ecx,5
a_label:
05: ------------ ; possibly missing code
06: CMP byte [edi], al
07: ------------ ; possibly missing code
08: LOOPNZ a_label

...

Choose correct missing instructions in the above sequence of instructions

05:
empty

02:
JNZ a_label

07:
INC edi

Câu hỏi 18
Hoàn thành

Đạt điểm 2,00 trên 3,00

A direct-mapped cache with a cache size of 64KB, block size of 16 bytes, and memory address of 32 bits.

The tag bits is 0x

12345

cache index is 0x

6
, and
block offset is 0x

for the memory address 0x12345678?


https://fhqx.hcmute.edu.vn/mod/quiz/review.php?attempt=4508470&cmid=1107883 8/9
10:17 19/05/2023 Review Quiz: Xem lại lần làm thử

Câu hỏi 19
Hoàn thành

Đạt điểm 1,00 trên 4,00

A set-associative cache with 256KB size and 64-byte blocks is organized into 4-way sets.
1. How many sets does this cache have?

2. How many bits are needed to represent the set index in this cache?

12

3. If a memory address is 32 bits, how many bits are needed for the block offset?

4. How many bits are left for the tag after the set index and block offset are accounted for?

16

Câu hỏi 20
Hoàn thành

Đạt điểm 0,00 trên 0,50

In multiplication instruction, when the value of source operand is 12 (decimal), the other operand is loaded in AX. Which registers can be
used to load source operand?

Select one or more:


DX

AX

BX

CL
DL

◄ Chapter08

Chuyển tới...


https://fhqx.hcmute.edu.vn/mod/quiz/review.php?attempt=4508470&cmid=1107883 9/9

You might also like