A single instruction to clear the lower four bits of the accumulator in 8085 assembly language?
→ The XOR's don't reliably clear random bits and ANI OF clears the upper nibble, not the lower nibble.
Which of the following statements is true?
ROM is a Read/Write memory
PC points to the last instruction that was executed
Stack works on the principle of LIFO
All instructions affect the flags
In a vectored interrupt
the branch address is assigned to a fixed location in memory
the interrupt source supplies the branch information to the processor through an interrupt vector
the branch address is obtained from a register in the processor
none of the above
In the following Pascal program segment, what is the value of X after the execution of the program segment?
If X > Y then if X < 0 then X:=abs(X) else X:=2*X;
X = -10
Merge sort uses
Divide and conquer strategy
The principle of locality justifies the use of
→ The things which are used more frequently those are stored in locality of reference.
→ For this purpose we use the cache memory.
In a paged segmented scheme of memory management, the segment table itself must have a page table because
the segment table is often too large to fit in one page
each segment is spread over a number of pages
segment tables point to page table and not to the physical locations of the segment
the processor’s description base register points to a page table
Both A and B
Segment paging is different from paged segmentation.
Which of the following page replacement algorithms suffers from Belady’s anamoly?
Both (A) and (C)
In some programming languages, an identifier is permitted to be a letter following by any number of letters or digits. If L and D denote the sets of letters and digits respectively, which of the following expressions defines an identifier?
(L ∪ D)+
L(L ∪ D)*
L(L ∪ D)*
Consider a grammar with the following productions
S → a∝b|b∝c| aB S → ∝S|b S → ∝b b|ab S ∝ → bd b|b
The above grammar is:
Because LHS must be single non-terminal symbol.
S ∝→ b [violates CSG]
→ Length of RHS production must be atleast same as that of LHS.
Extra information is added to the state by redefining iteams to include a terminal symbol as second component in this type of grammar.
Ex: [A → αβa]
A → αβ is a production, a is a terminal (or) right end marker $, such an object is called LR(k).
So, answer is (D) i.e., LR(k).
What are x and y in the following macro definition?
macro Add x,y Load y Mul x Store y end macro
What is the distance of the following code 000000, 010101, 000111, 011001, 111111?
010101 ⊕ 011001 = 001100
Which of the following strings can definitely be said to be tokens without looking at the next input character while compiling a Pascal program?
I. begin II. program III. <>
All of the above
A linker is given object modules for a set of programs that were compiled separately. What information need to be included in an object module?
Names and locations of all external symbols defined in the object module
Absolute addresses of internal symbols
To link to external symbols it must know the location of external symbols.
Which scheduling policy is most suitable for a time shared operating system?
Shortest Job First
First Come First Serve
For merging two sorted lists of sizes m and n into a sorted list of size m+n, we required comparisons of
In worst case, no. of comparisons is m+n-1.
Then we require O(m+n) comparisons to merging two sorted lists.
A binary tree T has n leaf nodes. The number of nodes of degree 2 in T is:
n - 1
The no. of subtrees of a node is called the degree of the node. In a binary tree, all nodes have degree 0, 1 and 2.
The degree of a tree is the maximum degree of a node in the tree. A binary tree is of degree 2.
The number of nodes of degree 2 in T is "n - 1".
The probability that a number selected at random between 100 and 999 (both inclusive) will not contain the digit 7 is: