UGC Net Computer Science December-12 Paper 3 Page 4 Solved
31. Which of the following flags are set when ‘JMP’ instruction is executed ?
(A) SF and CF
(B) AF and CF
(C) All flags
(D) No flag is set
Answer : D
Explanation:
This flag indicates an overflow condition for unsigned integer arithmetic. It is also used in multiple-precision arithmetic.
Explanation:
8086 has some status and control flags for it's working.The purpose of the FLAGS register is to indicate the status of the processor. It does this by setting the individual bits called flags. There are two kinds of FLAGS. There are two type of flags is used , Status FLAGS and Control FLAGS. Status FLAGS reflect the result of an operation executed by the processor. The control FLAGS enable or disable certain operations of the processor.
Control/Conditional Flags
Conditional flags represent result of last arithmetic or logical instruction executed. Conditional flags are as follows:CF (Carry Flag)
This flag indicates an overflow condition for unsigned integer arithmetic. It is also used in multiple-precision arithmetic.
AF (Auxiliary Flag)
If an operation performed in ALU generates a carry/barrow from lower nibble (i.e. D0 – D3) to upper nibble (i.e. D4 – D7), the AF flag is set i.e. carry given by D3 bit to D4 is AF flag. This is not a general-purpose flag; it is used internally by the processor to perform Binary to BCD conversion.
PF (Parity Flag)
This flag is used to indicate the parity of result. If lower order 8-bits of the result contains even number of 1’s, the Parity Flag is set and for odd number of 1’s, the Parity Flag is reset.
ZF (Zero Flag)
It is set; if the result of arithmetic or logical operation is zero else it is reset.SF (Sign Flag)
In sign magnitude format the sign of number is indicated by MSB bit. If the result of operation is negative, sign flag is set.OF (Overflow Flag)
This stands for over flow flag. It occurs when signed numbers are added or subtracted. An OF indicates that the result has exceeded the capacity of machine. It becomes set if the sign result cannot express within the number of bites.
Control Flags
Control flags are set or reset deliberately to control the operations of the execution unit. Control flags are as follows:TF (Trap Flag)
It is used for single step control. It allows user to execute one instruction of a program at a time for debugging. When trap flag is set, program can be run in single step mode.IF (Interrupt Flag)
It is an interrupt enable/disable flag. This stands for interrupt flag. This flag is used to enable or disable the interrupt in a program. If it is set, the maskable interrupt of 8086 is enabled and if it is reset, the interrupt is disabled. It can be set by executing instruction sit and can be cleared by executing CLI instruction.
DF (Direction Flag)
This flag stands for direction flag and is used for the direction of strings. If it is set, string bytes are accessed from higher memory address to lower memory address. When it is reset, the string bytes are accessed from lower memory address to higher memory address.
32. A thread is a light weight process. In the above statement, weight refers to
(A) time
(B) number of resources
(C) speed
(D) All the above
33. The Z-buffer algorithm is used for Hidden surface removal of objects. The maximum number of objects that can be handled by this algorithm shall
(A) Depend on the application
(B) be arbitrary no. of objects
(C) Depend on the memory
availability
(D) Depend on the processor
Answer : B
34. The power set of AUB, where
A = {2, 3, 5, 7} and B = {2, 5, 8, 9} is
(A) 256
(B) 64
(C) 16
(D) 4
Answer : B
Explanation:
Answer : B
Explanation:
AUB = {2,3,5,7,8,9}
P(AUB) = { φ,{2},{3},{5},{7},{8},{9},{2,3},{2,5},{2,7},{2,8},{2,9},{3,5}, {3,7},{3,8},{3,9},{5,7},{5,8},{5,9},{7,8},{7,9},{8,9},{2,3,5},{2,3,7},{2,3,8},{2,3,9},{2,5,7}, {2,5,8},{2,5,9},{2,7,8},{2,7,9},{2,8,9},{3,5,7},{3,5,8},{3,5,9},{3,7,8},{3,7,9},{3,8,9},{5,7,8}, {5,7,9},{5,8,9},{7,8,9}, {2,3,5,7},{2,3,5,8},{2,3,5,9},{2,3,7,8},{2,3,7,9},{2,3,8,9}, {2,5,7,8}, {2,5,7,9},{2,5,8,9},{2,7,8,9},{3,5,7,8}, {3,5,7,9},{3,5,8,9},{3,7,8,9},{5,7,8,9}, {2,3,5,7,8}, {2,3,5,7,9},{2,3,7,8,9},{2,3,5,8,9},{2,5,7,8,9},{3,5,7,8,9},{2,3,5,7,8,9}}
P(AUB) = { φ,{2},{3},{5},{7},{8},{9},{2,3},{2,5},{2,7},{2,8},{2,9},{3,5}, {3,7},{3,8},{3,9},{5,7},{5,8},{5,9},{7,8},{7,9},{8,9},{2,3,5},{2,3,7},{2,3,8},{2,3,9},{2,5,7}, {2,5,8},{2,5,9},{2,7,8},{2,7,9},{2,8,9},{3,5,7},{3,5,8},{3,5,9},{3,7,8},{3,7,9},{3,8,9},{5,7,8}, {5,7,9},{5,8,9},{7,8,9}, {2,3,5,7},{2,3,5,8},{2,3,5,9},{2,3,7,8},{2,3,7,9},{2,3,8,9}, {2,5,7,8}, {2,5,7,9},{2,5,8,9},{2,7,8,9},{3,5,7,8}, {3,5,7,9},{3,5,8,9},{3,7,8,9},{5,7,8,9}, {2,3,5,7,8}, {2,3,5,7,9},{2,3,7,8,9},{2,3,5,8,9},{2,5,7,8,9},{3,5,7,8,9},{2,3,5,7,8,9}}
35. In Win32, which function is used to create Windows Applications ?
(A) Win APP
(B) Win API
(C) Win Main
(D) Win Void
36. Suppose a processor does not have any stack pointer registers, which of the following statements is true ?
(A) It cannot have subroutine call instruction.
(B) It cannot have nested subroutine calls.
(C) Interrupts are not possible.
(D) All subroutine calls and
interrupts are possible.
37. Everything below the system call interface and above the physical hardware is known as ______.
(A) Kernel
(B) Bus
(C) Shell
(D) Stub
38. Which is not the correct statement ?
(A) The class of regular sets is closed under homomorphisms.
(B) The class of regular sets is not closed under inverse homomorphisms.
(C) The class of regular sets is closed under quotient.
(D) The class of regular sets is closed under substitution.
39. When a programming Language has the capacity to produce new datatype,it is called as,
(A) Overloaded Language
(B) Extensible Language
(C) Encapsulated Language
(D) Abstraction Language
40. Which of the following operating system is better for implementing client-server network ?
(A) Windows 95
(B) Windows 98
(C) Windows 2000
(D) All of these
No comments:
Post a Comment