Professional Documents
Culture Documents
Example
Perform 0.5 + (-0.4375)
1. Rewrite the smaller number such that its exponent matches with the exponent
of the larger number.
Can only keep three digits to the right of the decimal point, so the result is
10.212 × 105
1.0212 × 106
4. Round it
1.021 × 106
Q.3 what is the difference between interrupt service routine and subroutine?
Solution:-
Interrupt Service Routine Subroutine
Initiated by some external or internal Initiated by execution of some
signal instruction
Address of the interrupt service routine Address of the subroutine determined
determined by hardware from the address part of the instruction
Interrupt procedure stores all
Only the value of the PC stored before
information to describe the state of the
branching to the subroutine
CPU
Call occurs at specific and
Can ask for service without any prior
predetermined locations in the main
notice
routine.
Hardware initiated Software initiated
Request can come unexpectedly; may
have to carry out some emergency
Request can come expectedly
activities-like saving the status of scratch
pad registers.
Data lines- The data lines provide a path for moving data among system
modules. These lines, collectively, are called the data bus. The data bus may
consist of 32, 64, 128, or even more separate lines, the number of lines being
referred to as the width of the data bus. Because each line can carry only 1 bit
at a time, the number of lines determines how many bits can be transferred at a
time.
Address lines- The address lines are used to designate the source or destination
of the data on the data bus. For example, if the processor wishes to read a word
(8, 16, or 32 bits) of data from memory, it puts the address of the desired word
on the address lines. Clearly, the width of the address bus determines the
maximum possible memory capacity of the system.
Control lines- The control lines are used to control the access to and the use of
the data and address lines. Because the data and address lines are shared by all
components, there must be a means of controlling their use. Control signals
transmit both command and timing information among system modules.
Timing signals indicate the validity of data and address information. Command
signals specify operations to be performed.
Bus arbitration:
It is the process of determining which competing bus master will be permitted
access to the bus.
It is the process by which the next device to became the bus master is selected
and bus master ship is transferred to it.
Arbitration is the process where more than one module is controlling the bus.
Examples:
1. CPU and DMA controller
Only one module may control bus system at a time
There are two types:
1. Centralized:
o It is a single hardware device for controlling the bus
o It may be a part of CPU
o The processor is normally the bus master unless it grants bus membership to
one of the DMA controller.
2. Decentralized:
o Each module may claim the bus control unit logic is presentation own
module.
o Offer high reliability
o Operation of bus is not dependent on single device