Upgrade to remove ads
Chapter 1 Introduction to Computers and Programming
Terms in this set (49)
is a set of instructions that a computer follows to perform a task
referred to as software
A typical computer
system consists of the following
1. The central processing unit (CPU)
2. Main memory (random-access memory, or RAM)
3. Secondary storage devices
4. Input devices
5. Output devices
The central processing unit, or CPU
is the part of a computer that actually runs programs.
the central processing unit consists of two parts:
the control unit
the arithmetic and logic unit (ALU).
The control unit
coordinates all of the computer's operations.
determining where to get the next instruction and regulating the other major
components of the computer with control signals.
the arithmetic and logic unit
designed to perform mathematical operations.
The steps in the fetch/decode/execute cycle are as follows:
The CPU's control unit fetches, from main memory, the next instruction in the
sequence of program instructions.
The instruction is encoded in the form of a number. The control unit decodes
the instruction and generates an electronic signal.
The signal is routed to the appropriate component of the computer (such as
the ALU, a disk drive, or some other device). The signal causes the component to perform an operation.
is a sequence of instructions stored in the computer's memory.
When a computer is running a program, the CPU is engaged in a process known formally as the
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
A computer's memory is divided into tiny storage cells known as bytes.
One byte is enough
memory to store just a single letter of the alphabet or a small number.
Each byte is divided into eight smaller storage locations known as bits.
Each byte is assigned a unique number known as an address.
The addresses are ordered from
lowest to highest.
The term bit stands
for binary digit.
bits are tiny electrical components that can hold either a positive
or a negative charge.
type of memory that can hold data for long periods of time even when
there is no power to the computer.
The most common type of secondary storage device is the disk drive
Input is any information the computer collects from the outside world.
input devices are the keyboard, mouse, scanner, digital camera, and microphone.
Output is any information the computer sends to the outside world.
The information is sent to an output device, which formats
and presents it. Common output devices are computer screens, printers, and speakers
The programs that control and manage the basic operations of a computer
the most fundamental set of programs on a computer.
performs a specialized task that enhances the computer's operation
or safeguards data.
Software Development Tools
tools that programmers use to create, modify, and test software
Programs that make a computer useful for everyday tasks
a set of instructions a computer follows in order to perform a task.
A programming language
is a special language used to write computer programs.
is a set of well-defined
steps for performing a task or solving a problem.
two categories of programming languages
low-level and high-level
low-level language is close to the level of the computer, which means it resembles
the numeric machine language of the computer more than the natural language of humans.
high-level is closer to the level of human-readability than computer-readability.
source code/source file
The statements written by the programmer/the file they are saved in
After the source code is saved to a file, the process of translating it to machine language can begin.
During the first phase of this process, a program called the preprocessor reads
the source code.
illegal uses of key words, operators, punctuation, and other
object code/object file.
If the program is free of syntax errors, the compiler stores the translated machine language instructions, which are called object code, in an object file.
During the last phase of the
translation process, another program called the linker combines the object file with the necessary library routines.
Once the linker has finished with this step, an executable file
Intergrated development environment (IDEs)
Environments consist of a text editor, complier, debugger, and other utilities intergrated into a package with a single set of menus.
What is a program made of?
There are certain elements that are common to all programming languages.
Words that have a special meaning. keywords may only be used for their intended purpose. key Words are also known as reserved words.
Words or banes defined by the programmer. they are symbolic names that refer to variables or programming routines.
Perform operations on one or more operands. Usually a piece of data like number
Rules that must be followed when constructing a program.
Syntax dictates how key words and operators may be used, and where punctuation symbols must appear.
a named storage location in the computer's memory for holding a piece of data.
Variables are symbolic names that represent locations in the computer's random-access
When information is stored in a variable, it is actually stored in RAM.
there are two general types of data: numbers, such as 3, and characters,
such as the letter 'N.
Numbers are used to perform mathematical operations, and characters
are used to print information on the screen or on paper.
The Programming Process
The programming process consists of several steps, which include design,
creation, testing, and debugging activities.
Designing and Creating a Program
1. Define what the program is to do.
2. Visualize the program running on the computer.
3. Use design tools to create a model of the program.
4. Check the model for logical errors.
5. Write the program source code.
6. Compile the source code.
7. Correct any errors found during compilation.
8. Link the program to create an executable file.
9. Run the program using test data for input.
10. Correct any errors found while running the program.
Repeat steps 4 through 1 as many times as necessary.
11. Validate the results of the program.
Define what the program is to do.
identify the purpose of the program, the information
that is to be input, the processing that is to take place, and the desired output.
To calculate the user's gross pay.
Number of hours worked, hourly pay rate.
Number of hours worked, hourly pay rate.
Multiply number of hours worked by hourly pay rate. The result is the
user's gross pay.
Display a message indicating the user's gross pay.
Visualize the program running on the computer.
visualization of the program. Try to imagine what the computer screen looks
like while the program is running. If it helps, draw pictures of the screen, with sample
input and output, at various points in the program.
Use design tools to create a model of the program.
Three common design tools are hierarchy charts, flowcharts, and pseudocode.
A hierarchy chart is a diagram that graphically depicts the structure of a
The boxes are connected in
a way that illustrates their relationship to one another.
A flowchart is a diagram that shows the logical flow of a program. It is a useful tool for planning each operation a program must perform and the order in which the operations are to occur.
a cross between human language and a programming language.
Although the computer can't understand pseudocode, programmers often find it
helpful to write an algorithm using it.
Pseudocode can be written at a high level or at a detailed level.
High level pseudocode simply lists the steps a program must perform.
Get payroll data
Calculate gross pay
Display gross pay
Ask the user to input the number of hours worked
Ask the user to input the hourly pay rate
Set pay equal to hours times rate
Check the model for logical errors.
Logical errors, also called logic errors, are mistakes that cause a program to produce erroneous
Once a model of the program has
been created, it should be checked for logical errors. The programmer should trace through the
charts or pseudocode, checking the logic of each step. If an error is found, the model can be
corrected before the actual program source code is written.
Write the program source code.
Once a model of the program (hierarchy chart, flowchart, or pseudocode) has been
created, checked, and corrected, the programmer is ready to write the source code, using
an actual computer programming language, such as C++.
Compile the source code.
Next the saved source code is ready to be compiled. The compiler will translate the source code to machine language.
Correct any errors found during compilation.
If the compiler reports any errors, they must be corrected and the code recompiled. This step is repeated until the program is free of compile-time errors.
Link the program to create an executable file.
Once the source code compiles with no errors, it can be linked with the libraries specified by the program #include statements to create an executable file. If an error occurs during the linking process, it is likely that the program has failed to include a needed library file.
The needed file must be included and the program relinked.
Run the program using test data for input.
Once an executable file is generated, the program is ready to be tested for run-time and logic errors. A run-time error occurs when the running program asks the computer to do something that is impossible, such as divide by zero. Normally a run-time error causes the
program to abort.
Correct any errors found while running the program.
When run-time or logic errors occur in a program, they must be corrected. You must identify the step where the error occurred and determine the cause.
Desk-checking is a process that can help locate these types of errors. The term desk-checking means the programmer starts reading the program, or a portion of the program, and steps through each statement.
Validate the results of the program.
When you believe you have corrected all errors, enter test data to verify that the program solves the original problem.
What Is Software Engineering?
The field of software engineering encompasses the complete process of crafting computer software. It includes designing, writing, testing, debugging, documenting, modifying, and maintaining complex software development projects.
THIS SET IS OFTEN IN FOLDERS WITH...
Java 1 - lesson 1
Basic Java Definitions and Syntax Rules
YOU MIGHT ALSO LIKE...
CS 0007 Ch. 1
Computer Science Chapter 1
C++, Introduction to Computers...,Chapter1
AP Java: Intro to Computers and Java Vocab
OTHER SETS BY THIS CREATOR
1. Introduction to Computers and Programming
Asking for information
The Awakening Vocab Words 1-30
Chem 28 Oct 2015
OTHER QUIZLET SETS
US CH. 18 and 20
English//Literature Test #1
Research Design Final