0% found this document useful (0 votes)
18 views17 pages

BEU Computer Organization 2022 CSE Solution

The document outlines the main structural components of a computer system, including the CPU, main memory, secondary storage, I/O devices, and buses, explaining their functions in the computing process. It also discusses microprogram sequencing, instruction set design issues, and techniques for enhancing performance in processors, such as superscalar execution and simultaneous multithreading. Additionally, it covers arithmetic operations using ten's complement, the impact of bus sizes on system speed, and the function of the DAA instruction in adjusting packed BCD values.

Uploaded by

manishrajtty3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views17 pages

BEU Computer Organization 2022 CSE Solution

The document outlines the main structural components of a computer system, including the CPU, main memory, secondary storage, I/O devices, and buses, explaining their functions in the computing process. It also discusses microprogram sequencing, instruction set design issues, and techniques for enhancing performance in processors, such as superscalar execution and simultaneous multithreading. Additionally, it covers arithmetic operations using ten's complement, the impact of bus sizes on system speed, and the function of the DAA instruction in adjusting packed BCD values.

Uploaded by

manishrajtty3
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Biharengineeringuniversity.

com

2.(a) List and briefly define the main structural components of a


computer.
Answer

Main Structural Component of a Computer System

m
The main elements associated with a computer system are as follows:

o
.c
1. Central Processing Unit (CPU)

ity
2. Main Memory

s
3. Secondary Storage Devices
er
n iv
4. Input and Output (I/O) Devices
gu

5. Busses
ri n
ee

1. Central Processing Unit (CPU): The CPU serves as the core processing unit of
a computer. It executes instructions fetched from memory by performing
in

arithmetic, logical, control, and input/output operations. The CPU contains the
g
en

Arithmetic Logic Unit (ALU), responsible for mathematical and logical


operations, and the Control Unit, managing the execution of instructions.
ar

2. Main Memory: Also known as RAM (Random Access Memory), main memory
h

provides temporary storage for data and instructions that the CPU is acti actively
bi

using. It allows fast access to information but is volatile, meaning it loses its
content when the power is turned off. Main memory holds the operating
system, applications, and data being actively processed.
3. Secondary Storage Devices: These devices offer non-volatile, long-term
storage for data that needs to be retained even when the computer is
powered off. Examples include Hard Disk Drives (HDDs), Solid-State Drives
(SSDs), optical drives, USB flash drives, and external hard drives. They store the
operating system, applications, user files, and other data.
4. Input and Output (I/O) Devices: Input devices allow users to interact with
the computer system by providing data or commands. Examples include
keyboards, mice, touchscreens, scanners, and microphones. Output devices

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

present processed information to users. Examples include monitors, printers,


speakers, and projectors.
5. Buses: Buses are communication channels that transfer data and signals
between different hardware components within the computer. They consist of
multiple lines or wires that carry address, data, and control signals. Buses
include the address bus (transfers memory addresses), data bus (transfers
data), and control bus (manages signals for coordinating actions between
components).

These main elements work together to facilitate the complete computing process.
The CPU processes instructions and data fetched from memory, which may be
temporarily stored in main memory or accessed from secondary storage devices.
Input devices enable users to provide
rovide instructions or data, and output devices

m
present processed information. Buses enable communication and data transfer

o
between these components, ensuring seamless operation of the computer system.

.c
ity
(b) Discuss the design and logic of a microprogram seq
sequence.

s
er
The address is used by a microprogram sequencer to decide which
iv
microinstruction has to be performed next. Microprogram sequencing is the
n
gu

name of the total procedure. The addresses needed to step through a


ri n

control microprogram are created by a sequencer, also known as a


microsequencer.
ee

The control main job is to communicate with the memory,


in

input/output device, and ALU on how to respond to or carry out a set of


g
en

instructions. Processing is not done within the Control unit itself. It only
directs and manages the task. It serves as the supervisor,
ar

regulating all operations including retrieving instructions from main


h
bi

memory and putting them to use.


Micro Instructions Sequencer
Micro Instructions Sequencer is a combination of all hardware for selecting
the next micro-instruction address. The micro-instruction in control memory
contains a set of bits to initiate micro-operations in computer registers and
other bits to specify the method by which the address is obtained.

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

e
iv
Control Address Register(CAR) : Control address register
n

receives the address from four different paths. For receiving the
gu

addresses from four different paths, Multiplexer is used.


ri n

Multiplexer : Multiplexer is a combinational circuit which contains


ee

many data inputs and single data output depending on control or


in

select inputs.
g

Branching : Branching is achieved by specifying the branch


en

address in one of the fields of the micro instruction. Conditional


ar

branching is obtained by using part of the micro-instruction to


h

select a specific status bit in order to determine its condition.


bi

Mapping Logic : An external address is transferred into control


memory via a mapping logic circuit.
Incrementer : Incrementer increments the content of the control
address register by one, to select the next micro-instruction in
sequence.
Subroutine Register (SBR) : The return address for a subroutine is
stored in a special register called Subroutine Register whose value
is then used when the micro-program wishes to return from the
subroutine.
Control Memory : Control memory is a type of memory which
contains addressable storage registers. Data is temporarily stored

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

