Click to like/follow us on:
A computer uses an input operation to collect data from a data source and stores the data in a specified memory location (i.e. the destination).
This means that for a computer to perform an input operation, the computer needs to know:

  1. The source of the data. (Where will the data come from or located?).
  2. The destination of the data. (Where is the data going or to be kept/stored?).

The source of the data is often, but not always the keyboard, it can also be from a camera or even another computer, etc. Whenever an input operation is written with no explicit mention of the data source device, the CPU assumes that the device specified is the keyboard. This makes the keyboard a default input device.

The destination of the data is the memory location within or outside the computer, the data can be stored or sent for temporary or permanent purpose. The destination of the data is handled by the Output Operation. This will be discussed in the Output Operation.
The words/verbs that are commonly used to specify an input operation or instruction are: accept, get, read, input, collect, request etc. In other to specify an input operation, one can write:

   i. request Name
  
ii. get Name
  
iii. collect Name

Each of the input operations above required that data should be extracted from a data source, here the keyboard, - Why? You are correct! Since the source is not specified the keyboard becomes the input device, - and be stored in a memory location named Name. The word "Name" is called variable. it is a portion in a memory within or outside the computer that is mapped out and called Name.

A variable is something that changes. Therefore, Philip may be stored/kept in a location called Name, at another time, Joseph may occupy (or be kept in) the same location and have the name Philip erased automatically or in a special case, the memory location can still hold the two names. when this the case the location of the memory will change from Philip to Philip, Joseph.

It now follows that when there are many/several data to be extracted from a source, any of the above verbs can still be used but the data to be extracted has to be separated with commas, thus:

  1. get Name, Age
  2. get Name, Age, Height

In one (1) above the first data/value that will be collected will be stored in the variable called or named "Name" and the second value will be stored in the second variable "Age".
In Two (2) above, the data/value will be collected and be stored in the three variables respectively. The figure below illustrates this action better.

image

Before the input operation was issued the memory was empty and contains no data. Notice that the three segments/ locations being named before the input operation. The input operation above tells the computer to map out or create a memory locations where Name, Age and Height of any thing, in this case human, will be store(kept.

As the computer receives the input instruction, input, it immediately go to the memory and map out locations or portions and gave them names as contain in the input instruction. In this case the names are: Name, Age, and Height. this names are called variable that is they can hold any name, age and height of a human respectively.

The user of the computer supplied Philip, 19, and 66 the computer takes these values store them in the variables Name, Age and Height respectively.
If there is a name that is already stored this memory and the input operation is:

input Name

Since in the memory there is a location with same name (that is the variable Name is in existence in the memory, therefore locations in a memory can not have the same name, but should be unique) computer will erase whatever that is stored in the the variable Name and replace it with the current value. This is illustrated in the diagram below.

image

And because of the erasure, we say that input operation destructive operation except in a special case as explained above.

Example:
1. input number1, number2
2. input number2

Where number1 and number2 are names of a memory locations within a memory. In the first example if a user supplied to the computer the following numbers: 2, 5. The computer stores them in the following memory locations: number1, number2 respectively, i.e
number1 = 2 and number2 = 5.
Perhaps the diagram below can make you understand better.

image
And now it is your turn:
If in the second example the computer encounters the second input instruction and the user supplied 15, what will happen? What value that will be stored in the memory location specified?. Give reasons to backup your answer.
number2 = ?
image
For your answer make use of the comment box below!

Previous: Basic Computer/Algorithm/Programme Operations   |   Next: Basic Computer Output & Arithmentic Operations
SHARE THIS POST WITH YOUR FRIENDS...::

2 comments:

  1. Thanks For sharing!!!

    Buy Microsoft Visio Professional 2019 Product Key & Retail Key at edigitalcodes cheap price, Buy visio Professional 2019 key, Buy sql server 2019 Key, buy server 2019 standard key, buy windows 10 product key india, Buy windows 10 pro key, Buy windows 10 pro product key



    Buy Windows 10 Product Key India


    buy visio professional 2019 key,Buy Microsoft Visio 2019 Professional 1PC Activation Key,Buy Microsoft Visio Professional 2019 Product


    sql server 2019 standard product key, Microsoft SQL Server 2019 Standard Key, buy sql server 2019 key, buy server 2019 standard key

    Buy Microsoft Visio Professional 2019

    ReplyDelete
  2. Excellent value for the money! The Buy Visio Professional 2019 1pc Key by Keys-Shop right away, and it activated without any problems. I'm really happy with what I bought.

    ReplyDelete

All Posts

Access all posts here!

Categories

Unordered List

Sample Text

Lists of Jobs in the United States

List of Courses & Outlines For UNN Students

Popular Posts

Like us on Facebook

Recent Posts

    Text Widget