DCA 2103
DCA 2103
SET-I
Q. No. 1. Discuss Booth's multiplication algorithm, trace the steps for multiplying (-
7)*(+3).
Ans:
Booth used desk calculators that were faster at shifting than adding and created the algorithm to
increase their speed. Booth’s algorithm is ofi interest in the study ofi computer architecture.
Examples:
Output :
qn q[n+1] AC
QR sc(step count)
initial
0000 0010 4
0 0 rightShift
0000 0001 3
1 0 A= A -
BR 1010
rightShift
1101 0000 2
0 1 A= A +
BR 0011
rightShift
0001 1000 1
0 0 rightShift
0000 1100 0
Result=1100
Algorithm :
Here we have two numbers, 7 and 3. we need to convert 7 and 3 into binary numbers like 7
= (0111) and 3 = (0011). Now set 7 (in binary 0111) as multiplicand (M) and 3 (in binary
0011) as a multiplier (Q). And SC (Sequence Count) represents the number ofi bits, and here we
have 4 bits, so set the SC = 4. Also, it
Qn Qn +i 1 M = (0111) AC Q Qn + 1 SC
M' + 1 = (1001) & Operation
1 0 Initial 0000 0011 0 4
1001
0101 0100
The numerical example ofi the Booth's Multiplication Algorithm is 7 x 3 = 21 and the
binary representation ofi 21 is 10101. Here, we get the resultant in binary 00010101.
Now we convert it into decimal, as (000010101)10 = 2*4 + 2*3 + 2*2 + 2*1 + 2*0 =>
21.
Example:
MOV AX, [1592H], MOV AL, [0300H]
ii) Indirect Addressing
It is a scheme in which the address specifies which memory word or register
contains not the operand but the address of the operand.
Example:
LOAD R1, @R2
Example:
MOV AX,CX
Example:
LDAX B
The main memory acts as the central storage unit in a computer system. It is a
relatively large and fast memory which is used to store programs and data during the
run time operations.
The primary technology used fori the main memory is based on semiconductori
integrated circuits. The integrated circuits for the main memory
The primary compositions ofi a static RAM are flip-flops that store the binary information.
The nature ofi the stored information is volatile, i The static RAM is easy to use and
takes lesstime performing read and write operations as compared to dynamic RAM.
RAM chips are available in a variety ofi sizes and are used as per the system
requirement. The following block diagram demonstrates the chip interconnection in a
128 * 8 RAM chip.
A 128 * 8 RAM chip has a memory capacity ofi 128 words ofi eight bits (one
byte) peri word. This requires a 7-bit address and an 8-bit bidirectional data bus.
The 8-bit bidirectional data bus allows the transfer ofi data either from memory
to CPU during a read operation or from CPU to memory during a write
operation.
The read and write inputs specify the memory operation, and the two chip select(CS)
control inputs are for enabling the chip only when the microprocessor selects it.
e ofi the three possible states which include a signal equivalent to logic 1, a
signal equal to logic 0, or a high-impedance state.
A ROM memory is used for keeping programs and data that are permanently resident
in the computer.
Apart from the permanent storage o f data, the ROM portion o f main memory is
needed for storing an initial program called a bootstrap loader. The primary function
o f the bootstrap loader program is to start the computer software operating when power is
turned on.
ROM chips are also available in a variety ofi sizes and are also used as per the
system requirement. The following block diagram demonstrates the chip
interconnectionin a 512 * 8 ROM chip.
A ROM chip has a similar organization as a RAM chip. However, a ROM can
only perform read operation; the data bus can only operate in an output mode.
SET-II
Q. No. 4. Explain the process ofi fetching a word from the memory.
Ans:
CPU transfers the address o f the needed information word to the memory address
register(MAR). Address ofi the needed word is transferred to the primary memory.
● In the meantime, the CPU uses the control lines ofi the memory bus to mention
that a read operation is needed.
● Afteri issuing this request, the CPU waits till it retains an answer from the
memory, informing it that the required function has been finished. It is
accomplished through the use ofi another control signal on the memory bus,
which will be denoted as Memory Function Completed (MFC).
● The memory sets this signal to one to mention that the contents ofi the
particular location in the memory have been read and are available on the data
lines ofi the memory bus.
● We will suppose that as soon as the MFC signal is set to one, the information
on the data lines is loaded into
● MDR and is therefore available fori use inside the CPU. It finishes the memory
fetch operation.
The actions required for instruction Move (R1), R2 are:
MAR - [R1]
WMFC MDRoutR1out,
MARin,
Read MDRinE, , R2in
Q. No. 5. What is Interrupt driven I/O? Explain its full working through flowchart.
Ans:
Interrupt driven I/O is an approach to transfer data between ‘memory’ and ‘I/O devices’
through the ‘processor’. The otheri two techniques for the same are programmed I/O and
direct memory access (DMA). The interrupt-driven I/O involves the use ofi interrupt to
exchange data between I/O and memory.
programmed I/O we have seen it is a processor who keeps on checking whether the I/O
module is ready for reception and transmission ofi data or whether the I/O module has completed
the desired task or not. This long waiting ofi the processor deteriorates the performance ofi the
system.
To improve the performance ofi the system an alternative approach can be used where
after issuing the I/O command to the I/O module the processor can get itselfi busy doing
some otheri work. In this way, the valuable time ofi the processor can be utilized.
1. So let’s again start, to retrieve data from the I/O module the processor issues a
READ command and proceeds in doing something else.
For example, it starts executing some other program as it may be working on multiple
programs at a time.
2. As we know that whenever the processor is executing any program, after every
instruction cycle it checks for interrupts that have occurred. Ifi it finds the pending
interrupts it responds and serves the occurred interrupt.
3. The moment processor finds the interrupts by the I/O module, it suspends its current
execution and saves the context (e. g. , program counter, processor register) to serve the
interrupt.
4. Now processor request data from the I/O module and accept the word ofi data over
the data line. The processor stores this data onto the memory and restores the context
ofi the program it was working on and resumes its execution.
The figure shows you how with the help ofi interrupt I/O the data transfer is carried
out between memory and I/O. Though it is more efficient than programmed I/O still it
wastes some ofi the processor’s time. As the transferi ofi data from memory to the I/O
module or from the I/O module to memory passes through the processor.
Advantages
---------------------------------------------------------------------------------------------------------------------------------------
● It aids the user in transferring a huge amount ofi data.
● Every byte is sent without a pause before the next.
● It also helps to reduce timing errors.
● It allows connected devices to communicate in real-time.
Disadvantages
● The sender and receiver must operate at the same clock frequency simultaneously.
● The accuracy ofi the received data is determined by the receiver's capacity to
count the received bits precisely.
This transmission technique sends 8 bits or one letter at a time and it also transmits the stop
bit when the character is sent. The total number ofi bits is 10, including the character,
start, and stop bits. It employs character-based synchronization for the receiving
terminal to synchronize with receiving data on a character. It is easy, quick, and
inexpensive and doesn't need two-way communication. Asynchronous transmission is
demonstrated via letters, televisions, emails, forums, and radios.
Asynchronous transmission makes use ofi voice-band channels that are narrow and
operate at a slower speed.
Advantages
Disadvantages
The key differences between Synchronous and Asynchronous Transmission. Some ofi
themain differences between Synchronous and Asynchronous Transmission are as follows: