2080

CSC167 · TU past paper

Microprocessor 2080 question paper

The complete TU 2080 exam paper for Microprocessor (CSC167), all 12 questions with solved model answers written to the mark scheme.

Tap a question to open its answer.

  1. 110 marksInstruction CycleAnswer

    Explain instruction cycle, machine cycle and T-states. Draw timing diagram of fetch and execute of LDA instruction with brief description.[10]

    --- The instruction cycle is defined as the total time required to fetch and execute an entire instruction. An instruction cycle consists of two parts: - Fetch Cycle (FC): The CPU fetches the opcode from memory. The address stored in the...

  2. 210 marks80386Answer

    Draw a well-labeled block diagram of 8036 microprocessor. Explain its Register organization.[10]

    Note: The question refers to the "8036" microprocessor, which is understood to mean the Intel 80386 (i386) 32-bit microprocessor. The answer below is derived primarily from the standard 80386 architecture block diagram, supplemented with...

  3. 310 marksSimple sequence programsAnswer

    Explain the working of LHLD and DAA instruction of 8085. An array containing 5 elements is stored from memory location 4000h to 4004h; write an assembly language program for 8085 microprocessor to find largest element of array and store in memory location 4005h.[10]

    --- Syntax: LHLD address Size: 3 bytes (1 opcode + 2 address bytes) Operation: - LHLD loads the contents of two consecutive memory locations into the H-L register pair - The lower byte (from the specified address) is loaded into register...

  4. 45 marksDemultiplexing of BusesAnswer

    What is ALE? Explain the role of ALE in address/data bus De-multiplexing in 8085 with suitable diagram. [5]

    ALE (Address Latch Enable) and Its Role in Address/Data Bus De-multiplexing in 8085

    What is ALE?

    ALE (Address Latch Enable) is a control signal generated by the 8085 microprocessor during the first clock cycle (T1) of every machine cycle. It is an active-high output signal that indicates the lower 8-bit address (A0-A7) is present on the multiplexed Address/Data bus (AD0-AD7).

    In simple terms: ALE is a signal that tells external hardware "right now the bus carries an address, latch it before it changes to data."


    Why is De-multiplexing Needed?

    The 8085 microprocessor has only 40 pins. To reduce pin count, Intel multiplexed the lower 8 address lines (A0-A7) with the 8 data lines (D0-D7) on the same physical pins, called the AD0-AD7 bus.

    • The upper 8 address bits (A8-A15) are available on dedicated pins and do not need de-multiplexing.
    • The lower 8 address bits (A0-A7) share pins with data, so they must be separated (de-multiplexed) using ALE.

    Role of ALE in De-multiplexing

    Clock StateALE SignalBus Content (AD0-AD7)
    T1 (first clock)HIGHLower 8-bit Address (A0-A7)
    T2, T3 onwardsLOWData (D0-D7)

    Step-by-Step Process:

    1. At T1: ALE goes HIGH. The lower 8-bit address (A0-A7) is placed on the AD0-AD7 bus.
    2. Latch captures address: The HIGH-to-LOW transition of ALE triggers an external latch (e.g., 74LS373) to capture and hold the lower 8-bit address.
    3. After T1: ALE goes LOW. The AD0-AD7 bus now carries data (D0-D7) for read/write operations.
    4. Latch holds address: The latch continues to output the stable lower 8-bit address (A0-A7) throughout the remaining machine cycle.
    5. Full 16-bit address is now available: Upper 8 bits (A8-A15) directly from the processor + Lower 8 bits (A0-A7) from the latch output.

    Diagram: Address/Data Bus De-multiplexing Using ALE

            8085 Microprocessor
       +---------------------------+
       |                           |
       |  A8 - A15  |--------------|---------> A8-A15 (Upper Address Bus)
       |            |              |
       |  AD0 - AD7 |----+---------+---------> D0-D7  (Data Bus)
       |            |    |         |
       |    ALE     |----|--+      |
       |            |    |  |      |
       +---------------------------+
                        |  |
                        |  | ALE (HIGH at T1, latches address)
                        |  |
                        v  v
                  +------------+
                  |  Latch     |   (e.g., 74LS373)
                  |  74LS373   |
                  |            |
                  | G (Enable) |<---- ALE
                  +------------+
                        |
                        v
                   A0 - A7  (Lower Address Bus, stable throughout)
                        |
                        v
       +----------------+------------------+
       |         Full 16-bit Address Bus   |
       |         A0-A15 to Memory/I/O      |
       +-----------------------------------+
    

    Timing Diagram:

    CLK  :  |--T1--|--T2--|--T3--|
    
    ALE  :  |HIGH  |LOW   |LOW   |
    
    AD0-7:  |ADDR  |DATA  |DATA  |
            (A0-A7)(D0-D7)(D0-D7)
    
    Latch:  |Captures A0-A7 on falling edge of ALE|
            |Holds A0-A7 stable for entire cycle  |
    

    Summary

    FeatureDetail
    Full formAddress Latch Enable
    NatureActive-High output signal from 8085
    Active duringT1 state of every machine cycle
    PurposeSeparates lower address (A0-A7) from data (D0-D7)
    External component usedLatch IC (e.g., 74LS373)
    ResultFull stable 16-bit address bus available to memory/I/O

    Conclusion: ALE is essential in the 8085 because the multiplexed AD0-AD7 bus serves dual purpose. Without ALE and an external latch, it would be impossible to distinguish between address and data on those shared lines, making memory and I/O communication unreliable.

  5. 55 marksDirect Memory AccessAnswer

    What do you mean by Isolated I/O? Explain basic DMA operation in brief. [5]

    --- Isolated I/O (also called I/O-mapped I/O) is a method of connecting I/O devices to the system where the I/O devices have a separate address space from the memory address space. - The CPU uses dedicated I/O instructions (such as IN an...

  6. 65 marksFlagsAnswer

    What is flag? Explain all the flags present in 8085 microprocessor. [5]

    Flags in 8085 Microprocessor

    What is a Flag?

    A flag is a single-bit flip-flop (1-bit register) that indicates the status of the accumulator or other registers after the completion of an arithmetic or logical operation. These flip-flops are set (1) or reset (0) according to the data condition of the result stored in the accumulator.

    The flag register (also called the status register or F register) is an 8-bit register, but only 5 bits are used as flags in the 8085 microprocessor.


    The 5 Flags of 8085 Microprocessor

    The flag register layout is as follows:

    Bit 7Bit 6Bit 5Bit 4Bit 3Bit 2Bit 1Bit 0
    SZ--AC--P--CY

    1. Sign Flag (S) -- Bit 7

    • Set to 1 if the MSB (bit 7) of the result is 1, indicating the result is negative.
    • Reset to 0 if the result is positive (MSB = 0).
    • Used in signed number arithmetic.

    Example: If result = 10000001 (negative in 2's complement), S = 1.


    2. Zero Flag (Z) -- Bit 6

    • Set to 1 if the result of the operation is zero.
    • Reset to 0 if the result is non-zero.

    Example: If 05H - 05H = 00H, then Z = 1.


    3. Auxiliary Carry Flag (AC) -- Bit 4

    • Set to 1 if there is a carry out from bit 3 to bit 4 (i.e., carry from the lower nibble to the upper nibble).
    • Primarily used in BCD (Binary Coded Decimal) arithmetic operations.

    Example: If lower nibble addition produces a carry to bit 4, AC = 1.


    4. Parity Flag (P) -- Bit 2

    • Set to 1 if the result contains an even number of 1s (even parity).
    • Reset to 0 if the result contains an odd number of 1s (odd parity).

    Example: If result = 00000011 (two 1s -- even), then P = 1.


    5. Carry Flag (CY) -- Bit 0

    • Set to 1 if there is a carry out from the MSB (bit 7) during addition, or a borrow during subtraction.
    • Reset to 0 if there is no carry or borrow.

    Example: If FFH + 01H = 100H (carry out), then CY = 1.


    Summary Table

    FlagSymbolBit PositionSet When
    SignS7Result is negative (MSB = 1)
    ZeroZ6Result is zero
    Auxiliary CarryAC4Carry from bit 3 to bit 4
    ParityP2Result has even number of 1s
    CarryCY0Carry out from MSB

    These five flags together help the programmer make conditional decisions (using conditional jump instructions) based on the outcome of arithmetic and logical operations.

  7. 75 marksSimple sequence programsAnswer

    Write an assembly language program for 16 bit microprocessor to count and display number of occurrence of letter 'o' in string 'Microprocessor organization'. [5]

    Count and display the number of times letter 'o' appears in the string 'Microprocessor organization'. --- --- Step Instruction Purpose ---------------------------- 1 MOV AX, @DATA / MOV DS, AX Initialize the Data Segment register 2 MOV S...

  8. 85 marksdescriptor cacheAnswer

    What is Descriptor? Explain the use of descriptor in logical to physical address conversion in 80286 microprocessor. [5]

    A descriptor is an 8-byte (64-bit) data structure stored in memory that defines and describes the characteristics of a memory segment in the 80286 microprocessor's protected mode. It contains all the information the processor needs to ac...

  9. 95 marksAddressing ModesAnswer

    What is mean by addressing mode? Explain different addressing modes in 8085 microprocessor. [5]

    An addressing mode refers to the way in which the operand (data) of an instruction is specified or accessed. In other words, it defines the method used by the CPU to identify the location of data to be operated upon. The 8085 microproces...

  10. 105 marks80386Answer

    What are various functional units of 80386 microprocessor? Explain function of each unit. [5]

    Functional Units of 80386 Microprocessor

    Introduction

    The 80386 is a 32-bit microprocessor. To achieve high performance through parallelism, it is divided into several independent functional units that can operate simultaneously.


    Functional Units of 80386

    The 80386 microprocessor is internally divided into six functional units:


    1. Bus Interface Unit (BIU)

    • Manages all data and address transfers on the external buses (data bus, address bus, control bus).
    • Handles communication between the processor and external memory or I/O devices.
    • Generates the 32-bit physical address for memory access.
    • Controls bus cycles and arbitration.

    2. Code Prefetch Unit (CPU / Prefetch Unit)

    • Fetches instruction bytes from memory in advance (before they are needed).
    • Stores prefetched bytes in a 16-byte prefetch queue.
    • Keeps the instruction pipeline filled so the processor does not have to wait for instruction fetch.
    • Works in parallel with instruction decoding and execution.

    3. Instruction Decode Unit

    • Takes instruction bytes from the prefetch queue and decodes them into internal micro-operations.
    • Maintains a queue of 3 decoded instructions ready for execution.
    • Decoding in advance reduces delays during execution.

    4. Execution Unit (EU)

    • Carries out the actual arithmetic and logical operations on data.
    • Contains the 32-bit ALU (Arithmetic Logic Unit) for integer operations.
    • Accesses the general-purpose registers (EAX, EBX, ECX, EDX, ESI, EDI, ESP, EBP).
    • Executes decoded instructions passed from the Instruction Decode Unit.

    5. Segmentation Unit

    • Handles memory segmentation by converting logical addresses (segment:offset) into linear addresses.
    • Uses segment registers (CS, DS, SS, ES, FS, GS) and descriptor tables.
    • Provides memory protection by checking segment limits and access rights.

    6. Paging Unit

    • Converts linear addresses (produced by the Segmentation Unit) into physical addresses.
    • Implements demand paging using page tables and a Translation Lookaside Buffer (TLB) for fast address translation.
    • Supports a 4 KB page size.
    • Only active when paging is enabled (PG bit set in CR0).

    Summary Table

    UnitPrimary Function
    Bus Interface UnitExternal bus communication and address generation
    Code Prefetch UnitAdvance fetching of instructions into queue
    Instruction Decode UnitDecoding instructions into micro-operations
    Execution UnitALU operations and register access
    Segmentation UnitLogical to linear address translation
    Paging UnitLinear to physical address translation

    Conclusion

    These six units work in parallel (pipelined), so while one instruction is being executed, the next is being decoded and the one after that is being prefetched. This parallel operation significantly increases the throughput and performance of the 80386 processor.

  11. 115 marksProgrammable Peripheral Interface 8255AAnswer

    What are different modes of parallel I/O? Differentiate between synchronous serial communication and asynchronous serial communication. [5]

    Parallel I/O is commonly implemented using programmable peripheral interface chips like the 8255A. It supports the following modes: - Provides simple input/output operations for all three ports (A, B, C). - No handshaking is required. - ...

  12. 125 marksInterruptAnswer

    Write short notes on:a. RS-232 b. Interrupts [5]

    --- RS-232 (Recommended Standard 232) is a standard for serial communication transmission of data between a Data Terminal Equipment (DTE) and Data Communication Equipment (DCE). It is one of the most widely used serial communication inte...