VIVA VOCE QUESTIONS WITH ANSWERS
INTRODUCTION
1. Define system software.
It consists of variety of programs that supports the operation of the computer. This
software makes it possible for the user to focus on the other problems to be solved
with out needing to know how the machine works internally.
Eg: operating system, assembler, loader.
2. Give some applications of operating system.
to make the computer easier to use
to manage the resources in computer
process management
data and memory management
to provide security to the user.
Operating system acts as an interface between the user and the system
Eg:windows,linux,unix,dos
3. Define compiler and interpreter.
• Compiler is a set of program which converts the whole high level language
program to machine language program.
• Interpreter is a set of programs which converts high level language program
to machine language program line by line.
4. Define loader.
Loader is a set of program that loads the machine language translated by the
translator into the main memory and makes it ready for execution.
5. What is the need of MAR register?
MAR (memory address register) is used to store the address of the memory from
which the data is to be read or to which the data is to be written.
6. Draw SS instruction format.
opcode L B1 D1 B2 D2
0 7 8 15 16 19 20 31 32 35 36 47
It is a 6 byte instruction used to move L+I bytes data fro the storage location1 to
the storage location2.
Storage location1 = D1+[B1]
Storage location2 = D2+[B2]
20
Eg: MOV 60,400(3),500(4)
7. Give any two differences between base relative addressing and program
counter relative addressing used in SIC/XE.
8. Define indirect addressing
In the case of immediate addressing the operand field gives the memory location.
The word from the given address is fetched and it gives the address of the operand.
Here the second operand is given in indirect addressing mode. First the word in
memory location 600 is fetched and which will give the address of the
operand.
9. Define immediate addressing.
In this addressing mode the operand value is given directly. There is no need to
refer memory. The immediate addressing is indicated by the prefix ‘#’.
Eg: ADD #5
In this instruction one operand is in accumulator and the second operand is an
immediate value the value 5 is directly added with the accumulator content and the
result is stored in accumulator.
10. List out any two CISC and RISC machine.
CISC –Power PC, Cray T3E
RISC – VAX,Pentium Pro architecture
11. Following is a memory configuration:
Address Value Register R
1 5 5
5 7
6 5
What is the result of the following statement?
Base relative addressing PC relative addressing Here the Target address is
calculated using the formula
Target address = Displacement + [B]
B-base register
Here the target address is calculated using the formula
Target address = Displacement + [PC]
PC-program counter
Displacement lies between 0 to 4095 Displacement lies between –2048 to 2047 21
ADD 6(immediate) to R (indirect)
Here 6 is the immediate data and the next value is indirect data. ie, the register
contains the address of the operand. Here the address of the operand is 5 and its
corresponding value is 7.
6 + [R] = 6+ [5] = 6+ 7 =13
12. Following is a memory configuration:
Address Value Register R
4 9 6
5 7
6 2
What is the result of the following statement?
SUB 4(direct) to R (direct)
Here one operand is in the address location 4(direct addressing) and the next
operand is in the register (register direct). The resultant value is 9 –6 =3.
13. What is the name of A and L register in SIC machine and also specify its use.
A-accumulator Used for arithmetic operation. i.e., in the case of arithmetic
operations one operand is in the accumulator, and other operand may be an
immediate value, register operand or memory content. The operation given in the
instruction is performed and the result is stored in the accumulator register.
L-linkage register
It is used to store the return address in the case of jump to subroutine
(JSUB) instructions.
14. What are the instruction formats used in SIC/XE architecture?
Give any one
format.
Format 1 (1 byte), Format 2 (2 bytes), Format 3 (3 bytes) & Format 4(4 bytes)
Format 2:
8 4 4
OPCODE R1 R2
15. Consider the instructions in SIC/ XE programming
10 1000 LENGTH RESW 4
22
20- -- - - NEW WORD 3
What is the value assign to the symbol NEW?
In the line 10 the address is 1000 and the instruction is RESW 4.It reserves 4 word
(3 x 4 =12) areas for the symbol LENGTH. hence 12 is added to the LOCCTR.
Thus the value of the symbol NEW is 1000+12 =100C.
16. What is the difference between the instructions LDA # 3 and
LDA THREE?
In the first instruction immediate addressing is used. Here the value 3 is directly
loaded into the accumulator register. In the second instruction the memory
reference is used. Here the address (address assigned for the symbol THREE) is
loaded into the accumulator register.
17. Differentiate trailing numeric and leading separate numeric.
The numeric format is used to represent numeric values with one digit per byte. In
the numeric format if the sign appears in the last byte it is known as the trailing
numeric. If the sign appears in a separate byte preceding the first digit then it is
called as leading separate
numeric.
18. What are the addressing modes used in VAX architecture?
Register direct; register deferred, auto increment and decrement, program counter
relative, base relative, index register mode and indirect addressing are the various
addressing modes in VAX architecture.
19. How do you calculate the actual address in the case of
register indirect with
immediate index mode?
Here the target address is calculated using the formula
T.A =(register) + displacement.
20. Write the sequence of instructions to perform the operation
BETA = ALPHA + 1
using SIC instructions
LDA ALPHA
ADD ONE
STA BETA
…. ….
ALPHA RESW 1
BETA RESW 1
ONE RESW 1
21. Write the sequence of instructions to perform the operation
BETA = ALPHA+5
using SIC/XE instructions.
23
LDA ALPHA
ADD #1
STA BETA
…. ….
ALPHA RESW 1
BETA RESW 1
22. What is the use of TD instruction in SIC architecture?
The test device (TD) instruction tests whether the addressed device is ready to send
or receive a byte of data. The condition code is set to indicate the result of this test.
Setting of < means the device is ready to send or receive, and = means the device is
not ready.
ASSEMBLERS
1. Define the basic functions of assembler.
* Translating mnemonic operation codes to their machine language
equivalents.
* Assigning machine addresses to symbolic labels used by the
programmer.
2. What is meant by assembler directives? Give example.
These are the statements that are not translated into machine instructions, but they
provide instructions to assembler itself. example
START,END,BYTE,WORD,RESW and RESB.
3. What are forward references?
It is a reference to a label that is defined later in a program.
Consider the statement
10 1000 STL RETADR
. . . .
. . . .
80 1036 RETADR RESW 1
The first instruction contains a forward reference RETADR. If we attempt to
translate the program line by line, we will unable to process the statement in line10
because we do not know the address that will be assigned to RETADR .The
address is assigned later(in line 80) in the program.
4. What are the three different records used in object program?
The header record, text record and the end record are the three different records
used in object program. 24 The header record contains the program name, starting
address and length of the program. Text record contains the translated instructions
and data of the program. End record marks the end of the object program and
specifies the address in the program where execution is to begin.
5. What is the need of SYMTAB (symbol table) in assembler?
The symbol table includes the name and value for each symbol in the source
program, together with flags to indicate error conditions. Some times it may
contain details about the data area. SYMTAB is usually organized as a hash table
for efficiency of insertion and retrieval.
6. What is the need of OPTAB (operation code table) in
assembler?
The operation code table contains the mnemonic operation code and its machine
language equivalent. Some assemblers it may also contain information about
instruction format and length. OPTAB is usually organized as a hash table, with
mnemonic operation code as the key.
7. What are the symbol defining statements generally used in
assemblers?
‘EQU’-it allows the programmer to define symbols and specify their values
directly. The general format is SymbolE Q U value
‘ORG’-it is used to indirectly assign values to symbols. When this statement
is encountered the assembler resets its location counter to the specified value. The
general format is ORG value
In the above two statements value is a constant or an expression involving
constants and previously defined symbols.
8. Define relocatable program.
An object program that contains the information necessary to perform required
modification in the object code depends on the starting location of the program
during load time is known as relocatable program.
9. Differentiate absolute expression and relative expression.
If the result of the expression is an absolute value (constant) then it is known as
absolute expression.
Eg: BUFEND – BUFFER
25
If the result of the expression is relative to the beginning of the program then it is
known as relative expression. label on instructions and data areas and references to
the location counter values are relative terms.
Eg: BUFEND + BUFFER.

0 Comments