0% found this document useful (0 votes)
2 views7 pages

Input and Output Programming

The document contains a series of questions and answers related to computer organization, specifically focusing on accessing I/O devices. It covers topics such as memory-mapped I/O, bus structures, I/O device types, and data transfer methods. The answers provide explanations for the correct choices, enhancing understanding of the concepts discussed.

Uploaded by

sathishsowmya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views7 pages

Input and Output Programming

The document contains a series of questions and answers related to computer organization, specifically focusing on accessing I/O devices. It covers topics such as memory-mapped I/O, bus structures, I/O device types, and data transfer methods. The answers provide explanations for the correct choices, enhancing understanding of the concepts discussed.

Uploaded by

sathishsowmya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Computer Organization Questions and Answers – Accessing I/O Devices

1. In memory-mapped I/O ____________


a) The I/O devices and the memory share the same address space
b) The I/O devices have a separate address space
c) The memory and I/O devices have an associated address space
d) A part of the memory is specifically set aside for the I/O operation
2. The usual BUS structure used to connect the I/O devices is ___________
a) Star BUS structure b) Multiple BUS structure
c) Single BUS structure d) Node to Node BUS structure
3. In intel’s IA-32 architecture there is a separate 16 bit address space for the I/O
devices. a) False b) True
4. The advantage of I/O mapped devices to memory mapped is ___________
a) The former offers faster transfer of data
b) The devices connected using I/O mapping have a bigger buffer space
c) The devices have to deal with fewer address lines
d) No advantage as such
5. The system is notified of a read or write operation by ___________
a) Appending an extra bit of the address
b) Enabling the read or write bits of the devices
c) Raising an appropriate interrupt signal
d) Sending a special signal along the BUS
6. To overcome the lag in the operating speeds of the I/O device and the processor
we use ____ a) BUffer spaces b) Status flags c) Interrupt signals d) Exceptions
7. The method of accessing the I/O devices by repeatedly checking the status flags
is _________ a) Program-controlled I/O b) Memory-mapped I/O
c) I/O mapped d) None of the mentioned
8. The method of synchronising the processor with the I/O device in which the
device sends a signal when it is ready is?
a) Exceptions b) Signal handling c) Interrupts d) DMA
9. The method which offers higher speeds of I/O transfers is ___________
a) Interrupts b) Memory mapping c) Program-controlled I/O d) DMA

10. The process wherein the processor constantly checks the status flags
is called as _____a) Polling b) Inspection c) Reviewing d) Echoing
11. Input or output devices that are connected to computer are called _
A. Input/Output Subsystem B. Peripheral Devices
C. Interfaces D. Interrupt

12. How many types of modes of I/O Data Transfer?


A. 2 B. 3 C. 4 D. 5

13. Keyboard and Mouse Comes under?


A. Input peripherals B. Output peripherals
C. Input-Output peripherals D. None of the above

14. The method which offers higher speeds of I/O transfers is _________
A. Interrupts B. Memory mapping C. Program-controlled I/O D. DMA

15. In memory-mapped I/O ____________


A. The I/O devices have a separate address space
B. The I/O devices and the memory share the same address space
C. A part of the memory is specifically set aside for the I/O operation
D. The memory and I/O devices have an associated address space

16. The ________ circuit is basically used to extend the processor BUS to
connect devices.
A. Router B. Router C. Bridge D. None of the above

17. The ISA is an architectural standard developed by ______.


A. IBM B. AT&T Labs C. Microsoft D. Oracle

18. The SCSI BUS is used to connect the video devices to a processor by
providing a ______________.
A. Single Bus B. USB C. SCSI D. parallel BUS.

19. Which of the following is true about DMA?


A. DMA is an approach of performing data transfers in bulk between memory and the
external device without the intervention of the processor.
B. The DMA controller acts as a processor for DMA transfers and overlooks the entire
process.
C. The DMA controller has 3 registers.
D. All of the above

20. The registers of the controller are ______


A. 16 bit B. 32 bit C. 64 bit D. 128 bit

