Kamis, 08 Januari 2015

Basic Input/Output


Basic of Input/Output
In computing, input/output or I/O (or informally, io or IO) is the communication between an information processing system (such as a computer) and the outside world, possibly a human or another information processing system. Inputs are the signals or data received by the system and outputs are the signals or data sent from it. The term can also be used as part of an action; to "perform I/O" is to perform an input or output operation. I/O devices are used by a human (or other system) to communicate with a computer. For instance, a keyboard or mouse is an input device for a computer, while monitors and printers are output devices. Devices for communication between computers, such as modems and network cards, typically perform both input and output operations.

Note that the designation of a device as either input or output depends on perspective. Mice and keyboards take physical movements that the human user outputs and convert them into input signals that a computer can understand; the output from these devices is the computer's input. Similarly, printers and monitors take signals that a computer outputs as input, and they convert these signals into a representation that human users can understand. From the human user's perspective, the process of reading or seeing these representations is receiving input; this type of interaction between computers and humans is studied in the field of human–computer interaction.

In computer architecture, the combination of the CPU and main memory, to which the CPU can read or write directly using individual instructions, is considered the brain of a computer. Any transfer of information to or from the CPU/memory combo, for example by reading data from a disk drive, is considered I/O. The CPU and its supporting circuitry may provide memory-mapped I/O that is used in low-level computer programming, such as in the implementation of device drivers, or may provide access to I/O channels. An I/O algorithm is one designed to exploit locality and perform efficiently when exchanging data with a secondary storage device, such as a disk drive.

Higher-level operating system and programming facilities employ separate, more abstract I/O concepts and primitives. For example, most operating systems provide application programs with the concept of files. The C and C++ programming languages, and operating systems in the Unix family, traditionally abstract files and devices as streams, which can be read or written, or sometimes both. The C standard library provides functions for manipulating streams for input and output.

In the context of the ALGOL 68 programming language, the input and output facilities are collectively referred to as transput. The ALGOL 68 transput library recognizes the following standard files/devices: stand in, stand out, stand errors and stand back.

An alternative to special primitive functions is the I/O monad, which permits programs to just describe I/O, and the actions are carried out outside the program. This is notable because the I/O functions would introduce side-effects to any programming language, but this allows purely functional programming to be practical.

So now how are these all related to input/output? The answer is, the input/output is the main aspect of the computer science. It defines the whole system. It is related to system theory of Bertalanffy. Every system in the world is an open system. An open system always has input and output. No system can live if it won't adhere to this rule; it will be destroyed. In contrast, a closed system can live without an input or output. It is a self sufficient system. No closed system has ever been discovered.

I recommend the lecture of Bertalanffy to gain further knowledge on this. So a computer is an open system that needs an input and makes an output. Input and output is not only related to personal computers but also other devices. About this I recommend a lecture on the theory of communication, especially Claude Shannon and Norbert Wiener.

Input and output is abbreviated I/O. There are many levels of input on today's personal computers. To first understand I/O I will talk about the computer input and output. So here is the plan of our study:

  • Machine level I/O
  • Coding level I/O
  • And finally End user level I/O

As you may see here all of these levels need special expertise. The further you go here, the more you will get special knowledge on the level you chose. And any level you choose here, the expertise is infinite, and you will arrive finally to the end of this knowledge where you can contribute to today's science.

Input/Output on the Coding Level
On the coding level we can analyze the input and the output by the use of algorithms. On the coding level not all input produces output. There are five categories of inputted data:

  • Remarks. No action and no calculation by the computer is done here.
  • Declarations. These inputs are preliminary to a calculation. You say here to the computer "Get ready!"
  • Conditions. The computer is confronted with a choice. This is post-preliminary input.
  • Variables. The computer inializes a variable with a value of null and can receive additional values subsequently.
  • Calculations. Here the computer is confronted with a calculation. The computer got into this level as the result of declarations, choices, and variables with values. Now it is using these to prepare the output.

Output passes through several stages on the way from its origin as electric signals to human-readable data:

  • Electric signals. All calculations produce a result coded in electronic signals. These signals may be passed to RAM as input.
  • Zeros and ones. Electric signals readily transfer to values of 0 or 1 stored as bits: a signal means 1, a gap without signals means 0.
  • Binary numbers. Binary digits can be combined into eight- or sixteen-bit binary numbers, like 00000000, 11111111, or 10101000.
  • Machine language. These binary numbers can be interpreted as instructions to be executed by the CPU.
  • Coder language. Through a compiler, machine code and its corresponding assembly language correlates to a language such as programmers write in.


Input/Output on End-User Level
From an end-user point of view, the initial electric signals may turn into a letter on the screen, motion of a robot arm, a laser shot, or a car engine start. One should consider here that we use disguised computers in our cellular phones, televisions, robots, toys, trains, airplanes, warheads, and missiles.

  • For example, a kitchen robot with knives to cut and extract juice from fruit receives the fruit as its input and produces the juice as its output.
  • In a personal computer, the input may be the age of school-children and the output their average age as displayed on the screen or directed to a printer or file.
  • The input for an iron cutting machine could be the iron cutting style designed and recorded in the memory of the machine, and the output could be the laser movement so as to cut iron according to the project.


An infinite number of examples of inputs exists. Inputs can be grouped as follows:

  • numeric or alphanumeric input as record (e.g., names, birthrates, ages, census data) (See the previous lesson about record strings and arrays).)
  • graphic analog input (e.g., GIF, BMP, JPEG)
  • graphic numeric input (e.g., drawing programs, cameras)
  • mechanical input (non-electric computers, such as the paper-with-holes input for the textile machine.
  • biochemical input (e.g., the pill that is taken)

With outputs there is also an infinite number of possibilities. For example:

  • numeric or alphanumeric output (e.g., display of children's names on computer screen)
  • graphic analog output (e.g., JPEG picture)
  • graphic numeric output (e.g., CAD screen output of museum plan)
  • mechanical output (e.g., flower picture drawn on iron plate)
  • mind output (e.g., collaborative work)
  • biochemical output (e.g., pill-induced hormone control, destruction of AIDS virus by microscopic AI robots)

0 komentar:

Posting Komentar