Lesson-1-Introduction-to-Computer-Organization
Lesson-1-Introduction-to-Computer-Organization
COMPUTERS AND
PROGRAMMING
CPEN21A PROGRAMMIN G LOGIC AN D DESIGN
INTRODUCTION
• A program is a set of instructions that a computer follows to perform a task.
• Programs are commonly referred to as software.
• Software is essential to a computer because without software, a computer can
do nothing.
• A programmer, or software developer, is a person with the training and skills
necessary to design, create, and test computer programs.
HARDWARE
• The term hardware refers to all of the physical devices, or components, that a
computer is made of.
• A computer is not one single device, but a system of devices that all work
together.
• A typical computer system consists of the following major components:
• The central processing unit (CPU)
• Main memory
• Secondary storage devices
• Input devices
• Output devices
CPU
• The central processing unit, or CPU, is the part of a computer that actually runs
programs.
• The CPU is the most important component in a computer because without it, the
computer could not run software.
• In the earliest computers, CPUs were huge devices made of electrical and mechanical
components such as vacuum tubes and switches.
• The most important of these coding schemes is ASCII, which stands for the American
Standard Code for Information Interchange.
• ASCII is a set of 128 numeric codes that represent the English letters, various
punctuation marks, and other characters.
• Unicode is an extensive encoding scheme that is compatible with ASCII, and can also
represent the characters of many of the world’s languages.
ASCII CODE TABLE
HOW A PROGRAM WORKS
• A computer’s CPU can only understand instructions that are written in machine
language. But people find it very difficult to write entire programs in machine language,
programming languages have been invented.
• CPU is the most important component in a computer because it is the part of the
computer that runs programs. (CPU is called “computer’s brain” and described as being
smart)
• CPU performs simple operations on pieces of data.
• A program is nothing more than a list of instructions that cause the CPU to perform
operations.
• The entire set of instructions that a CPU can execute is known as the CPU’s instruction
set.
HOW A PROGRAM WORKS
•
FETCH-DECODE-EXECUTE CYCLE
1. Fetch or read instruction in the program
from memory into the CPU.
2. Decode the instruction to determine which
operation to perform.
• 3. Execute or perform the operation.
FROM MACHINE TO ASSEMBLY
LANGUAGE
• Although a computer’s CPU only understands machine language, it is impractical for
people to write programs in machine language.
• Assembly language was created in the early days of computing as an alternative to
machine language.
• Assembly language uses short words that are known as mnemonics.
• A special program known as an assembler is used to translate an assembly language
program to a machine language program.
HIGH-LEVEL LANGUAGES
• Assembly language is so close in nature to machine language, it is referred to as a low-
level language.
• A high-level language allows you to create powerful and complex programs without
knowing how the CPU works, and without writing large numbers of low-level
instructions.
• Programming Languages:
Ada C#
BASIC Java
FORTRAN Java Script
COBOL Python
Pascal Ruby
C and C++ Visual Basic
COMPILER VS. INTERPRETER VS.
ASSEMBLER
COMPILER INTERPRETER ASSEMBLER
SOFTWARE
• Programs generally fall into one of two categories:
System software control or enhance the operation of a computer.
Application software makes a computer useful for everyday tasks
SYSTEM SOFTWARE
• System software typically includes the following types of programs:
Operating System controls internal operations of the computer’s hardware, manages all
devices connected to the computer, allows data to be saved to and retrieved from storage
devices, and allows other program to run on the computer. (i.e. Windows, IOS, Mac OS, Linux)
Utiliy Programs performs a specialized task that enhances the computer’s operation or
safeguards data. (i.e. virus scanners, file compression programs and data back-up)
Software Development Tools are the programs that programmers use to create, modify, and
test software. (i.e. assemblers, compilers, and intepreters)