Microprocessor Course TakeHomeExam 1 7 July 2015

Embed Size (px)

DESCRIPTION

s

Citation preview

  • of :

    :

    Take-home Exam

    Problem One

    What is the physical address corresponding to the following logical addresses, for each of them find another three logical addresses that correspond to the same physical address.

    a) 8000:0101

    b) 8010:001B

    c) 4FE5:23E6

    Problem Two

    According to given initial values of the register and memory data; Find the same memory region data, registers and the flag register contents after executing the following instruction

    Show handwritten steps plus screen shots from debugger showing how to verify the results.

    a)

    260A:02B5 SBB WORD PTR[SI-0A],4404

    Initial Values: SI=4CD,CF=1

    Memory data: DS:04C0 12 W 42 Z 46 EF F0 F1

    b)

    188E:018F SUB AX,[BX+1234]

    Initial Values: DS=188E BX=0DCD AX-7AB4

    Memory data: 1A8B:0020 22 AE EA BD DE 45 66 78

    C)

    Same as part b but SUB instruction is replaced by CMP instruction

  • of :

    Problem Three

    Choose the proper answer(s):

    a) Which of the following flags is not an ALU flag?

    1] DF 2] CF 3] IF 4] ZF

    b) For 16 bits ALU, the function of the Auxiliary (Half carry) flag depends on

    1] Co15 2] Co16 3] Co3 4] Co15 and Co16

    c) Which of the following instruction pairs are equivalent in the 8086 processor ?

    1] SAR & SHR 2] ROR & RCR 3] SAL & SHL 4] ROL & RCL

    Problem Four

    Write one instruction only to replace the following sequence of instructions:

    CLC

    MOV BX,00

    ADC AX,BX

    Problem Five

    Design a 3-bit ALU to perform the operations shown in the following table using 3 full adder units and many multiplexers as you need.

    Write in this table the truth table for Xi, Y2, Y1, Y0, Ci and CF

    Control lines K1k0

    Operation Xi Y2 Y1 Y0 Ci CF

    00 SHL A 01 A+B+CF 10 A-B-CF 11 DEC A

    Note: in our ALU design carry flag will be implemented with all of the given operations.