Coa Imp q With Ans (1)
Coa Imp q With Ans (1)
Coa Imp q With Ans (1)
Ans
o Bus is a path(of a group of wires) over which information is transferred, from any of several
sources to any of several destinations.
o A bus structure consists of a set of common lines, one for each bit of a register, through which binary
information is transferred one at a time.
o Control signal determine which register is selected by the bus.
o The two selection lines S1and S0are connected to the selection inputs of all four multiplexers.
o The selection lines choose the four bits of one register and transfer them into the four-line common bus.
S1 S0 Register Selected
0 0 Register A
0 1 Register B
1 0 Register C
1 1 Register D
FunctionTable for Bus
• Read Operation: The transfer of information from a memory word to the outside environment is
called a read operation.
• Write Operation: The transfer of new information to be stored into the memory is called a write
operation.
• A memory word will be symbolized by the letter M.
Read: DR ←M[AR]
This causes a transfer of information into DR from the memory word M selected by the address in AR.
Q-6 Draw and explain Logic Micro-operations in detail. (Hardware implementation of Logic micro
operation.)
Ans
Logic micro operations specify binary operations for strings of bits stored in registers.
S1 S0 Output Operation
0 0 AND
E=A /\B
0 1 E = AV B OR
1 0 XOR
E = A ⊕B
1 1 Compliment
E= Â
Function table
Q-7 Explain application of logic micro operations.
OR
Explain selective set, selective complement and selective clear.
Logic micro operations specify binary operations for strings of bits stored in registers.
1) Selective-Set operation:
a. The selective-set operation sets to 1 the bits in register A where there are
corresponding 1's in register B. It does not affect bit positions that have 0's in B.
The following numerical example clarifies this operation:
1010 A before
1100 B(logical operand)
1110 A after
b. The two leftmost bits of B are 1's, so the corresponding bits of A are set to 1.
c. One of these two bits was already set and the other has been changed from 0 to 1.
d. The two bits of A with corresponding 0's in B remain unchanged.
e. The OR microoperation can be used to selectively set bits of a register.
2) Selective-Complement operation:
The selective-complement operation complements bits in A where there are
corresponding 1's in B. It does not affect bit positions that have O's in B. For
example:
1010 A before
1100 B(logical operand)
0110 A after
Again the two leftmost bits of B are 1's, so the corresponding bits of A are
complemented.
The exclusive-OR microoperation can be used to selectively complement bits of
a register.
Q-9 Draw registers organization with memory bank. Give list of Basic computer register
with their Size and Range. OR Explain Registers of basic computer.
Ans:
The data register (DR) holds the operand read from memory.
The accumulator (AC) register is a general purpose processing register.
The instruction read from memory is placed in the instruction register (IR).
The temporary register (TR) is used for holding temporary data during the processing.
The memory address register (AR) has 12 bits.
The program counter (PC) also has 12 bits and it holds the address of the next instruction
to be read from memory.
The input register (INPR) receives an 8-bit character from an input device. The output
register (OUTR) holds an 8-bit character for an output device.
Ans:
TIMING SIGNALS:
Generated by 4-bit sequence counter and 416 decoder
The SC can be incremented or cleared.
Example: T0, T1, T2, T3, T4, T0, T1, . . .
Assume: At time T4, SC is cleared to 0 if decoder output D3 is active.
D3T4: SC 0
Q-12 Give the list of Memory Reference Instruction. Explain any THREE of it.
AND to AC
This is an instruction that performs the AND logic operation on pairs of bits in AC and the
memory word specified by the effective address. The result of the operation is transferred to AC.
Ans
AND to AC
This is an instruction that performs the AND logic operation on pairs of bits in AC and the
memory word specified by the effective address. The result of the operation is transferred to AC.
The output of each register is connected to two multiplexers(MUX) to form the two
buses.
The selection line in each multiplexer select one register or the input data.
A and B buses form the input to the ALU.
ALU determines the arithmetic or logic microoperation.
The result of microoperation is available for output data and also goes into the inputs of
all the registers.
The decoder select one register.
Register receive the information from the output bus.
Control Word: It is 14-bit binary word. (Q- Explain Control word with example.)
There are 14 binary selection inputs in the control unit and their combine value specifies
a control word.
It consists of 4 fields.
The three bits of SEL A, select a source register for the A input of the CPU.
The three bits of SEL B, select a source register for the B input of the CPU.
The three bits of SEL D, select a destination register using the decoder.
The five bits of OPR select one of the operations in the ALU.
Example:
R1R2 +R3
Q- 16 What is Stack? Give the organization of register stack with all necessary
elements and explain the working of push and pop operations. (OR Explain
Register stack).
Ans
Stack :
A stack is a storage device that stores information in such a manner that the item
stored last is the first item retrieved.
It follows LIFO.
In a 64-word stack, the stack pointer contains 6 bits because 26 = 64.
The register that holds the address for the stack is called a stack pointer (SP).
SP always points at the top item in the stack.
Two operations of a stack are:
1. Insertion of items (PUSH)
2. Deletion of items (POP)
PUSH:
If the stack is not full (FULL =0), a new item is inserted with a push operation. The push
operation consists of the following sequences of micro operations:
A new item is deleted from the stack if the stack is not empty (if EMTY = 0). The pop
operation consists of the following sequences of micro operations:
Ans
The stack pointer is decremented so that it points at the address of the next word.
A memory write operation inserts the word from DR into the top of the stack.
POP
A new item is deleted with a pop operation as follows:
DR ← M[SP]
SP ← SP +1
The top item is read from the stack into DR.
The stack pointer is then incremented to point at the next item in the stack.
1) Implied mode:
Operands are specified implicitly in the definition of the instruction.
Example: The instruction, “Complement Accumulator “ is implied mode instruction,
because the operand in accumulator register is implied in the definition of the instruction.
All register reference instruction that use accumulator are implied.
Zero address instruction are implied mode instruction.
2) Immediate Mode:
In this mode the operand is specified in the instruction itself.
Immediate mode instruction has an operand field instead of an address field.
3) Register Mode:
In this mode the operands are in registers that resides within the CPU.
The particular register is selected from a register field in the instruction.
Characteristics of CISC:
1. A larger number of instructions – typically from 100 to 250 instructions
2. Some instructions that perform specialized tasks and are used infrequently
3. A large variety of addressing modes – typically from 5 to 20 different modes
4. Variable-length instruction formats
5. Instructions that manipulate operands in memory
RISC CISC
REDUCED INSTRUCTION SET COMPLEX INSTRUCTION SET
COMPUTER COMPUTER
Relatively few instructions A larger number of instructions – typically
from 100 to 250 instructions.
Q-20 Convert into RPN and show stack operations: (3*4) + (5*6).
Ans
Evaluation of Arithmetic Expressions
Any arithmetic expression can be expressed in parenthesis-free Polish notation,
including reverse Polish notation
(3 * 4) + (5 * 6) => 3 4 * 5 6 * +
Example 2: (4+7) * [ 12 * (3 + 2) + 5]
Name Mnemonic
Load LD
Store ST
Move MOV
Exchange XCH
Input IN
Output OUT
Push PUSH
Pop POP
Name Mnemonic
Increment INC
Decrement DEC
Add ADD
Subtract SUB
Multiply MUL
Divide DIV
The four basic arithmetic operations are addition, subtraction, multiplication and division.
Increment instruction adds 1 to the value stored in a register or memory word.
Decrement instruction subtracts 1 from a value stored in a register or memory word.
Add with carry performs the addition on two operands plus the value of the carry from
the previous computation.
Subtract with borrow instruction subtract two words and borrow which may have resulted
from a previous subtract operation.
Q-22 Explain Parallel Processing.(OR Draw pipeline processing for instruction: Ai*Bi+Ci)
Parallel Processing is a term used to denote a large class of techniques that are used to
provide simultaneous data processing tasks for the purpose of increasing the computational
speed of a computer System.
A Parallel Processing system is able to perform concurrent data processing toachieve
faster Execution time.
The purpose of parallel processing is to speed up the computer processing.
Example:
The memory unit that communicates directly with CPU is called Main Memory.
Devices that provide backup storage are called Auxiliary Memory.
Only program and data currently needed by the processor reside in main memory.
The Main Memory communicates directly with CPU and with Auxiliary Memory
Devices through an I/O Processor.
Cache is used to increase the speed of processing by making current programs and data
available to CPU.
Auxiliary Memory Large storage capacity, Relatively Inexpensive, Low access speed
compared to main memory.
Cache Memory Very small, Relatively expensive, very high access speed.
Advantage of Memory Hierarchy:
Increase capacity
Improve average access time
Decrease cost/bit
Increase
in Increase
Capacity
in
and
Cost per
access
Bit
time
Q-24 A) Explain Main Memory. OR How main memory is useful in computer system?
OR Explain RAM and ROM.
Ans:
Main memory is divided into two subcategories RAM and ROM.
RAM
RAM losses its contents when the power is turned OFF. So, RAM is called volatile
memory.
User saves data in memory but they may not be store permanently.
It is called due to Random selection of Memory Location.
The microprocessor can write into or read from this memory.
ROM
ROM does not loss its contents when the power is turned OFF. So, ROM is called
Non volatile memory.
The microprocessor can only read from this memory.
It is programmable once.
Types of ROM are:
PROM
EPROM
EEPROM
Masked ROM
Flash Memory
o User can delete the data of EPROM through pass on Ultraviolet Light and
the chip can be reprogrammed.
o Chip can be used many times.
o Erasing Process takes 15 to 20 minutes.
EEPROM: Electrically Erasable Programmable Read only memory
o Functionally similar to EPROM.
o Information can be changed by using electrical signals at the register level
instead of all the information.
o Entire chip can be erased in 10ms.
o This memory is expensive compared to EPROM.
o Functionally similar to EPROM.
Example:
A 101 111100
K 111 000000
How To Read/Write?
First Read/Write heads are positioned in the specified Track.
The system has to wait until the disk reaches the specified sector under Read/Write head.
Information transfer is very fast once sector has been reached.
Storage capacity of disk depends on bits per inch of track and Track per inch of
surface.
Floppy Disk
A disk drive with removable disk is called a Floppy Disk.
It is made of plastic coated magnetic material.
Slower access than Hard Disk
Less storage capacity
Less Expensive
Portable
Magnetic Tape
It consists of magnetic, coating on a thin plastic strip.
Example: Recording Tap(used for audio, video, general purpose digital data storage using
a computer)
Secondary Storage Device
Q-27 Explain Cache Memory OR Write short note on Cache Memory.
Cache memory is a small, temporary fast memory.
It is placed between CPU and Memory.
It runs at speeds similar to CPU Registers.
Access Time is less than the access time of main memory.
Operation of Cache Memory:
When the CPU needs to access memory, the cache is examined.
If the word is found in the cache, It is read from that.
If the word is not found, the main memory is accessed to read the word and block of
words are transferred from main memory to cache memory for future references.
Performance Parameter of Cache Memory. (Q- Explain Performance Parameter of Cache.)
1. Hit: When the CPU refers to memory and find the word in cache , it is said to produce a
HIT.
2. Miss: The requested data is not found in the cache memory, then it counts as a MISS.
3. Hit Rate: Performance of cache memory is measured in terms of quality, is called Hit
Rate(Hit Ratio)
The transfer of data between a fast storage device such as magnetic disk and memory is
often limited by the speed of the CPU.
Removing the CPU from the path and peripheral device manage the buses directly will
improve the speed of transfer.
This transfer technique is called DMA.
A DMA controller takes over the buses to manage the transfer directly between the I/O
devices and memory.
BR is used by DMA Controller to request CPU to relieve control of buses.
BR is active, then CPU place address bus, data bus, read and write line into high
impedance state.
The CPU activate the BG to inform DMA that buses are in high impedance state.
DMA takes the control of buses and conduct memory transfer.
When the DMA terminates the transfer, it disable the bus request line(BR).
CPU disable the BG.
When the BG is 0, the CPU can communicate with the DMA registers through the data
bus to read from or write to the DMA registers.
When BG= 1, the CPU relieve the buses and the DMA can communicate directly with the
memory.
Q-31 What do you mean by Asynchronous data transfer? Give the methods of
Asynchronous data transfer.
Ans:
Asynchronous data transfer :
Data transfer between two independent units, where internal timing in each unit is
independent from the other. Such two units are said to be asynchronous to each other.
Methods of Asynchronous data transfer.