in control memory. Control memory can be accessed quicker than


main memory.

2. Consider processor hypothetical 32-bit 22-bit micro-


having 32-bit instructions composed of two fields-the first
byte contains the opcode and the remainder the immediate
operand or an operand address.
(a) What in the maximum directly addressable bytes)?
memory capacity (in
(b) Discuss the impact on the system speed if the

m
microprocessor bus has-

o
(i) a 32-bit local address bus and a 16-bit
bit local data bus, or

.c
ity
ii) a 16-bit local address bus and a 16-bit
bit local data bus.

s
(c) How many bits its are needed for the program counter and
er
the instruction register?
n iv
gu

a)
ri n

There are 32-bit


bit microprocessors with 3232-bit instruction
From left side first 8 bits are opcode
ee

Then operand = 24 bits


in

So that maximum directly addressable memory capacity = 2^24


g

= 16777216
en
ar

(b)the
b)the impact on the system speed if the microprocessor bus has
1.) a 32-bit
bit local address bus and a 16-bit
16 local data bus:
h
bi

As per given local address bus is 32


32-bit,and we also have 32-bit instruction,
the entire address can be decoded once.
And given that data bus is 16-bits, to fetch 32-bit instruction we need two
cycles.

(2)
local address bus is 16-bit,and we have 32-bit instruction, sp that to fetch
the instruction it takes two cycles.
Local data bus also 16-but, again it takes two cycles.
Totally 4 cycles.

(c) No.of operands = 24 bits


Since operands are 24 bits, program counter needs atlease 24 bits.
Instruction register stores present instruction, hence it needs 32-bits

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

4. (a) A set-associative cache has a block size of four 16-bit


words and a set size of 2. The cache can accommodate a total
of 4096 words. The main memory size that is cacheable is 64K
32 bits. Design the cache structure and show how the
processor's addresses are interpreted.

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

m
co

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

(B)Explain two techniques for enhancing the performance of


computers with multiple execution pipelines.
1. Superscalar Execution:
Definition: Superscalar architecture involves having multiple execution units
within the CPU that can execute multiple instructions per clock cycle. This
architecture identifies independent instructions within a program and
executes them simultaneously, taking advantage of available execution units.
Instruction Level Parallelism (ILP): Superscalar processors analyze
instructions to find independent operations that can be executed
concurrently. This requires sophisticated hardware to detect

m
dependencies and hazards between instructions to ensure correct

o
execution.

.c
Dynamic Scheduling: Hardware-based based techniques like out-of-order
out

ity
execution and instruction reordering are used to optimize execution.

s
Instructions are dynamically scheduled for execution based on available
er
resources, dependency resolution, and other factors. This helps in
iv
mitigating
ng pipeline stalls caused by dependencies.
n
gu

Issue Width: The number of instructions that can be issued


simultaneously is referred to as the issue width. Superscalar processors
ri n

typically have varying degrees of issue width, allowing multiple


ee

instructions to execute in parallel, further enhancing performance.


2. Simultaneous Multithreading (SMT):
g in

Definition: SMT, also known as Hyper


Hyper-Threading in Intel processors, allows
en

multiple threads from the same or different processes to execute concurrently


on a single CPU core. It improves performance by utilizing idle CPU resources.
ar

Thread Level Parallelism (TLP): SMT takes advantage of unused CPU


h
bi

resources during the execution of a single thread to simultaneously


execute instructions from another thread. This allows the CPU to
maintain a higher level of utilization, increasing overall throughput.
Resource Sharing: In SMT, resources like execution units, caches, and
pipelines are shared between threads. This sharing enables the
processor to handle multiple threads efficiently by interleaving their
instructions and utilizing otherwise idle resources.
Improved Throughput: SMT enhances performance by maximizing
CPU utilization. By allowing multiple threads to execute simultaneously
on a single core, it improves overall throughput, especially in scenarios
where there might be idle execution units during the execution of a
single thread.

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

Both superscalar execution and simultaneous multithreading focus on leveraging


parallelism to enhance performance in modern processors. They achieve this by
either executing multiple instructions from a single thread concurrently (superscalar
execution) or by allowing multiple threads to run simultaneously on a single core
(simultaneous multithreading), aiming to make better use of available hardware
resources and improving overall throughput.

5. (a) Calculate (72530-13250) using ten's


complement arithmetic. Assume rules similar to
those for two's complement arithmetic.

o m
.c
s ity
er
n iv
gu
e ri n
ne
h ar

(B) List and briefly explain five important


bi

instruction set design issues.


1. Operand Addressing Modes:
Operand addressing modes determine how the CPU accesses operands (data)
for instructions. Different modes include:
Register Mode: Operands are in CPU registers, enabling fast access.
Immediate Mode: Operand data is part of the instruction itself.
Direct Mode: Operands are directly referenced by memory addresses.
Indirect Mode: Memory address of the operand is stored in a register
or memory location.
2. Instruction Formats:

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

Instruction formats define the structure of machine instructions, including


opcode (operation code), operand addresses, and other necessary fields.
Common formats include:
Fixed-Length: All instructions have the same length, simplifying
decoding but potentially wasting space.
Variable-Length: Instructions vary in length, allowing for more
compact code but making decoding more complex.
3. Types and Sizes of Operands:
Instruction sets support various data types (integers, floating-point numbers,
characters) and sizes (8-bit, 16-bit, 32-bit, etc.). Design decisions involve
defining supported data types, their sizes, and operations that can be
performed on them.
4. Instruction Set Completeness and Orthogonality:

m
Completeness refers to having a sufficient range of instructions to perform

o
various operations. Orthogonality means that operations are defined

.c
consistently across all instruction types and that each instruction perfo
performs a

ity
single, well-defined operation.

s
5. Instruction Pipelining and Parallelism: er
Instruction set design impacts the potential for instruction
instruction-level parallelism
iv
and pipelining. Features like instruction reordering, multiple execution units,
n
gu

and support for concurrent


current operations influence how effectively instructions
can be executed in parallel.
ri n
ee

Each of these design issues significantly impacts the efficiency, performance, and
in

usability of an instruction set architecture. Design choices aim to balance complexity


complexity,
g

ease of programming, hardware efficiency, and performance to create a versatile and


en

effective instruction set for a given CPU architecture.


h ar
bi

6. The x86 architecture includes an instruc


instruc- tion called decimal adjust after addition (DAA).
DAA performs the following sequence of instructions:
if((AL AND OFH)>9) OR (AF = 1) then AL + 6
AF1;
else
A F leftarrow0 ;
endif; if (AL > 9FH) OR (CF = 1) then AL leftarrow AL + 60H ;
C F leftarrow1 ;
elsed prac

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

C F leftarrow O bebige dredi uot lo


endif. 2010
"H" indicates hexadecimal. AL is an 8-bit register that holds the result of addition of two
unsigned 8-bit integers. AF is a flag set if there is a carry from bit 3 to bit 4 in the result of an
addition. CF is a flag set if there Es a carry from bit 7 to bit 8. Explain the Function performed
by the DAA instruction.

The DAA instruction is used to adjust the sum of two packed BCD values
by creating a packed BCD result. The DAA instruction is used after an ADD
instruction that performs binary addition of two 2-digit packed BCD values
and stores the result in the AL register. The result of AL register is then
adjusted by the DAA instruction to get a 2-digit
digit packed BCD result.

m
Based on the result of ADD instruction stored in the AL register DAA

o
instruction adjusts the result.

.c
s ity
er
n iv
gu
ri n
ee
g in
en
h ar
bi

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

bi

7. A non-pipelined processor has a clock rate of 2.5 GHz and an average


CPI of 4. An upgrade to the processor introduces a five-stage pipeline.
However, due to internal pipeline delays, such as latch delay, the clock
rate of the new processor has to be reduced to 2 GHz.

What is the speedup achieved for a typical program?

What is the MIPS rate for each processor?

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

g
en
har

8.(a)
(a) Briefly explain the two basic approaches used to minimize register
register-
bi

memory operations
rations on RISC machines.
Compiler technology has also become more sophisticated, so that the
RISC use of RAM and emphasis on software has become ideal.

It is recognized that the wider the semantic gap, the


larger the number of undesirable consequences.
These include
(a) execution inefficiency,
(b) excessive machine program size, and
(c) increased compiler complexity.
e

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

conventional response of computer architects has been


to add layers of complexity to newer architectures.
f
instructions together with increasing the number of
addressing modes.

d
ion
Set Computers (CISCs).
x
instruction set has a number of disadvantages.
,
an increased size of the control unit, and increased logicc

m
delays.

o
.c
s ity
RISCs Design Principles
er t
iv
statements), rather than complex operations, ar
are
n

substantial and should be optimized.


gu

e
ri n

careful attention should be paid to the sequenci


sequencing of
ee

instructions. This is particularly true when it is know


known
that pipelining is indispensable to use
use.
in

g
g
en

operations and therefore a mechanism should b be


devised to make the communication of parameter
parameters
ar

among g the calling and the called procedures cause theth


h
bi

least number of instructions to execute


execute.
m
for storing and accessing local scalar variables.

8(B) A computer has 16 registers, an ALU with 32 operations and a


show with 8 operations, all connected to a common bus system.
i) Formulate a control word for a micro-operation.
ii) Show the bits of the control word that specify the micro-operation R4
< R5 + R6.

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

9. Let a be the percentage of a program code that can be executed


simultaneously by n processors in a computer system. Assume that the
remaining code must be executed sequentially by a single processor. Each
processor has an execution rate of xMIPS.

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

(a) Derive an expression for the effective MIPS rate when using the system
for exclusive execution of this program, in terms of n, a and x.
(b) If n= 16 and x=4 MIPS, determine the value of that will yield a system
performance of 40 MIPS.

Given data:

Given the software program execution as follows:

m
x MIPS (Million Instructions per Second)

o
.c
ty

For more solutions visit = biharengineeringuniversity.com


Biharengineeringuniversity.com

g in
en
har
bi

For more solutions visit = biharengineeringuniversity.com

You might also like