Computer and Computer Programming Basics

Two terms often used when talking about Computers are Hardware and Software. Hardware is the equipment or machinery associated with a computer. The subject of this course is software. Software refers to the data and instructions used to generate information.

 

Information Processing Cycle


Software or Programs can be divide into two categories.  System software and Application software. Windows is an example of system software. Word is an example of application software. All software is written by programmers.

Programming in Information Systems

Off-the-Shelf software

In-house or customized development

    Systems Development

        System Analysis & Design

        Implementation includes (among other things)

                Programming- Programmers write programs

                Testing and debugging


What a Computer Can Do

Accept data via input device

Store Data in Memory

    Variables

Perform Arithmetic operations (add, subtract, multiply, divide) on data

Compare data to other data

Determine if one value is less than, greater than, or equal to another value

Output Results via output device


Programs and Programming

Logic / Algorithm - Step-by-step instructions

Structured Programming


Programming Languages - Programmers write programs using a programming language best suited for the application they are creating.

Machine Language - the only language the computer really understands. No one really write in machine language. Instead an assembler, compiler, or interpreter converts the instructions written by the programmer, (the source code) into machine language.

   

Low-Level Language - closest to machine language

Assembly Language

Assemble example
               

High-Level Languages - closer to English

 Cobol Language

Cobol Example
               


 C


               C example

C++

    C++ example           
         

Java

class TestDo

{ public static void main (String[] args)

{     int data;

int sum = 0;

do

{ data = MyInput.readInt();

sum += data;

} while (data != 0);

System.out.println("The sum is "+sum);

}

}

Fortran


             Fortran example 
        

Perl

Perl example
         

RPG
               RPG example

 
        Visual Basic

Fourth-Generation Language - Intended for programmer as well as non-programmer use.

      SQL

                   SQL example


    

FOCUS


           Focus example

 


Translating Source Code (instructions written in a computer language) to Machine Code

    Assembler    Assembly languages are assembled.

    Compile

Checks all instructions in a high-level program for syntax errors, if any error is found a list of detected errors is produced. If no errors are found the entire program is translated into machine code and stored in machine language ready for execution. 

Interpreter 

Checks instructions in a high-level program for syntax errors one line at a time. If no error is found the instruction is translated into machine code then executed and the interpreter moves on to the next line in sequence. 

Procedural Language

Event-Driven Programming Language

Object-Oriented Language