Software
Software is a collection of abstract (intangible) information that represents instructions fora particular collection of hardware to accomplish a specic task. Writing such instructions
relies on knowing the capabilities of the hardware, the specic commands necessary to elicit
those capabilities, and a method of delivering those commands to the hardware.
For example, we know that one of a HDD's capabilities is to store information. If we
wish to write a set of instructions to store information, we must learn the specic commands
required to spin up the platters, locate an empty place to write the information to be stored,
move the read/write arms to the correct location, lower the arm to touch the platter etc.
Finally, we must convey our instructions to the HDD.
Generally, software instructions may be written at three dierent levels:
1. Machine language - not human readable and matches exactly what the CPU expects
in order to elicit a particular capability{think 0's and 1's.
2. Assembly language - human readable representations of CPU instructions. While
assembly language is human readable, its command set, like the CPU's, is primitive.
Even the simplest instructions, like those required to multiply two numbers, can be
quite tedious to write.
Most modern CPU's and/or motherboards have interpreters that translate assembly
language to machine language before feeding instructions to the CPU.
3. High-level language - human readable and usually has a much richer set of com-
mands available (though those commands necessarily can only be combinations of
assembly commands). Translating the high-level language to machine language is too
complicated for the CPU's built in interpreter so a separate piece of software called a
compiler is required. A compiler translates the high-level instructions to assembly or
machine instructions which are then fed to the CPU for execution.
Examples of high-level languages are: C, C++, Fortran, or RobotC to name a few.
A robot is a programmable device that can both sense and change aspects of its envi-
ronment.
No comments:
Post a Comment