CS 101 Exam 1
fetch-decode-execute cycle
1. Fetch. A program is a long sequence of machine language instructions. The first step of the cycle is to fetch, or read, the next instruction from memory into the CPU.2. Decode. A machine language instruction is a binary number that represents a command that tells the CPU to perform an operation. In this step the CPU decodes the instruction that was just fetched from memory, to determine which operation it should perform.3. Execute. The last step in the cycle is to execute, or perform, the operation.
syntax error
An error that results when an instruction does not follow the syntax rules or grammar of the programming language.
Unicode
An extensive encoding scheme that can represent the characters of many of the language in the world is
output devices
Devices that enable the computer to give the user the results of the processed data. (ex. video displays and printers)
order of operations
PEMDAS
microprocessor
The central processing unit that is generally made from a single integrated circuit.
processor
The component of a computer that follows instructions
statements
The individual instructions that you write a program in a high-level programming language
machine language
The language made up of binary-coded instructions that is used directly by the computer
bit (binary digit)
a byte is made up of 8 of them
byte
a computer's memory is divided into tiny storage locations known as ___. One is only enough memory to store a letter of the alphabet or a small number.
camelCase
a convention for naming variables that capitalizes the first letter of every word without spaces
hand tracing
a debugging process where you imagine that you are the computer executing a program, also known as desk checking
flowchart
a diagram that graphically depicts the steps that take place in a program
control structure
a logical design that controls the order in which a set of statements executes
logic error
a mistake that does not prevent the program from running, but causes it to produce incorrect results
named constants
a name that represents a value that cannot be changed during the program's execution, written in all uppercase letters
numeric literal
a number that's written into a program's code
programmer / software developer
a person with the training and skills necessary to design, create, and test necessary computer programs
interpreter
a program that both translates and executes the instructions in a high-level language program
complier
a program that translates a high-level language program into a separate machine language program
math operators
a programmer's tools for performing calculations
strings
a sequence of characters that is used as data
ASCII
a set of 128 numeric codes that represent the English letters, various punctuation marks, and other characters
program
a set of instructions that a computer follows to perform a task
syntax
a set of rules that must be strictly followed when writing a program, dictates how key words, operators, and various punctuation characters must be used in a program
sequence structure
a set of statements that execute in the order that they appear
algorithm
a set of well-defined logical steps that must be taken to perform a task
connector symbol
a small circle with a letter written inside it, used to connect flowcharts side by side on a page
variable
a storage location in memory that is represented by a name
integrated development environments (IDE)
a text editor that has specialized features for writing statements in a high-level programming language, a compiler/interpreter, useful tools for testing programs and locating errors
secondary storage
a type of memory that can hold data for long periods of time, even when there is no power to the computer
uninitialized variable
a variable that has been declared, but has not been init
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
digital device
any device that works with binary data
internal documentation
appears as comments in a program's code
low-level language
assembly language, close in nature to machine language
initialization
assigning a value to a variable in the declaration statement
binary numbers vs. decimal (base 10) numbers
binary numbers have two numbers to store data vs decimals don't
line comments
comments that occupy a single line, and explain a short section of the program
main memory (RAM)
computer's work area, where a computer stores a program while the computer is running, as well as the data that the program is working with
off-page connector symbol
connects pieces of a flowchart on separate pages, shaped like home plate
digital data
data that is stored in binary
IPO chart
describes the input, processing, and output of a program
program development cycle
design the program, write the code, correct syntax errors, test the executable code, debug the code
input devices
enable the user to input data and commands into the computer (ex. keyboard, mouse, touchscreen...)
pseudocode
fake code, an informal language that has no syntax rules, and is not meant to be compiled or executed
pixels
images are composed of tiny dots of color known as ______.
IPO
input, processing, output
keywords or reserved words
language has its own set of words that the programmer must learn in order to use the language
prompt
message that tells (or asks) the user to enter a specific value
two's complement
negative numbers are encoded using this technique
instruction set
operations that are typically understood only by microprocessors of the same brand.
terminal symbols
ovals, used for the start and the end of the program
output symbols
parallelograms, displays data to user
input symbols
parallelograms, prompts user for data
CPU
part of the computer that actually runs programs, small chips known as microprocessors
operators
perform various operations on data
running/executing a program
performing program instructions on given data
math expression
performs a calculation and gives a value
software
programs are referred to as this, without it a computer can do nothing
user-friendly
programs that are easy to use
system software
programs that control and manage the basic operations of a computer
application software
programs that make a computer useful for everyday tasks, programs that people normally spend most of their rime running on their computers
Constant
pseudocode for named constant
Display
pseudocode, displays a line of text to the user
Declare
pseudocode, lists variable names
Input
pseudocode, tells the user to input some kind of data
Set
pseudocode, used to pair a variable with a number or equation
ROM
read-only memory, a computer can read the contents, but cannot change its contents or store additional data there
floating-point notation
real numbers are encoded using this
processing symbols
rectangles
hardware
refers to all the physical devices or components that a computer is made of
comments
short notes placed in different parts of a program, explaining how those parts of the program work
assignment statement
statement that sets a variable to a specified value
variable declaration
statement that specifies a variable's name and data type
block comments
take up several lines and are used when lengthy explanations are required
debug
the programmer finds and corrects the code that is causing the logic error
source code
the statements that a programmer writes in a high-level language
data type
the type of data that the variable will hold
operands
the values on the right and left of the operator
external documentation
typically designed for the user, contains documents such as a reference guide that describes the program's features and tutorials that teach the user how to operate the program
assembler
used to translate an assembly language program to a machine language program
assembly language
uses short words known as mnemonics instead of binary numbers for instruction
String
variable that holds any string of characters
Integer
variable that holds whole numbers
Real
variable that holds whole numbers or numbers with a fractional part
volatile versus nonvolatile
volatile will lose contents when a computer is shut off, nonvolatile won't
string literals
when a string appears in the actual code of the program
integer division
when an integer is divided by an integer, the result will also be an integer
mnemonics
written instead of binary numbers when using assembly language to write a program