0% found this document useful (0 votes)
2 views

2019 with solution

The document provides an overview of various computer architecture concepts, including definitions and differences between CPU, microprocessors, and microcontrollers, as well as instruction cycles and cache memory. It also explains the organization of microprogrammed control units, pipelining, and instruction sets, specifically for the 8085 microprocessor. Additionally, it covers addressing modes, accumulator functions, and the structure of hard disks, providing examples and classifications for better understanding.

Uploaded by

Ganesh Kafle
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

2019 with solution

The document provides an overview of various computer architecture concepts, including definitions and differences between CPU, microprocessors, and microcontrollers, as well as instruction cycles and cache memory. It also explains the organization of microprogrammed control units, pipelining, and instruction sets, specifically for the 8085 microprocessor. Additionally, it covers addressing modes, accumulator functions, and the structure of hard disks, providing examples and classifications for better understanding.

Uploaded by

Ganesh Kafle
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Define CPU .

Differeance between Microprocessor and Microcontrol


CPU stands for Central Processing Unit, which is the primary component of a computer system
responsible for carrying out instructions of a computer program.

A Microprocessor is a central processing unit (CPU) that is designed to fit on a single microchip. It
contains an arithmetic logic unit (ALU), a control unit, and a small amount of memory (registers) for
temporary storage of data. Microprocessors are used in personal computers, servers, and other
computing devices that require high performance.

On the other hand, a Microcontroller is a compact integrated circuit that combines a microprocessor
with other peripherals like memory, input/output interfaces, and timers. It is designed to perform
specific tasks in embedded systems, such as in automobiles, household appliances, and medical devices.
The main difference between a microprocessor and a microcontroller is that the latter has more built-in
features, making it suitable for use in small, low-power devices that require a high level of control over
the system's functions.

In summary, while both microprocessors and microcontrollers are types of CPUs, the former is a
standalone processing unit, while the latter includes other components on the same chip to provide
additional functionality for specific tasks.

diffrence give in tableuar form


Sure, here's a table summarizing the main differences between microprocessors and microcontrollers:

Feature Microprocessor Microcontroller

Purpose General-purpose computing tasks Embedded systems, specific tasks

CPU, memory, I/O ports, timers,


Components CPU, ALU, control unit, memory registers peripherals

Processing power High Low


Feature Microprocessor Microcontroller

Power consumption High Low

Wide range, suitable for various


Instruction set applications Narrow, optimized for specific tasks

Cost Expensive Inexpensive

Applications Personal computers, servers, etc. Automobiles, appliances, medical devices

Programming
languages High-level programming languages used Low-level programming languages used

I hope that helps clarify the differences between the two!

Define instruction cycle. Explain the opcode fetch machine cycle for MOV AB with timing diagram
The Instruction cycle is the basic operational cycle of a CPU that executes machine instructions. It
consists of several machine cycles, including the Opcode Fetch Cycle, Operand Fetch Cycle, and
Execution Cycle.

The Opcode Fetch Cycle is the first machine cycle of the instruction cycle, in which the CPU fetches the
opcode (operation code) of the instruction from memory. The opcode is the binary code that represents
the instruction to be executed.

Here's a step-by-step explanation of the Opcode Fetch Cycle for the MOV AB instruction, along with a
timing diagram:
1. The CPU fetches the instruction pointer (IP) from the Program Counter (PC), which points to the
memory address where the MOV AB instruction is stored.

2. The CPU places the IP on the address bus, and the memory control unit (MCU) sends the IP to
the memory.

3. The memory responds by sending the opcode for MOV AB, which is 11000001, to the data bus.

4. The CPU receives the opcode from the data bus and stores it in the instruction register (IR) for
further processing.

5. The CPU increments the IP to point to the next instruction and proceeds to the Operand Fetch
Cycle.

In summary, the Opcode Fetch Cycle is a machine cycle in which the CPU fetches the opcode of an
instruction from memory. For the MOV AB instruction, the opcode fetch machine cycle involves placing
the instruction pointer on the address bus, receiving the opcode from the data bus, and storing it in the
instruction register. The timing diagram shows the sequence of events in this process.

What is cache memory? Explain the elements of cache design.


Cache memory is a small, high-speed memory that is located between the CPU and main memory. Its
purpose is to store frequently accessed data and instructions so that the CPU can quickly access them
without having to wait for main memory. This helps to improve the overall performance of a computer
system.

The basic elements of cache design are as follows:

