Tuesday, March 1, 2011

Project 9 - English Definitions for Basic Computing Terms

 A Rosetta Stone - English Definitions for Basic Computing Terms

The following posting is meant to be a general guide, with references, on many basic computer terms that are often taken for granted by experience programmers. Instead of assuming that we all know what every term means, would it not be nice to have a reference?

A Global Variable is a variable (a place where something is stored, or in some languages, where a reference to something is stored) that is usable no matter where in the program it is being referenced. In general, not the best idea in the world.
Ref:

A Local Variable is a variable that is only used within a subsection of a program. This may be a variable that is only used within an object in an object oriented program like JAVA or C++, or within a subroutine in a procedural language.
Ref:

Elementary Data Types describe catagories, or a classification for how data can be stored within a variable. Data is stored in a variable, in most languages, based on the qualities of the information the variable represents.
A Character (Char) is a single Unicode (an industry standard for depicting alphabet characters from many languages) character
A String is a collection of Unicode characters in variable lengths (to be...or not to be...for example).
An Integer is a whole number with either a positive or negative value, defined within a range corresponding with the programming language and computer hardware's ability to process (64 bit addressing allows for a much larger Integer range, for example).
A Floating data type is a number that may have a certain number of decimal places (3.14159265).
A Boolean data type is a test of true or false, represented as a 1 or a 0.
Ref:

A Persistent Data Identifier, or Data Identifier, is an identifying  variable that describes a unique location of data objects in a set of data stores.

A Data Type and its associated Memory Address are two critical elements that an application needs in order to reference a variable and manipulate it. The Data Type (char, int, bool, float, etc.) is important to allow an application to follow the correct set of rules on how the data can be manipulated, and the Memory Address is the physical location in the computer's memory that the application references to store and retrieve a value related to a variable. The Actual Data is stored in memory locations as raw binary data with a record length that is determined by the Data Type.


A Variable is an element in an application that is used to store something, whether it is a number, string of characters, or other data. The format of what is stored in the variable is determined by its data type.

A Literal is like a variable that is swallowing its own tail. A Literal has a value that is the same as the name of the literal, for example, having a variable "C" where the character "C" is stored. A contestant is an unchanging entity, whose value does not change at any point as the program is executed.

Most of us are only familiar with a Base 10 number system, because we evolved ten fingers to count on, making it the most common Number Base System. The most natural language for an electronic system is binary, or Base 2. A Binary number system, in its simpliest form is either an off-state, represented by a zero, or an on-state represented by a one. An intermediary number system that is easily translated into binary, yet has the compact representation of Base 10 (decimal number system) is the Base 16 number system (hexadecimal). This system is represented with number 0-9 and then A-F, giving 16 variations for each placeholder in the hexadecimal numbering system.


A short and sweet description of Floating Point data would be a number that a computer calculates and represents with a given number of decimal places. There are many standards for how Floating Point data is calculated, the most popular recent method is the Institute of Electrical and Electronics Engineers (IEEE) Standard for Floating-Point Arithmetic (IEEE 754).


Closely related is the idea of the Decimal Data Representation (or Type), which stores and represents up to 38 digits of definition.


Direct Addressing is a method of locating and placing data in memory, called the memory address. In this method, the specified name for a Direct Addressing memory location matches the location that the computer processor recognizes. In other words, a location such as "LDAA $1234" would match the memory address of $1234.

In a Relative Addressing scheme, memory locations are described by a program as being relative to a fixed memory location, giving the processor the freedom to place the actual data in a specified range that is in relation to a fixed memory address.
           

Because a computer cannot divine the intent of the programmer or user, when we store data in a location in the computer's memory, we must declare what flavor of data this is. To the computer, at a low level, all numbers, letters, words, and phrases simply look like streams of 1's and 0's. To assist the beleaguered computer, we need to declare Data Types, allowing it to know that "1138" is part of the title of a 1971 George Lucas movie and not just a number. This process of representing different memory locations as numbers, strings, or Boolean is called Data Abstraction, meaning that the real value of a number is differentiated from the underlying binary values.

In different memory locations, data can be organized as an individual record, which is a portion of a file. A file is a collection of data that has had a specific name applied to it, identifying it. An array, often called a Single-Dimension Array, is a sequence of values that is stored in a defined sequence. A Multi-Dimensional Array is just a complex type of array that allows matrix manipulations of data.

Computer languages are one of the first, concrete examples of an Artificial Language, meaning that did not arise from an organic source (one that comes from a historic linguistic lineage, like those of the Indo-European language family tree) that is used on a daily basis outside of linguistics research (and no, Klingon doesn't count). Organic, historic sources of language, developed by people in all cultures to communicate with each other, is called Natural Language. Computer languages are artificial languages, with their own Syntax and Semitics, which are the elements and rules by which anyone who understands them can understand the meaning of a language.


Some of the hallmarks of a computer language are Input and Output Statements, which tell a computer system where it is gettting data (typing "hello world" on the keyboard, and where the data is being sent (printing "hello world" on the computer screen). Assignment Statements are used by a computer program to define the vocabulary of a specific program, by assigning values of some type to variables being used.

A good way of documenting a programming language is through the use of Program Design Language (PDL), which essentially is a method of reflecting high level programming language using plain English. PDL provides a road map of a complex program through the use of Syntax Diagrams, which shows the progression of logic in an application being developed. BNF is the system within PDL that is used to represent the mathematics and logic of a program.

Most all higher level programming languages share some basic grammatical elements. These common shared traits are called Elementary Language Statements, or Structured Language Statements. Assignment Statements take the result of a calculation, and put it into a variable. Unconditional Statements assign values without using any logic statements.

Selection Statements create branches in logic where, depending on the answer obtained from an input, there are a fixed number of paths that a program can take. A Looping Statement will repeat an action a given number of times, repeating the same action until the repetition cycle is complete.

What are computers best at? The answer is Expression Components, a $5 computer science term for doing math and logic. In a logic or math expression, the element that is defining the work done to a set of numbers or variables is the Operator (/*-+, etc.), and the numbers that the Operator is manipulating is the Operand. A Unary Expression is one with a single operand affecting a number or variable, whereas a Binary Expression has multiple operands. Arithmetic Statements are the basic math methods we learned in grade school: addition, subtraction, multiplication, and division. Logical Expressions are much more interesting tests of the truth or lies of relationships between numbers (true, false, or, xor, and, xand, etc.). There are Unconditional Logic statements, which are Non-Boolean statements, meaning that the answer is more than a simple true/false answer (a numeric result, for instance). Conditional Statements compare two variables or number sets, and provide a logical reference based on their condition. A natural language example would be: are black and the absence of light the same? True!

No comments:

Post a Comment