This document provides an overview of computer hardware, software, data storage, and the programming process. It discusses how computers work by accepting data as input, processing it, and producing output based on instructions from programs. The major hardware components are the CPU, memory, storage devices, and input/output mechanisms. Software includes operating systems and applications. Data is stored in computers as binary digits or bits that represent numbers and other information. The programming process involves understanding problems, planning logic, coding, testing, and implementation.
2. A computer is a machine or device that performs processes,
calculations and operations based on instructions provided by a
software or hardware program. It has the ability to accept data
(input), process it, and then produce outputs.
Computers can do such a wide variety of things because they
can be programmed. This means that computers are not
designed to do just one job, but to do any job that their
programs tell them to do. A program is a set of instructions that
a computer follows to perform a task.
For example, Microsoft Word and PowerPoint
INTRODUCTION
3. • The two major components of any computer system are its
hardware and its software
• Hardware is the equipment, or the devices, associated with a
computer
Component of a Computer System
• The central processing unit (CPU)
• Main memory
• Secondary storage devices
• Input devices
• Output devices
HARDWARE
5. When a computer is performing the tasks that a program tells it to
do, we say that the computer is running or executing the program.
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.
THE CPU
6. You can think of main memory as the computer’s work area. This is
where the computer stores a program while the program is
running, as well as the data that the program is working with. For
example, suppose you are using a word processing program to
write an essay for one of your classes. While you do this, both the
word processing program and the essay are stored in main
memory.
Main memory is commonly known as random-access memory, or
RAM. It is called this because the CPU is able to quickly access data
stored at any random location in 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.
MAIN MEMORY
7. 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. Important data,
such as word processing documents, payroll data, and inventory
records, is saved to secondary storage
as well.
SECONDARY STORAGE DEVICE
8. 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. Disk drives and optical drives can
also be considered input devices because programs and data are
retrieved from them and loaded into the computer’s memory.
INPUT DEVICES
9. Output is any data the computer produces for people or for other
devices. It might be a sales report, a list of names, or a graphic
image. The data is sent to an output device, which formats and
presents it. Common output devices are video displays and
printers.
Disk drives and CD recorders can also be considered output devices
because the system sends data to them in order to be saved.
OUTPUT DEVICES
10. The instructions that tell the computer what to do are called
software, or programs, and are written by programmers.
Programs generally fall into one of two categories:
System software is the set of programs that control or enhance the
operation of a computer. Example. Operating System (Windows,
iOS, Mac OS, Linux)
Application software makes a computer useful for everyday tasks
(Microsoft offices, Game program, email programs, Web browser,
Payroll system).
SOFTWARE
11. • 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
Think of a byte as eight switch:
HOW COMPUTERS STORES DATA
13. In computer systems, a bit that is turned off represents the
number 0 and a bit that is turned on represents the number 1. This
corresponds perfectly to the binary numbering system. In the
binary numbering system (or binary, as it is usually called) all
numeric values are written as sequences of 0s and 1s. Here is an
example of a number that is written in binary:
10011101
STORING NUMBERS
14. A programmer’s job involves writing instructions, and can be
broken down into six programming steps:
• Understand the problem
• Plan the logic
• Code the program
• Translate the program into machine language
• Test the program
• Put the program into production
STEPS INVOLVED IN THE PROGRAMMING PROCESS
15. • Professional computer programmers write programs to satisfy
the needs of others
• Because programmers are providing a service to these users,
programmers must first understand what it is the users want
UNDERSTAND THE PROBLEM
16. PLAN THE LOGIC
• The heart of the programming process lies in planning the
program’s logic
• During this phase of the programming process, the programmer
plans the steps to the program, deciding what steps to include and
how to order them
• The programmer doesn’t worry about the syntax of any particular
language at this point, just about figuring out what sequence of
events will lead from the available input to the desired output
17. CODE THE PROGRAM
• Some very experienced programmers can successfully combine the
logic planning and the actual instruction writing, or coding of the
program, in one step
• This may work for planning and writing a very simple program, just
as you can plan and write a postcard to a friend using one step
• The planning step is actually more difficult than the spelling and
grammar rules you must learn
18. Languages like Java or Visual Basic are available for programmers
to use because someone has written a translator program (a
compiler or interpreter) that changes the English-like high-level
language in which the programmer writes into the low-level
machine language that the computer understands
TRANSLATE THE PROGRAM FROM MACHINE LANGUAGE
19. • A program that is free of syntax errors is not necessarily free of
logical errors
• Once a program is free from syntax errors, the programmer can
test it—that is, execute it with some sample data to see
whether or not the results are logically correct
• Programs should be tested with many sets of data
• Selecting test data is somewhat of an art in itself, and it should
be done carefully
TEST THE PROGRAM
20. • Once the program is tested adequately, it is ready for the
organization to use
• However, the process might take months if the program will be
run on a regular basis, or if it is one of a large system of
programs being developed
• Conversion, the entire set of actions an organization must take
to switch over to using a new program or set of programs, can
sometimes take months or years to accomplish
PUT THE PROGRAM INTO PRODUCTION
21. 1. Use what you’ve learned about the binary numbering system in
this chapter to convert the following decimal numbers to binary:
11
65
100
255
2. Use what you’ve learned about the binary numbering system in
this chapter to convert the following binary numbers to decimal:
1101
1000
101011
EXERCISES