1. Cache Size: The size of a cache is usually measured in terms of its capacity, which is the amount
of data it can store. The size of a cache is typically determined by the number of cache lines, the
number of words per cache line, and the number of bits per word.
2. Cache Mapping: Cache mapping determines how the cache is organized and how it maps
addresses in main memory to cache lines. There are several mapping techniques, including
direct mapping, associative mapping, and set-associative mapping.
3. Replacement Policy: The replacement policy determines which cache line to evict when a new
cache line is needed and the cache is already full. Common replacement policies include Least
Recently Used (LRU), First-In-First-Out (FIFO), and Random.
4. Write Policy: The write policy determines when and how data is written back to main memory.
There are two main write policies: write-through and write-back. Write-through writes data to
both the cache and main memory at the same time, while write-back writes data to the cache
first and only writes back to main memory when the cache line is evicted.
5. Cache Coherency: Cache coherency refers to the consistency of data between the cache and
main memory. When multiple processors or cores share a cache, cache coherency protocols
ensure that data modifications are propagated to all caches that contain that data.

In summary, cache memory is a high-speed memory that stores frequently accessed data and
instructions to improve system performance. The elements of cache design include cache size, cache
mapping, replacement policy, write policy, and cache coherency. These elements work together to
determine the efficiency and effectiveness of a cache.

Explain the organization of Mircoprogrammed Control Unit.


A Microprogrammed Control Unit (MCU) is a type of control unit that uses microcode to control the
operations of a CPU. The organization of an MCU can be described in terms of the following
components:

1. Control Store: The control store is a read-only memory (ROM) that contains microcode
instructions. These instructions are used to control the CPU's operations, such as fetching
instructions, decoding them, and executing them.
2. Microsequencer: The microsequencer is a finite state machine that controls the flow of
microcode instructions. It determines the next microcode instruction to be executed based on
the current microinstruction and the current state of the CPU.
3. Microinstruction Register: The microinstruction register (MIR) is a register that holds the current
microinstruction that is being executed. It receives the microcode instructions from the control
store and transfers them to the appropriate control signals in the CPU.
4. Control Signals: Control signals are the electrical signals that are used to control the various
components of the CPU. They are generated by the MCU based on the microcode instructions
that are being executed.
5. Address Bus: The address bus is used to access the control store. It carries the address of the
next microcode instruction that is to be executed.
6. Data Bus: The data bus is used to transfer the microcode instructions from the control store to
the microinstruction register.

The organization of an MCU can be illustrated using a block diagram, as shown below:
In summary, the organization of a Microprogrammed Control Unit (MCU) includes a control store,
microsequencer, microinstruction register, control signals, address bus, and data bus. These components
work together to execute microcode instructions and control the operations of a CPU.

What is Pipeline ? Explain the foru segment instruction pipeline.


A pipeline is a technique used in computer architecture to increase the overall performance of a CPU by
dividing the execution of instructions into a series of smaller, independent stages that can be executed
concurrently. Each stage performs a specific task on the instruction before passing it to the next stage.
This allows multiple instructions to be in different stages of execution simultaneously, thereby increasing
the throughput of the CPU.

The four segment instruction pipeline is a common pipeline architecture that divides the instruction
execution process into four stages: Instruction Fetch (IF), Instruction Decode (ID), Execution (EX), and
Write Back (WB). These stages are described below:

1. Instruction Fetch (IF): The IF stage is responsible for fetching the next instruction from memory.
The program counter (PC) is used to determine the memory address of the instruction, which is
then fetched from memory and stored in the instruction register (IR).
2. Instruction Decode (ID): The ID stage decodes the instruction in the IR and determines what
operation needs to be performed. It also reads the necessary operands from registers or
memory and prepares them for execution.
3. Execution (EX): The EX stage performs the actual computation or operation specified by the
instruction. This can involve arithmetic or logical operations, memory access, or control flow
operations.
4. Write Back (WB): The WB stage writes the result of the operation back to a register or memory
location. This stage also updates the status flags and the program counter to prepare for the
next instruction.

The four segment instruction pipeline is illustrated below:

markdownCopy code
IF ID EX WB ____ ____ ____ ____ | | | | | |____|____|____|____| | | | |____________|____| | | |
____|

In summary, a pipeline is a technique used to improve the performance of a CPU by dividing the
execution of instructions into smaller, independent stages. The four segment instruction pipeline divides
the instruction execution process into four stages: Instruction Fetch (IF), Instruction Decode (ID),
Execution (EX), and Write Back (WB). Each stage performs a specific task on the instruction before
passing it to the next stage, allowing multiple instructions to be executed simultaneously.
Write short notes on a) Accumulator B) 8085 Interrupts C) Structure of Hard Disk
a) Accumulator: The accumulator is a register in a CPU that is used for arithmetic and logic operations. It
is a special register that stores intermediate results and final results of calculations performed by the
arithmetic logic unit (ALU) of the CPU. The accumulator is also used to hold the operands for arithmetic
and logical operations. In some CPUs, the accumulator is the only register that can be used for certain
operations, making it a critical part of the CPU's operation.

