Basic I/O

From Wikiversity

Jump to: navigation, search

[edit] Introduction to Advanced Level of Computer Science:

If you arrived at this level of the lessons, you may consider yourself a novice computer engineer.

The reason is because you now have a basic knowledge of the computer as hardware, a beginner level of algorithms and beginner level of programming.

Now you will be confronted more and more in making a choice on your studies.

Getting an advanced level on hardware, on the theory of computer science, or getting more into the programming side.

This lesson will guide you on this choice. But whatever the choice is, you must have a general knowledge of computer science. Because whatever the expertise you choose, you will be confronted with the problems from other parts of computer science. For example lets consider you choose to be a programmer. You must have knowledge of hardware, so as to be able to program for specific instances in hardware to resolve bugs.

[edit] What About Input Output

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[1] of Bertalanffyw:en:Ludwig_von_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 todays 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.

[edit] Machine Input Output

1 and 0 are the main aspects of machine level input output. 1 means there is an electrical signal (or there is electricity) and 0 means there is no electrical signal (or there is no electricity). On this level you get more into the electronic level of the computer. I recommend to study electronics to get further expertise on this level.

The AC or DC electricity that feeds the computer is the first input of the computer. Then comes the printer, the screen, the audio/video (not in that order of course). These are some classical outputs that we know. But there are also other computers that are incorporated in cars, in working machines, in washing machines, in cellular phones, on stone cutting machines with laser output etc. When we consider the mother of today's computer: it was working without electricity, and it was a textile machine that had been converted to a machine that gets an input as paper with special holes combined with a special system. So as when you make this input into this textile machine, it could make a calculation and give you the result of this calculation as output.

But the I/O of the machine is not limited to the whole computer. There is also input output on each part of the computer. A hard disk gets input as an electronic signal. RAM also gets input as an electronic signal and output as an electronic signal. A chip is also getting an electronic signal and output as another electronic signal.

So as you can see here you can get smaller and study more and more of these electrical signals as input and output.

To analyze these electronic signals you must learn Boolean logic, and logic calculation in mathematics. Also, algorithms are related to input and output on electronics.

[edit] 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 input and output.

  • remark type of inputs: no action and no calculation by the computer is done here
  • declaring type of inputs: these inputs are preliminary to a calculation. You say here to the computer "Get ready!"
  • conditional inputs: the computer is confronted with a choice. This is post preliminary input
  • variable inputs: the computer is starting to use a variable, the variable has a first value of null and can get a value on the secondary level.
  • calculation inputs: 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.
- Finally the output as an electronic level: all calculations are electrical signals. So the result 
is at first coded as an electronic signals combination - output as "input" in the RAM - Binary output = electronic signal is converted in binary: 1 means there is electricity and 0 means
there is no electricity. The combination of these two are converted into 8 or 16 bit values,
which means 8 times 0 or 1. For example: 00000000, 11111111, or 10101000, etc.
- The output as machine language = the 8 or 16 bit value converted into machine language
- the output converted to coder language = here the result is in the memory according to the 
programming language used by the coder. Here I suppose the program is using
machine language and translates it into the programming language of the coder.

On the next level we will see the output on the user level.

[edit] Input Output on End User Level

Here electricity becomes a letter on the screen, or the move of the arm of a robot, or a laser shot, or a car engine start.

You must consider here that we use computers not only as personal computers but also in our cellular phones, in our televisions, robots, various children's toys, trains, airplanes, warheads, missiles, et cetera. Almost everything is a computer.

Maybe a fun example comparing to a personal computer will be the simple kitchen robots with many sorts of knives to cut and get juice out of vegetables and fruits.

The input in a kitchen robot is the fruit, and the output is the fruit juice.

In a personal computer of the end user, the input may be the age of children in a school in Istanbul, Turkey, and the output may be the average age of these children as displayed on the screen or directed elsewhere (e.g. printer, file on hard disk).

The input on an iron cutting machine will be the iron cutting style designed and recorded in the memory of the machine, and the output will be the laser movement so as to cut iron according to the project.

The examples here are infinite. We can group inputs here as follows:

  • numeric or alphanumeric input as record (see previous lesson about record strings and arrays).
    Examples: entry of names, entry of birthrates, entry of age, of number of children etc.
  • graphic analog input example: GIF, BMP, JPEG
  • graphic numeric input example: Drawing Programs, Cameras
  • mechanical input. This is for non-electrical computers: the paper with holes input
    in a textile machine.
  • biochemical input: This is the input done by taking a pill, or DNA changes, etc.
  • mind input: So far the human brain is the most complex input/output device in existence on this world.

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

  • numeric or alphanumeric output: example : display on PC screen of the list of children's names
    in Istanbul, Turkey
  • graphic analog output: example: JPEG picture
  • graphic numeric output: example: CAD screen output of museum plan
  • mechanical output: example: flower picture drawn on Iron plate
  • biochemical output: example: hormone control operated by pills, AIDS virus being destroyed by
    microscopic artificial intelligence micro robots in human veins
    (this project is still in research status, its appliance is limited to animals)
  • mind output: example: this collaborative work

Note:Modified significant portions. Removed Opinionated statements without references, removed references to specific programs that were not relevant.

[edit] Last Words About I/O

Input/output can be electric or non-electric signals. It can be mechanical, biological or even abstract. The reason is simply because the computer was first created when there was no electricity, and also because the computer use is now extended in so many areas that it is difficult to say input/output is just about computers.

A computer scientist is not limited to electrical and electronic devices.

Note:Chopped off more unreferenced opinions and philosophical speak.