Category Archives: Architecture and Organization

High-Level Languages

High-level languages are a major advancement in programming languages. High-level languages are much easier to use than assembly or machine languages, because they are designed to use a more English-like syntax. Some examples of high-level language statements are: (a) total = 1 + 3, and (b) name = “Ken”.

High-level languages promote platform independency, i.e., they can be executed on many different machine types. High-level languages might require the use of a compiler. A compiler is used to convert the high-level language code, into machine language code, that can be understood, and executed by the computer. Some high-level languages might require an interpreter, instead of a compiler. An interpreter “interprets” the high-level programming code, line-by-line, as the code is executed. Interpreted languages are not compiled ahead of time.

Interpreted languages greatly increase platform-independency because the programming code is converted to machine language code on the machine in which the program is executing, instead of being converted to machine language code on the programmer’s computer.

High-level programming languages can either be procedure-oriented or object-oriented.

Procedure-oriented Languages

Procedure-oriented languages concentrate on the major tasks that the program needs to perform. Some examples are: (a) calculating sales tax, (b) totaling and order, and (c) inputting customer data. Procedure-oriented languages must be instructed line-by-line, from the start of the task, until task completion. The programmer decides the order in which the computer processes instructions, i.e., the correct sequence. Some examples of procedure-oriented languages are: (a) COBOL, (b) BASIC, and (c) C.

Object-oriented Languages

Object-oriented languages focus on objects that the program can use to accomplish its goal. These might be real-world objects, for example: (a) an employee timecard, (b) a customer, or (c) an employee paycheck. These objects can be used in more than one program, thereby promoting code reuse, which saves time and money. Some examples of object-oriented programming languages are: (a) C#, (b) Java, and (c) C++. These languages can also be used to create procedure-oriented programs.

Assembly Language

Assembly language is slightly more advanced than machine language, and it simplifies a programmer’s job by implementing the use of mnemonics, instead of 0s and 1s. Mnemonics are memory aids which serve as alphabetic abbreviations for computer instructions. There are a few mnemonics which are common amongst various assembly languages. ADD, and MUL, are a couple examples of common mnemonics. Example assembly statements (ASM) would be: (a) MUL bx, ax; and (b) ADD bx, ax.

A program needs to be written in machine language before a computer can understand it; therefore, all assembly language code must be converted into machine language code before the program can be understood and executed by the machine.

An assembler is a program that is designed to convert assembly language programs into machine language programs. This conversion process turns the mnemonic-based assembly language code into the binary code that is required for execution; therefore, assembly language provides an easier way to write machine language code, as the programmer does not need to work directly with the binary-based machine language.

Assembly language is easier to use than machine language; however, it still requires highly skilled and trained programmers to be used effectively. Like machine language, assembly language is platform dependent. This means that programs generally have to be (at the very least) slightly modified, before they will run on another type of machine.

Control Structures

All computer programs are written in one or more of three basic control (logic) structures. These control structures are: (a) sequence, (b) selection, and (c) repetition. Control structures control a program’s flow of logic.

Sequence Structure

The sequence structure is used in every computer program. This structure instructs the computer to process instructions one-by-one. An example of this type of structure might be: (a) reading a recipe, (b) driving directions, or (c) solving math problems. The processing starts at step one, and follows through, step-by-step, until step N. The steps used to solve problems are called algorithms. The sequence structure can be used inside of the selection structure, or, inside of a repetition structure.

Selection Structure

The selection (decision) structure directs a computer to make a decision based on a specified condition. An example of a selection structure might be: (a) if an order total is less than a customer’s credit limit, authorize the transaction, otherwise, decline the transaction. A selection structure can be used inside of a repetition structure.

Repetition Structure

The repetition structure, sometimes referred to as an iteration, or loop, directs a computer to repeat one or more instructions until a specified condition has been met. An example of a repetition structure might be: (a) read a file line-by-line, until the entire file has been read. The repetition structure can be used inside of a decision structure.

Central Processing Unit

The central processing unit, more commonly referred to as the processor, is the brain behind the computer. There are three primary components that make up the central processing unit (CPU). These components carry out the instructions that allow the computer to function.

Arithmetic Logic Unit

The Arithmetic Logic Unit (ALU) contains all of the electrical circuits that are used to carry out instructions. The processor is capable of executing many different types of instructions, such as addition, subtraction, multiplication, division, exponentiation, logarithms and so on. The processor can carry out logical instructions such as, greater than, less than and equal to.

Registers

Registers are tiny storage components located on the processor. The registers are used to store data that is needed frequently, or quickly. Because registers are located on the processor, they are incredibly fast. Registers are volatile storage, meaning, they are unable to maintain data storage without a power source.

An example usage of registers is the addition of two numbers. Each of the numbers to be added are stored in a register, on the processor. The ALU will pull these numbers out of the registers, add them together, and then store the sum into another register. Data is constantly moving in, and out, of the registers.

Control Unit

The control unit has two primary functions within the processor. Just as its name implies, the control unit is in charge of moving data around inside of the processor. It can pull data out of the registers or move new data into them. It is also able to access program instructions and feed commands into the ALU.

The control unit is also in charge of external data movement between the processor, primary and secondary storage devices, and other I/O devices.

Economics

Registers offer incredible speed. They are faster than primary storage devices, such as Random Access Memory (RAM). The primary reasons why this type of memory is not standard throughout the computer, is because of its cost. This type of storage is extremely expensive, and not practical for general usage; therefore, slower, more economical memory, such as RAM, is normally used for primary storage.

Machine Language

All data in a modern-day computer is represented by microscopic, 2-state switches. These switches can either be on, or off. There are no other existing states for these switches. These switches are called transistors.

When the switch is in the off state, represented by 02, the circuit is open, and there is no power flowing through the switch. When the switch is in the on-state, represented as 12, the circuit is closed, and there is power flowing through the switch.

This process can be roughly equated to basic household light switches. When the light switch is in position 12, the circuit is closed, and the light is operating. When the light switch is in position 02, the circuit is open, and the light is non-operational. Assuming the lack of potentiometers within the circuit, no other state exists within the light switch.

Von Neumann computer technology has not currently advanced to the point where minor power fluctuations within a circuit, can be detected (economically), therefore, von Neumann computers are only able to understand these basic 2-state switches.

This limitation meant that the first stored computer programmers had to write all of the computer’s instructions using a base 2 numbering system, known as binary. Unlike the n10 (base 10) decimal numbering system, the n2 numbering system can only be represented using the digits 0 and 1.

Instructions written using the n2 numbering system are known as Machine Language Instructions. Machine language is a platform-dependent language, i.e., each machine type will have its own machine language set. Machine language is a very important concept, because it is the only way to communicate directly with a stored program computer.