نماذج أسئلة متعددة الاختيار

advertisement
Software Engineering – CSI-343
Multiple Choice Questions - Dr. Zeiad El-Saghir
Choose the correct or best alternative in the following:
1. Numbers are stored and transmitted inside a computer in
(a) binary form
(b) ASCII code form
(c) decimal form
(d) alphanumeric form
2. The ASCII code of ‘A’ is
(a) 66D
(b) 41H
(c) 0100 0010
(d) 0110 0011
3. The ASCII code of ‘0’ (zero) is
(a) 48D
(b) 32H
(c) 0011 1000
(d) 42H.
4. A byte corresponds to
(a) 4 bits
(b) 8 bits
(c) 16 bits
(d) 32 bits
5. A gigabyte represents
(a) 1 billion bytes
(b) 1000 kilobytes
(c) 230 bytes
(d) 1024 bytes
6. A megabyte represents
(a) 1 million bytes
(b) 1000 kilobytes
(c) 220 bytes
(d) 1024
bytes
7. A Kb corresponds to
(a) 1024 bits
1
(b) 1000 bytes
(c) 210 bytes
(d) 210 bits
8. A 32-bit processor has
(a) 32 registers
(b) 32 I/O devices
(c) 32 Mb of RAM
(d) a 32bit registers
9. Information is stored and transmitted inside a computer in
(a) binary form
(b) ASCII code form
(c) decimal form
(d) alphanumeric form
10. The minimum number of bits required to store the hexadecimal number FF is
(a) 2,
(b) 4,
(c) 8,
(d) 16
11. A 20-bit address bus allows access to a memory of capacity
(a) 1 Mb
(b) 2 Mb
(c)32Mb
(d) 64 Mb
12. A 32-bit address bus allows access to a memory of capacity
(a) 64 Mb
(b) 16 Mb
(c) 1 Gb
(d) 4 Gb
13. Clock speed is measured in
(a) bits per second
(b) baud
(c) bytes
(d) Hertz
14. Pipelining improves CPU performance due to
(a) reduced memory access time
2
(b) increased clock speed
(c) the introduction of parallellism
(d) additional functional units
15. The system bus is made up of
(a) data bus
(b) data bus and address bus
(c) data bus and control bus
(d) data bus, control bus and address bus
16. A machine cycle refers to
(a) fetching an instruction
(b) clock speed
(c) fetching, decoding and executing an instruction
(d)executing an instruction
17. CISC machines
(a) have fewer instructions than RISC machines
(b) use more RAM than
RISC machines
(c) have medium clock speeds
(d) use variable size instructions
18. ROM
(a) is volatile
(b) is non-volatile
(c) stores more information than RAM
(d) is used for cache memory
19. Which of the following is an illegal instruction
(a) MoV Ax, 30000
(b) iNc Al, 1
(c) aNd bx, bx
(d) add ax, 30
20. Given that the subprogram putc displays the character in al, the effect of the following
instructions: mov al, ‘a’
add al, 2
call putc
is to
(a) display 2
(b) display c
3
(c) display a
(d) display a blank
21. Given that the bl register contains ‘B’, the effect of the following instruction
or bl, 0010 0000
is to
(a) clear bl
(b) store ‘b’ in bl
(c) store 0010 0000 in bl
(d) leave bl unchanged
22. Given that the bl register contains ‘B’, which of the following instructions will change bl
so that it contains 'b'
(a) or bl, 0010 0000
(b) and bl, 0010 0000
(c) or bl, 1101 1111 in bl
(d) and bl,
1101 1111
23. Given that the bl register contains ‘b’, which of the following instructions will change bl
so that it contains 'B'
(a) or bl, 0010 0000
(b) and bl, 0010 0000
(c) or bl, 1101 1111 in bl
(d) and bl, 1101 1111
24. Which of the following is an illegal instruction
(a) MoV Ax, 30000
(b) iNc Al
(c) aNd bx, bx
(d) add ax 30
25. Given that the subprogram putc displays the character in al, the effect of the following
instructions:
mov al, ‘0’
add al, 2
call putc
is to
(a) display ‘2’
(b) display '3'
(c) display '0'
4
(d) display a blank
26. Given that the bl register contains 1111 0000, the effect of the following instruction
or bl, 0000 1111
is to
(a) clear bl
(b) store 1111 1111 in bl
(c) store 0000 1111 in bl
(d) leave bl unchanged
27. Which of the following is an illegal 8086 instruction
(a) mov 20, bx
(b) iNc Al
(c) aNd bx, bx
(d) add ax, 30
28. Which of the following is an illegal l8086 instruction
(a) mov ax, [bx]
(b) iNc [bx]
(c) aDd bx, [bx]
(d) add ax, [cx]
29. Which of the following is an illegal 8086 instruction
(a) mov ax, [bx]
(b) iNc [bx]
(c) aDd bx, [dx]
(d) add [bx], 1
30. Which of the following is an illegal 8086 instruction
(a) ret 2
(b) push al
(c) aDd bx, 25000
(d) and ax, dx
31. The net effect of calling the following subprogram in terms of program behaviour:
Subprog:
push ax
add ax, 10
ret
is to
(a) leave ax unchanged
(b) add 10 to ax
(c) cause the program to behave in an unpredictable manner
5
(d) donothing
32. A Harvard architecture means that a machine has
(a) separate memories for data and instructions
(b) unifiedcache memory
(c) multiple functional units
(d) an on-chip cache
33. The read/write line is
(a) belongs to the data bus
(b) belongs to the control bus
(c) belongs to the address bus
(d) CPU bus
34. The instruction inc I where I is a memory variable involves
(a) a memory read operation
(b) a memory write operation
(c) a memory read and a memory write operation
(c) only an arithmetic operation
35. A hardware interrupt is
(a) also called an internal interrupt
(b) also called an external interrupt
(c) an I/O interrupt
(d) a clock interrupt
36. An assembly language program is typically
(a) non-portable
(b) shorter than an equivalent HLL program
(c) harder to read than a machine code program
(d) slower to execute than a compiled HLL program
37. An assembly language program is translated to machine code by
(a) an assembler
(b) a compiler
(c) an interpreter
(d) a linker
38. An assembly language directive is
(a) the same as an instruction
(b) used to define space for variables
(c) used to start a program
(d) to give commands to an assembler
6
39. When a program is translated by the MASM assembler, the machine code is stored in a
file with the extension
(a) .lis
(b) .obj
(c) .exe
(d) .out
40. The output of the linker (LINK command) is stored in a file with the extension
(a) .lis
(b) .obj
(c) .exe
(d) .lnk
41. Which of the following is not part of the processor
(a) the ALU
(b) the CU
(c) the registers
(d) the system bus
42. Which of the following defines a constant Max
(a) Max db 80
(b) Max equ 80
(c) Max dw 80
(d) mov Max, 80
43. The result of mov al, 65 is to store
(a) 0100 0010 in al,
(b) ASCII code of ‘A’ in al,
(c) store 42H in al
(d) store 1000 0001 in al
44. The call instruction is used to
(a) access subprograms
(b) access memory
(c) perform I/O
(d) access theStack
45. The effect of the following instructions
push ax
add ax, 4
pop bx
mov cx, ax
7
push bx
pop ax
on the ax register is
(a) leave it with its original value
(b) add 4 to it
(c) clear it
(d) double it
46. To copy the hexadecimal number A to the bh register you write
(a) mov 0bh, ah
(b) mov bh, 0ah
(c) mov bh, ah
(d) mov bh, [ah]
47. The effect of the following instructions
mov ah, 2h
int 21h
is to
(a) read a character into al
(b) read a character into dl
(c) display the character in al
(d) display the character in dl
48. The effect of the following instructions
mov ah, 1h
int 21h
is to
(a) read a character into al
(b) read a character into dl
(c) display the character in al
(d) display the character in dl
48. Given that al contains the ASCII code of an uppercase letter, it can be converted to
lowercase by
(a) add al, 32
(b) sub al, 32
(c) or al, 1101 1111
(d) and al, 0010 0000
49. Given that al contains the ASCII code of a lowercase letter, it can be converted to
uppercase by
8
(a) add al, 32
(b) sub al, 32
(c) or al, 1101 1111
(d) and al, 0010 0000
50. Given that al contains the ASCII code of an uppercase letter, it can be converted to
lowercase by
(a) add al, 30
(b) sub al, 30
(c) or al, 0010 0000
(d) and al, 0010 0000
51. Given that al contains the ASCII code of a lowercase letter, it can be converted to
uppercase by
(a) add al, 32
(b) sub al, 30
(c) or al, 1101 1111
(d) and al, 1101 1111
52. The instruction jg operates with
(a) unsigned numbers
(b) 2’s complement numbers
(c) floating point numbers
(d) ASCII codes
53. The instruction ja operates with
(a) unsigned numbers
(b) signed numbers
(c) floating point numbers
(d) ASCII codes
54. The instruction mov ax, [bx] is an example of
(a) indirect addressing
(b) indexed addressing
(c) direct addressing
(d) based addressing
55. The instruction je label is an example of
(a) indirect addressing
(b) indexed addressing
(c) relative addressing
(d) immediate addressing
9
56. The word size of an 8086 processor is
(a) 8 bits
(b) 16 bits
(c) 32 bits
(d) 64 bits
57. The code used to boot up a computer is stored in
(a) RAM
(b) ROM
(c) PROM and
(d) EPROM
58. Given that putc displays a character, the following code
mov al, ‘a’
add al, 2
and al, 1101 1111
call putc
is to
(a) display 2
(b) display ‘c’
(c) display ‘C’
(d) display ‘A’
59. Given that bl contains ‘B’ the effect of the following code
or bl, 0010 0000
add bl, 2
is to
(a) clear bl,
(b) store ‘b’ in bl
(c) store 0110 0001 in bl
(d) store ‘d’ in bl
60. Given that dl contains 'x' which of the following will cause 'x' to be displayed:
(a)
mov ah, 1h
int 21h
(b)
mov ah, 2h
int 20h
(c)
mov ah, 2h
int 21h
(d)
mov ah, 0h
10
int 21h
61. Which of the following will read a character into al:
(a)
mov ah, 9h
int 21h
(b)
mov ah, 2h
int 20h
(c)
mov ah, 2h
int 21h
(d)
mov ah, 1h
int 21h
62. Which of the following will display a string whose address is in the dx register:
(a)
mov ah, 0h
int 21h
(b)
mov ah, 2h
int 20h
(c)
mov ah, 9h
int 21h
(d)
mov ah, 9h
int 22h
63. Which of the following will terminate a program and return to MS-DOS:
(a)
mov ax, 4c00h
int 20h
(b)
mov ax, 4c00h
int 21h
(c)
mov dx, 4c00h
int 21h
(d)
mov ax, 9h
int 22h
64. The cmp instruction modifies the
(a) instruction pointer
(b) instruction register
(c) flags register
(d) segment register
65.The bp register is typically used for accessing
(a) strings
(b) memory
11
(c) stack
(d) data segment
66. The ret instruction modifies the
(a) instruction register
(b) instruction pointer
(c) address register
(d) flags register
67. The sp register is typically used for accessing
(a) strings
(b) memory
(c) stack
(d) data segment
68. The call instruction modifies
(a) the flags register
(b) instruction pointer
(c) bp register
(d) none of the previous
69. The call instruction modifies
(a) the flags register
(b) stack pointer
(c) bp register
(d) none of the previous
70. The call instruction modifies
(a) the program counter and SP register
(b) flags register
(c) bp register
(d) none of the previous
71. The ret instruction modifies the
(a) stack pointer
(b) bp register
(c) instruction register
(d) flags register
72. A microprocessor is a _______ chip integrating all the functions of a CPU of a
computer.
A. multiple
B. single
12
C. double
D. triple
73. Microprocessor is a/an _______ circuit that functions as the CPU of the compute
A. electronic
B. mechanic
C. integrating
D. processing
74. Microprocessor is the ______ of the computer and it perform all the computational
tasks
A. main
B. heart
C. important
D. simple
75. The intel 8086 microprocessor is a _______ processor
A. 8 bit
B. 16 bit
C. 32 bit
D. 4 bit
76. In 8086 microprocessor , the address bus is ________ bit wide
A. 12 bit
B. 10 bit
C. 16 bit
D. 26 bit
77. The 16 bit flag of 8086 microprocessor is responsible to indicate ___________
A. the condition of result of ALU operation
B. the condition of memory
C. the result of addition
D. the result of subtraction
78. The CF is known as ________
A. carry flag
B. condition flag
C. common flag
D. single flag
79. The SF is called as ________
A. service flag
B. sign flag
13
C. single flag
D. condition flag
80. The OF is called as _______
A. overflow flag
B. overdue flag
C. one flag
D. over flag
81. The IF is called as _________
A. initial flag
B. indicate flag
C. interrupt flag
D. inter flag
82. The register AX is formed by grouping ________
A. AH & AL
B. BH & BL
C. CH & CL
D. DH & DL
83. The SP is indicated by ________
A. single pointer
B. stack pointer
C. source pointer
D. destination pointer
84. The BP is indicated by _______
A. base pointer
B. binary pointer
C. bit pointer
D. digital pointer
85. The SS is called as ________
A. single stack
B. stack segment
C. sequence stack
D. random stack
86. The DS is called as _______
A. data segment
B. digital segment
C. divide segment
14
D. decode segme
87. The IP is ________ bits in length
A. 8 bits
B. 4 bits
C. 16 bits
D. 32 bits
88. The push source copies a word from source to ______
A. stack
B. memory
C. register
D. destination
89. Inc destination increments the content of destination by _______
A. 1
B. 2
C. 30
D. 41
90. IMUL source is a signed _________
A. multiplication
B. addition
C. subtraction
D. division
91. _________destination inverts each bit of destination
A. NOT
B. NOR
C. AND
D. OR
92. Instruction providing both segment base and offset address are called _____
A. below type
B. far type
C. low type
D. high type
93. The _________ translates a byte from one code to another code
A. XLAT
B. XCHNG
C. POP
D. PUSH
15
94. The 8086 fetches instruction one after another from __________ of memory
A. code segment
B. IP
C. ES
D. SS
95. ________ is used to write into memory
A. RD
B. WR
C. RD / WR
D. Chk
96. A _____ Instruction at the end of interrupt service program takes the execution back to
the interrupted program
A. forward
B. return
C. data
D. line
97. Data transfer between the microprocessor for peripheral takes place through
__________
A. i/o port
B. input port
C. output port
D. multi port
98. The pins are _______ data lines and are connected to data bus in system
A. unidirectional
B. bidirectional
C. directional
D. multidirectional
99. The data bus buffer is _________data line
A. unidirectional
B. bidirectional
C. no direction
D. multi direction
100. The _______ allow data transfer between memory and peripherals
A. DMA technique
B. Microprocessor
C. Register
16
D. Decoder
101. Who introduced Pentium family?
A. intel
B. wipro
C. cts
D. samsung
102. 8088 microprocessor differs with 8086 microprocessor in _______.
A. data width on the output.
B. address capability.
C. support of coprocessor.
D. support of MAX / MIN mode
103. The address bus flow in __________.
A. bidirection.
B. unidirection.
C. mulidirection.
D. circular.
104. Status register is also called as ___________.
A. accumulator.
B. stack.
C. counter.
D. flags
105. The 8085 Microprocessor uses__________ V power suppl
A. .+5V.
B. -5V.
C. +12V.
D. -12V
106. The translator program used in assembly language is called
a. Compiler
b. Interpreter
c. Assembler
d. Translator
107. A compiler is a translating program which
a. Translates instruction of a high level language into machine language
b. Translates entire source program into machine language program
17
c. It is not involved in program’s execution
d. All of above
108. Which of the following is machine independence program?
a. High level language
b. Low level language
c. Assembly language
d. Machine language
109. Which of the following is not a primary storage device?
a. Magnetic tape
b. Magnetic disk
c. Optical disk
d. None of above
110. Which of the following is a secondary memory device?
a. Keyboard
b. Disk
c. ALU
d. All of the above
111. The most commonly used standard data code to represent alphabetical, numerical
and punctuation characters used in electronic data processing system is called
a. ASCII
b. EBCDIC
c. BCD
d. All of above
‫انتهت األسئلة‬
، ، ، ‫مع تحياتي وخالص دعائي‬
18
Download