b) 8085 Interrupts: The 8085 microprocessor has five interrupt signals, namely RST 7.5, RST 6.5, RST 5.5,
INTR, and TRAP. These interrupts are used to interrupt the normal execution of the program and handle
external events or signals. When an interrupt is received, the 8085 stops its current execution and jumps
to a predefined interrupt service routine (ISR) to handle the interrupt. The priority of the interrupts is
determined by their interrupt request (IRQ) level.

c) Structure of Hard Disk: A hard disk is a non-volatile storage device used to store digital data. It consists
of one or more platters, which are coated with a magnetic material and are mounted on a spindle. The
platters spin at high speeds, and read/write heads move back and forth on the platters to read and write
data.

The hard disk is divided into sectors, which are the smallest unit of storage on the disk. Each sector
typically contains 512 bytes of data, and multiple sectors are grouped together to form a block. The
block size is determined by the formatting of the hard disk.

The hard disk also has a controller board, which is responsible for controlling the movement of the
read/write heads, managing the data transfer between the hard disk and the computer's memory, and
performing error correction.

To access data on a hard disk, the computer sends requests to the controller board, which then sends
commands to the read/write heads to locate the data on the platters. The data is then read or written to
the computer's memory. The speed and capacity of a hard disk depend on factors such as the number of
platters, the rotational speed, and the density of the data on the platters.

Define instruction set. Classify the instruction available in 8085 with example.
An instruction set is a collection of instructions that a CPU can execute. It defines the operations that the
CPU can perform and the format of the instructions that are used to execute those operations. An
instruction set architecture (ISA) is a specification that defines the instruction set, the registers, and the
memory architecture of a CPU.

The 8085 microprocessor has a relatively small instruction set, consisting of around 246 instructions.
These instructions are classified into the following categories:

1. Data transfer instructions: These instructions are used to transfer data between registers or
between registers and memory. Examples include MOV, MVI, LDA, STA, LXI, XCHG, etc.
2. Arithmetic instructions: These instructions are used to perform arithmetic operations such as
addition, subtraction, multiplication, and division. Examples include ADD, ADC, SUB, SBB, INR,
DCR, etc.
3. Logical instructions: These instructions are used to perform logical operations such as AND, OR,
XOR, and NOT. Examples include ANA, ORA, XRA, and CMA.
4. Branching instructions: These instructions are used to change the sequence of execution of the
program based on a condition or an unconditional jump. Examples include JMP, JC, JNC, JZ, JNZ,
CALL, RET, etc.
5. Stack instructions: These instructions are used to push or pop data onto or from the stack.
Examples include PUSH, POP, XTHL, etc.
6. Input/output instructions: These instructions are used to perform input/output operations to
and from the ports. Examples include IN, OUT, etc.
7. Miscellaneous instructions: These instructions do not fit into any of the above categories.
Examples include HLT, NOP, DI, EI, RST, etc.

For example, the MOV instruction transfers data from a source register or memory location to a
destination register or memory location. The syntax of the MOV instruction is as follows:

bashCopy code
MOV destination, source

For instance, the following MOV instruction copies the contents of register B to register C:

cssCopy code
MOV C, B

Similarly, the ADD instruction adds the contents of a register or memory location to the accumulator, and
the syntax of the ADD instruction is as follows:

bashCopy code
ADD source

For example, the following ADD instruction adds the contents of register A to the accumulator:

cssCopy code
ADD A

Define the addressing mode. Explain the various instruction addressing modes with example.
Addressing mode is a way to specify the location of data or instruction operands in the memory or the
CPU's registers. The addressing mode determines how the CPU accesses the operands during instruction
execution.

There are various addressing modes available in most CPUs, and the choice of addressing mode depends
on the specific requirements of the instruction being executed.
Some of the common addressing modes are:

1. Immediate addressing: In this mode, the operand is specified directly in the instruction itself. For
example, in the instruction MVI A, 0Fh, the immediate value 0Fh is loaded into the accumulator.
2. Register addressing: In this mode, the operand is specified using a register. For example, in the
instruction MOV A, B, the contents of register B are moved to register A.
3. Direct addressing: In this mode, the operand is specified using a memory address. For example,
in the instruction MOV A, [2000h], the contents of the memory location 2000h are moved to
register A.
4. Indirect addressing: In this mode, the address of the operand is specified using a register or a
memory location. The CPU uses the value stored in the register or memory location to access the
operand. For example, in the instruction MOV A, [HL], the contents of the memory location
whose address is stored in the HL register are moved to register A.
5. Indexed addressing: In this mode, the address of the operand is calculated by adding an offset to
a base address stored in a register. For example, in the instruction MOV A, [IX+3], the contents of
the memory location whose address is obtained by adding 3 to the value in the IX register are
moved to register A.
6. Relative addressing: In this mode, the address of the operand is calculated relative to the current
instruction pointer. For example, in the instruction JMP $+5, the program counter is incremented
by 5 bytes, and the execution jumps to the instruction at the new program counter value.

Each addressing mode has its own advantages and disadvantages, and the choice of addressing mode
depends on the specific requirements of the instruction being executed. The addressing mode used in an
instruction can significantly affect the performance of the CPU.

Define Miro-Program ? Describe symbolic micro-program for instructio FETCH routine Explain the
organization of micro-program sequencer for control memory with sitable diagram.
A microprogram is a sequence of microinstructions that control the operations of a microprogrammed
control unit. The microprogram defines the sequence of operations to be performed by the CPU in
response to a given instruction.

Symbolic microprogramming is a method of writing microprograms using symbolic notation rather than
binary code. Each microinstruction in a symbolic microprogram is represented by a mnemonic or a short
abbreviation. This makes the microprogram more readable and easier to modify.

The fetch routine is an important part of the instruction execution cycle. It is responsible for fetching the
next instruction from memory and loading it into the instruction register. The symbolic microprogram for
the fetch routine is shown below:
Microinstruction Symbolic Notation

T1 MAR ← PC

T2 IR ← MDR, PC ← PC + 1

T3

In the above microprogram, T1 loads the contents of the program counter (PC) into the memory address
register (MAR). T2 loads the contents of the memory location specified by MAR into the instruction
register (IR) and increments the program counter by 1. T3 is a blank microinstruction and is used to
provide timing.

The microprogram sequencer is responsible for controlling the flow of microinstructions in the
microprogrammed control unit. It consists of a counter, a decoder, and a control memory. The
organization of the microprogram sequencer is shown in the diagram below:

luaCopy code
+-------+ +--------+ | | | | Instruction | | | | Address (IA) | | | | Register | IA |<---->| Decoder | | | |
+-------+ +--------+ ^ | | | | +--------+ | | | | | | +----------| Control| | Memory | | | +--------+

The instruction address (IA) register holds the address of the current instruction being executed. The IA
register is loaded with the value of the program counter (PC) at the beginning of the fetch routine. The
decoder decodes the contents of the IA register and generates a control signal that selects the
corresponding microinstruction from the control memory.

The control memory is a ROM that stores the microprogram. Each location in the control memory
contains one microinstruction. The decoder selects the microinstruction by generating a binary address
that corresponds to the location of the microinstruction in the control memory.

The microprogram sequencer is responsible for fetching the next microinstruction from the control
memory and loading it into the microinstruction register. The microinstruction is then executed by the
microprogrammed control unit. This process repeats for each instruction in the program.
1. How many number of pins are there in 8085 Microprocessor?
a) 16 c) 32 b) 20 d) 40
2. Which one of the following interrupt has the highest priority?
a) RST7.5 c) RST6.5 3. How many bytes make a word of 32 bits?
a) One Byte c) Three Bytes usajo b) TRAP d) RST5.5 b) Two Bytes d) Four Bytes
4. Which one of the following flag has set or reset value on the basis of even or odd number of 1's in
result?
a) Zero b) Carry c) Parity d) Sign
5. What is the size of MOV B, A instruction in 8085 Microprocessor?
a) One Word c) Three Word b) Two Word d) Four Word 6. Which one of the following bit(s) specify the
direct or indirect address?
a) Address bits c) Mode Bit b) Opcode Bits d) Control Word
7. Which one of the following term is correct for the process of transformation of the instruction code
bits to an address in control memory where the routine is located?
a) Mapping c) Sequencing b) Pipelining d) Acknowledging
8. Which one of the following is not a logical and bit manipulation operation?
a) Enable Interrupt c) Clear Carry b) Increment d) Clear b) Resource conflict
9. Which one of the following is not the pipelining hazard?
a) Data dependency c) Branch conflict d) Interrupt Hazard
10. Which one of the following organization of parallel processing is only a theoretical interest since no
practical system has been constructed?
a) SISD c) MISD b) SIMD d) MIMD
1. d) 40
2. a) RST7.5
3. d) Four Bytes
4. c) Parity
5. b) Two Word
6. c) Mode Bit
7. a) Mapping
8. a) Enable Interrupt
9. d) Interrupt Hazard
10. c) MISD

You might also like