ANSWERS:
1. Answer: a
Explanation: Its the different modes of accessing the i/o devices.
2. Answer: c
Explanation: BUS is a collection of address, control and data lines used to connect
the various devices of the computer.
3. Answer: b
Explanation: This type of access is called as I/O mapped devices.
4. Answer: c
Explanation: Since the I/O mapped devices have a separate address space the
address lines are limited by the amount of the space allocated.
5. Answer: d
Explanation: It is necessary for the processor to send a signal intimating the request
as either read or write.
6. Answer: b
Explanation: The processor operating is much faster than that of the I/O devices, so
by using the status flags the processor need not wait till the I/O operation is done. It
can continue with its work until the status flag is set.
7. Answer: a
Explanation: In this method, the processor constantly checks the status flags, and
when it finds that the flag is set it performs the appropriate operation.
8. Answer: c
Explanation: This is a method of accessing the I/O devices which gives the
complete power to the devices, enabling them to intimate the processor when
they’re ready for transfer.
9. Answer: d
Explanation: In DMA the I/O devices are directly allowed to interact with the
memory without the intervention of the processor and the transfers take place in the
form of blocks increasing the speed of operation.
10. Answer: a
Explanation: None.
11. Ans : B
Explanation: Input or output devices that are connected to computer are called
peripheral devices.
12. Ans : B
Explanation: Generally three types of modes which are : Programmed I/O, Interrupt
Initiated I/O, Direct Memory Access
13. Ans : A
Explanation: Allows user input, from the outside world to the computer. Example:
Keyboard, Mouse etc.
14. Ans : D
Explanation: In DMA the I/O devices are directly allowed to interact with the memory
without the intervention of the processor and the transfers take place in the form of
blocks increasing the speed of operation.
15. Ans : B
Explanation: Its the different modes of accessing the i/o devices.

16. Ans : C
Explanation: The bridge circuit is basically used to extend the processor BUS to
connect devices.

17. Ans : A
Explanation: Industry Standard Architecture is an architectural standard developed by
IBM for its PC's.

18. Ans : D
Explanation: The SCSI BUS is used to connect the video devices to a processor by
providing a parallel BUS.

19. Ans : D
Explanation: all of the above statement is true regarding DMA.
20. Ans : B
Explanation: The registers of the controller are 32 bit.
1. Which of the following is an example of an input device?
a) Monitor b) Printer c) Keyboard d) Speaker

2. What is the primary function of an output device?


a) To receive data from the user b) To process data
c) To display or present processed information to the user
d) To store data
3. Which of the following is NOT an input device?
a) Mouse b) Scanner c) Projector d) Microphone
4. What does I/O stand for in the context of computer programming?
a) Input/Output b) Information Organization c) Internal Operations
d) Intelligent Output
5. Which of the following is a characteristic of a stream in Java's I/O
system?
a) They are used for direct memory access
b) They represent a sequence of data
c) They are only used for character-based data
d) They are always buffered
6. What is the purpose of the << operator in C++'s I/O system?
a) It is used to read data from an input stream
b) It is used to write data to an output stream
c) It is used to compare two values
d) It is used to define a new variable
7. Which of the following is used to read a single character from the
standard input in C?
a) scanf() b) printf() c) getchar() d) putchar()
8. Which of the following is an example of a "memory-mapped I/O"?
a) Instructions that explicitly handle I/O operations are present in the CPU
b) I/O devices are treated as memory locations
c) I/O is handled by a separate I/O processor
d) Input is handled through the keyboard and output is handled through
the monitor
9. In C++, which class is used for file output operations?
a) ifstream b) ofstream c) iostream d) fstream
10. What is the main purpose of an input device?
a) To display information to the user b) To store data
c) To allow the user to control the computer and input data
d) To process data

ANSWER
1. c) Keyboard
Explanation: Keyboards are used to input data into a computer.
2. c) To display or present processed information to the user
Explanation: Output devices like monitors and printers show the results of
computer processing.
3. c) Projector
Explanation: Projectors are used to display output, not to input data.
4. a) Input/Output
Explanation: I/O refers to the process of getting data into and out of a
computer system.
5. b) They represent a sequence of data
Explanation: Streams in Java provide a way to read or write data
sequentially.
6. b) It is used to write data to an output stream
Explanation: In C++, << is the insertion operator used for output
operations.
7. c) getchar()
Explanation: getchar() is a function specifically designed to read a single
character from standard input.
8. b) I/O devices are treated as memory locations
Explanation: In memory-mapped I/O, the CPU interacts with I/O devices
as if they were memory locations.
9. b) ofstream
Explanation: ofstream is the class specifically designed for writing data to
files in C++.
10. c) To allow the user to control the computer and input data
Explanation: Input devices facilitate user interaction with the computer by
enabling data entry.

You might also like