Example of micro operations microinstruction
Q1. Give an Example of micro operations, microinstruction, micro program, micro code.
Sol :- Following are the examples of micro operations:-
Bus and Memory Transfers
Arithmetic Microoperations
Logic Microoperations
Example of Microinstruction:-
For Fetching Data:-
IF inter.
ELSE next
inst.map
Example of micro program :-
sp := sp + (-1);
mar := sp; mbr := ac; wr;
wr;
This pushes the AC value onto the stack
Example of Micro code:-
mar := sp; rd;
sp := sp + 1; rd;
ac := mbr;
Pop a number from the stack and place it in the AC
Q2 How Information Technology can be used for strategic advantages in business?
Ans – Globalisation- IT has not only brought the world closer, but it has allowed the world’s economy to become a single interdependent system. We not only share information quickly and efficiently, but also bring down barriers of linguistic and geographic boundaries. The world has developed into a global village due to the help of information technology allowing countries like Chile and Japan who are not only separated by distance but also by language to shares ideas and information with each other.
Communication- With the help of information technology, communication has also become cheaper, quicker, and more efficient. We can now communicate with anyone around the globe by simply text messaging them or sending them an email for an almost instantaneous response. The internet has also opened up face to face direct communication from different parts of the world thanks to the helps of video conferencing.
Cost effectiveness- Information technology has helped to computerize the business process thus streamlining businesses to make them extremely cost effective money making machines. This in turn increases productivity which ultimately gives rise to profits that means better pay and less strenuous working conditions.
More time – IT has made it possible for businesses to be open 24 x7 all over the globe. This means that a business can be open anytime anywhere, making purchases from different countries easier and more convenient. It also means that you can have your goods delivered right to your doorstep with having to move a single muscle.
Q3. What Characteristics of software make it different from other engineering products?
Ans :- Characteristics of software products :-
Software products may be
Generic – developed to be sold to a range of different customers.
Custom – developed for a single customer according to their specification.
Q4. What are different addressing modes available?
Sol :- Various Addressing Modes are :-
(1) Immediate Addressing Mode :-
Immediate addressing is used to load constants into registers and to use constants as operands.
The constant is part of the instruction word
e.g. ADD 5
Add 5 to contents of accumulator
5 is operand
Limited range
(2) Direct Addressing Mode :-
With direct addressing the address is part of the instruction
Usually the OpCode is one word and address is the succeeding word or words. Effective address (EA) = address field (A)
e.g. ADD A
Add contents of cell A to accumulator
Look in memory at address A for operand
Single memory reference to access data
No additional calculations to work out effective address
Limited address space
(3) Indirect Addressing Mode :-
RegisterMemory cell pointed to by address field contains the address of (pointer to) the operand
EA = (A)
Look in A, find address (A) and look there for operand
e.g. ADD (A)
Add contents of cell pointed to by contents of A to accumulator
(4) Register Direct Addressing Mode :-
Limited number of registers
Very small address field needed
Shorter instructions
Faster instruction fetch
No memory access
Very fast execution
Very limited address space
Multiple registers helps performance
Requires good assembly programming or compiler writing
(5) Register Indirect Addressing Mode :-
The instruction specifies a register which contains the address of the operand
MOVE #$1000,R7 ;R7 = $1000
As there are usually only a small number of internal registers the address of the register is easily contained in the instruction word.
It is efficient and is very useful for working with arrays and pointers. Operand is held in register named in address field EA = R
If an array of numbers is stored at $1000, then can be accessed in sequence by adding 1 to the register after each access.
Operand is in memory cell pointed to by contents of register R
Large address space (2n)
One fewer memory access than indirect addressing
(6) Displacement (Indexed) Addresing Mode :-
EA = A + (R)
Address field hold two values
A = base value
R = register that holds displacement
or vice versa
Q5 How will you differentiate b/w Arrays and Stacks?Explain by giving an example.
Ans- An array can be defined as an infinite collection of homogeneous elements. A stack is a data structure in which all insertions and deletions are done at the same end called the top. It is often called last in first out (LIFO) data structure.
Q6. How translator differs from Complier?
Ans :- translator- it is a device that changes a sentence from one language to another without the change of meaning.
Compiler :- It reads the entire program and converts it to the object code. It provides errors not one line but errors of the entire program. It consumes little time for converting a source program to an object program. Compilers are preferred when the length of the program is large. It provides security.
Q7 Out of Linear and Binary Search, which one is preferred where and why?
Ans- in linear search,we access each elemnt of array one by one sequentially and in binary search we seach in minimum number of steps.in binary search elemnts have to be in the sorted form.
Binary search is preferred over linear search because time consumed is less.