Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

question4,5 CET3510 Lecture Prof. Nelson Date: October 29, 2017 Grade 100 Midter

ID: 3604317 • Letter: Q

Question

question4,5

CET3510 Lecture Prof. Nelson Date: October 29, 2017 Grade 100 Midterm Exam Name 1) A WORD is how many bits? a) 12 b) 4 C) 8 16 t is the two's complement of 0011 1000 1101b? a) 1100 0111 0010b b) 0000 0111 0011b 2) Wha 1100 01 1 1 001 1b d) 1111 0111 0111b 3) mov ax, 20 mov ecx, 10 dec ax loop L 1 In the sample code above, what will ax equal to after these instructions run? a) 30 10 c) 23 d) 20 4) In the instruction mov eax, var1; what type of addressing is this? a) Immediate addressing b) Direct addressing c) Register addressing d) Indirect addressing 5) In the instruction movsx ax, 1110 0011b; what will ax equal after this instruction runs a) 0x00E2 b) 0x11D3 c) 0xFFC1 d) 0xFFE3 ) data

Explanation / Answer

Question-4:

b) Direct Addressing

Explanation: Direct addressing is used to assign simple variables in memory and here also we assigning the value of var1 to eax => direct addressing.

Question-5:

A) 0x00E3

Explanation:

11100011 value in decimal = 1*2^7 + 1*2^6 + 1*2^5 + 0*2*4 + 0*2^3 + 0*2^2 + 1*2^1 + 1*2^0

= 128 + 64 + 32 + 2 + 1

= 227

Haxadecimal value of 227 = E3

so correct option is 0x00E3 i.e. a.