Đề vxl

You might also like

Download as pdf
Download as pdf
You are on page 1of 6
Hanoi University of Science and Technology MIDTERM EXAM FOR MICROPROCESSOR School of Electronics and Telecommunications Date: 19/05/2020 Duration: 50 minutes Student’s name Student's numbe I. Multiple choice questions Question 1, What is the wrong instruction: > A. PUSH ES MOV [123Dh], . LES DS, [DI] D. all of answers are 3h correct Question 2. Instructions of 8086 have the length of A.64Kb B. Infinity C. unequality D. equality Question 3. Having DS: 0000 and a piece of data segment as 7E FD 20 B6 C8 91 15 AC. What is the content of AX after executing the instruction MOV AX, [04h] A.C891 B. 1591 © 91cs D. C8B6 memes Question 4. How many main component in a microprocessor system? ho us syihen B3 c2 pr S#°3 Question 5. What is the main difference in 8088 and 8086? ‘The size of B The number of multi. C. The size of FLAG Dall of answers are Wastruction cache —_purpose registers register correct (buffer) Question 6. What is the reason for the widely usage of two's complement numbe ‘onvenientness —_B. Less number of bits. C. Easy to recognition _D. Larger range of in addition and in representation values substruction Question 7. The instruction set of 8086 can be used in Ysa B. Microcontroller c D. all of answers are Microprocessor Preceded microprocessor wrong Question 8, Which of register does hold the address of input/output port ? ADL B.AX (bx D.AL Question 9. What is the content of AX after executing the below piece of instructions? XOR AX,AX, Lap: INC AL ADD AH, AL CMP AL, 12h JNE Lap A.32DBh B. DC42h C. 82AEh D. ABI2h Question 10, What is the range of signed 8-bits integers? unsiged » O-D 266 ® 128 to 127 B,-255t0 254 C.0t0 235 D, Oto 128 Question 11. What is the function of CU ? A. For memory B. For register C. For receiving, D. For executing interfacing processing decoding and executing arithmetic and logie instructions instructions Question 12. What happen if AH = 02h and DL = 43h as the instruction INT 21h is executed? A. Performing the _B. Displaying the C. Receiving a character D. Displaying the addition of AH and character ‘e” onthe from the keyboard character °C” on the AL screen, screen Question 13, What is wrong status of flag after the below instructions are completed’? MOV AX, 54E4h MOVBX.3rsph_ #58.7K SUB AL.BL : hd tory part Plsf co cr-0.g D.oF-0 Question 14. What corrected status of flag after the below instructions are completed? MOV AX, OFFO8h TEST AX, 07h Aland 1 B.Z-0 ©. O=1 and D=1 D. S=1and C=1 Question 15. What is the difference in the structures of von Neumann and Harvard? A. The size of B. The number of C. The organization of _D. the number of memory arithmetic operations BUS processors Question 16. A program is compiled in the type of EXE, what is correct? Ac DS = SS B.CS#DS=SS & oS # DS 4 8S D.C DS #88. Question 17. The memory in the protected mode has A. the size of IMB B. the fixed size of C. Atany address and. All answers are at maximum, 4KB various length wrong Question 18. How many byte is needed to store the machine code of the instruction MOV AL, [SI +20]? Al Ba C2 0) Question 19. With SF=0, ZF=0, what is the statud of SF and ZF after execiting the below piece of instructions: MOV AX, 5321h MOV BX, 3B23h MOV CL, 4 XCHG AL, BH ROL AL, CL SAR BH, CL CMP AH, BL A.SF=1,2ZF=0 — B.SF=1,ZF 1 ©. SF=0,ZF=0 D. SP =0, ZF =1 Question 20. What the content of AH after executing the below instruction? MOV CX, 0007H TIEP: INC AL SUB AL, 2 ADD AH,2 LOOP TIEP Ald B12 C16 D.10 Question 21. WI the memory addressing mode of the instruction MOV AL, [1235h] A. Base relative B, Immediate mode C. Register mode Dire address mode mode Question 22. Representat of -63 is oro. 8) e000 ©. 100100 D corn001 Question 23. In 8086, A.anyinstruction _B, Some registers can ©. Some registers have. Alll answers are can use CS to store be used each other the same function wrong, data Question 24. In the octal numeral system A=126, so what is the value of A in hexadecimal? AT Bs C78 D.45 £ Question 25, It is assumed that AX- below instructions 12DDh; BX=23AAh; CX=30ABh. After executing the PUSH AX PUSH B: PUSH CX POP AX POP BX POP CX we have A. AX=30ABh; B, AX=12DDh; ©. AX=23AAh; D. AX=30ABh; BX=23AAh; BX=30ABh; BX=12DDh; 2DDh; X=12DDh CX=23AAh CX-30ABh -23A.Ah Question 26. What is the function of microprocessor? mint B, Memory C. Data exchange D, Data processing cecution management Question 27. How many times for the loop in the below instructions? MOV AL,7 TIEP: INC AL SUB AL2 CMP AL, INL TIEP RA: AT B& G5 D.6 Question 28. What is the common in LOOP and JZ instructions? Both are B. Both check OF and C. Both check AF and IF D. All answers are onditional DF correct instructions Question 29, How many type of BUSs in the microprocessor system? Dala Ad @ add C2 DA Question 30. What flag is changed numbers? A. All flags BD CIF and TF Question 31. How many criteria in classifying of microprocessor? instruction of subtraction of two signed CP, 8, ZA AG B4 C2 D. no classification II. Short answer questions Question 32, A register named by X has 8 bits as NOXL...X7. Please write a function or draw a digital circuit to find the status of Zero flag (ZF), ic. ZEAXOXI XT) Question 33. Please write a function or draw a digital circuit to implement the instruction AND AILM (Mis a 8-bit constant) Question 34. A register named by X has 8 bits as XOX 1...X7. Please write a function or draw a digital circuit to find the status of Parity flag (ZF), ie. PF={(X0,X1,....X7) Question 35. Please write an instruction equivalent to the below instruction in C: char al=2; Question 36. Please write an instruction equivalent to the below instruction in C: unsigned int b[10]; Question 37. Please write an instruction equivalent to the below instruction in C: acbre;, Question 38. Please write an instruction equivalent to the below instruction in C: unsigned int b[10][5]; Question 39. Please plot the algorithm diagram (Flowchart) for the below codes: MOV CX,5 Labell: ADD AX,1 LOOP Label! ADD AX, CX Question 40. Please describe the data path by which the bit 1 flows in the microprocessor system in the below MOV AL, 1

You might also like