0% found this document useful (0 votes)
8 views

Lesson-1-Introduction-to-Computer-Organization

The document provides an introduction to computers and programming, explaining the roles of hardware and software, including the CPU, main memory, and secondary storage devices. It discusses how data is stored and processed in binary form, the importance of programming languages, and the distinction between system software and application software. Additionally, it covers the fetch-decode-execute cycle and the use of compilers, interpreters, and assemblers in programming.

Uploaded by

cai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Lesson-1-Introduction-to-Computer-Organization

The document provides an introduction to computers and programming, explaining the roles of hardware and software, including the CPU, main memory, and secondary storage devices. It discusses how data is stored and processed in binary form, the importance of programming languages, and the distinction between system software and application software. Additionally, it covers the fetch-decode-execute cycle and the use of compilers, interpreters, and assemblers in programming.

Uploaded by

cai
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 22

INTRODUCTION TO

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 ENIAC, considered by many to be the world’s first


programmable electronic computer. This machine, which was
primarily one big CPU, was 8 feet tall, 100 feet long, and
weighed 30 tons.
CPU
• Today, CPUs are small chips known as microprocessors.

Smaller than the old electro-mechanical CPUs in early


computers; microprocessors are also much more
powerful
MAIN MEMORY
• Main memory is where the computer stores a program while the program is running,
as well as the data that the program is working with.
• Main memory is commonly known as random-access memory, or RAM.
• RAM is usually a volatile type of memory that is used only for temporary storage while
a program is running.
• When the computer is turned off, the contents of RAM are erased.

Memory Chips (RAM)


SECONDARY STORAGE DEVICES
• Secondary storage is a type of memory that can hold data for long periods of time,
even when there is no power to the computer.
• Programs are normally stored in secondary memory and loaded into main memory as
needed.
• The most common type of secondary storage device is the disk drive.
• A disk drive stores data by magnetically encoding it onto a circular disk.
• External disk drives can be used to create backup copies of important data or to move
data to another computer.
• A floppy disk drive records data onto a small floppy disk, which can be removed from
the drive.
• Floppy disks hold only a small amount of data, are slow to access data, and are
sometimes unreliable.
SECONDARY STORAGE DEVICES
• USB drives are small devices that plug into the computer’s USB (universal serial bus)
port, and appear to the system as a disk drive.
• They store data in a special type of memory known as flash memory.
• USB drives, which are also known as memory sticks and flash drives, are inexpensive,
reliable, and small enough to be carried in your pocket.
• Optical devices such as the CD (compact disc) and the DVD (digital versatile disc) are
also popular for data storage.
• CD and DVD drives use a laser to detect the pits on disc surface and thus read the
encoded data.
• Optical discs hold large amounts of data, and because recordable CD and DVD drives
are now commonplace, they are good mediums for creating backup copies of data.
INPUT DEVICES
• Input is any data the computer collects from people and from other devices.
• The component that collects the data and sends it to the computer is called an input
device.
• Common input devices are the keyboard, mouse, scanner, microphone, and digital
camera.
OUTPUT DEVICES
• Output is any data the computer produces for people or for other devices.
• The data is sent to an output device,which formats and presents it.
• Common output devices are video displays and printers.
HOW COMPUTER STORE DATA
• All data that is stored in a computer is converted to sequences of 0s and 1s.
• A computer’s memory is divided into tiny storage locations known as bytes.
• Each byte is divided into eight smaller storage locations known as bits.
• The term bit stands for binary digit.
STORING NUMBERS
• A bit that is turned off represents the number 0 and a bit that is turned on represents
the number 1.
• The position of each digit in a binary number has a value assigned to it.

The values of binary digits as powers of 2 The values of binary digits


STORING CHARACTERS
• Any piece of data that is stored in a computer’s memory must be stored as a binary
number That includes characters, such as letters and punctuation marks.
• When a character is stored in memory, it is first converted to a numeric code then
numeric code is then stored in memory as a binary number.

• 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)

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy