You are on page 1of 7

INTRODUCTORY CONCEPTS OF PROGRAMMING

COMPUTER SYSTEMS

Computer

- It is an electronic device that stores and processes data.


- Include both hardware and software.
- Programmable machine designed to receive input, follow instructions, produce output.
 Hardware – Physical aspect of the computer that can seen.
 Software – Invisible instructions that control the hardware and make it perform specific tasks.

Program

- An instructions written in a special language and stored in computer memory to make it


accomplish a task.

Programmer

- A person who writes instructions (programs) to make a computer perform a task.

Programming Language

- a language used to write programs.

Types of languages:

 Low-level: used for communication with computer hardware directly - Machine language, Assembly
language - machine specific
 High-level: closer to human language, English-like

Well known high-level languages

C, C++, C#, Java, JavaScript, Python, Ruby, Visual Basic Kotlin, PHP, Rust....

Consists of following major hardware components:

 Central Processing Unit (CPU)


 Memory (main memory)
 Storage Devices (disks, CDs, tapes)
 Input Devices
 Output Devices

Main Hardware Component Categories

Input Devices - Used to send information to the computer from outside.

 Keyboard  Scanner  Optical Character


 Mouse  Graphic Tablet Reader(OCR)
 Bar Code Reader
 Joy Stick  Microphone
 Optical Mark
 Light pen  Magnetic Ink Card
Reader(MICR) Reader(OMR)
 Track Ball
Output Devices - Used to send information from the computer to the outside.

 Monitor  Headphones
 Printer  Computer Speakers
 Projector  Sound Card
 GPS
 Video Card  Speech-Generating Device
 Braille Reader

Central Processing Unit


- essentially the brain of a CAD system.
Includes:
Control Unit

- Retrieves & decodes program instructions.


- Coordinates computer operations.

Arithmetic & Logic Unit (ALU)

- Performs mathematical operations & comparisons

Where are instructions & data stored?

- Registers

Main Memory

- Holds both program instructions & data

Volatile - erased when power is removed or computer turned off Also called Random Access Memory (RAM) or
Memory.

Main Memory Organization

Bit

 Smallest piece of Byte Word


memory.
 Stands for binary digit  8 consecutive bits.  Usually consecutive
 Addressable. bytes.
 Has values 0 (off) or 1
 Has an address.
(on) .

Secondary Storage

Non-volatile

- data retained when program is not running, or computer is turned off Comes in variety of media:
 optical: CD or DVD drive
 flash: USB flash drive
 magnetic: floppy & hard disk drive, internal or external.
Software

 Operating System - programs that manage the computer hardware and the programs that run on them.

e.g. Windows, UNIX, Linux-based, Mac, Android

 Application software - programs that provide services to the used.

e.g. word processing, games, programs to solve specific problems.

Basic steps in Problem Solving

1. Problem Definition
- Before a program can be designed to solve a problem, the problem must be well and clearly
defined.
- Clearly defined problem is already a half the solution.
- Computer programming requires the problem to be defined first before creating a solution.

2. Problem Analysis
- After the problem has been adequately defined, the simplest and most efficient and effective
approach to solve the problem must be formulated.
- This step involves breaking up the problem into smaller and simpler subproblems.

3. Algorithm design and representation


- May be expressed in either human language, or through a graphical representation like a
flowchart or through a pseudocode.
 Algorithm
- a clear and unambiguous specification of the steps needed to solve a problem.
- a procedure for solving a problem in terms of the actions to be executed and the order in which
those actions are to be executed.

Three Basic Structures:

1. Sequential – the most straight forward.


2. Selection – Let your program or algorithm make a decision.
3. Iteration or Loop – We use when we want our algorithm or program to repeat a process a specified
number of times. That repeats an instruction or a set until a condition is met.
 Pseudocode

a cross between human language and a programming language.

4. Pseudocode or flowcharting
 Flowchart
- It is a design tool used to graphically represent the logic in a solution .
- typically do not display programming language comments They state the concept in English or
mathematical notation.

Two types of Flowchart:

1. System (data) flowcharts – defined the major phases of the processing, as well as the various data
media used.
2. Programming flowchart – constructed by the programmer to represent the sequence of operations the
computer perform to solve a specific problem.
- It graphically describes what is to take place in the program.
5. Coding and Debugging
- to run your code step by step in a debugging tool like Visual Studio or CodeBlock, to find the

exact point where you made a programming mistakes.

You might also like