CPSC 120 Midterm Study Guide with
Complete Solutions
Algorithm - ANSWER-a set of well-defined steps to perform a task or solve a problem
Arithmetic and Logic Unit - ANSWER-handles mathematical operations
Bit - ANSWER-Binary digit,
-smallest piece of memory
-holds an electrical charge
- positive charge = on, negative charge = off
Byte - ANSWER-Contains 8 bits and an address in memory
Coercion - ANSWER--automatic conversion of an operand to another data type
-lower one is promoted with values of different data types
-with = operator, expression on right is converted to type on left
-affects value used in calculation
Computer - ANSWER-programmable machine designed to follow instructions
Constants - ANSWER--variables whose content cannot be changed during program
-must assign value when it is defined
Control Unit - ANSWER-receives and decodes program instructions and coordinates
computer operations
CPU? - ANSWER-Hardware component that runs programs
Cycle of Program - ANSWER-1. Fetch
2. Decode
3. Execute
Decode - ANSWER-interpret instruction and generate a signal
Demotion - ANSWER-conversion to a lower type
Execute - ANSWER-route the signal to the appropriate component to perform operation
Fetch - ANSWER-get next program instruction from memory
Hardware? - ANSWER-physical components of a computer
High-level Language - ANSWER-closer to human language
Complete Solutions
Algorithm - ANSWER-a set of well-defined steps to perform a task or solve a problem
Arithmetic and Logic Unit - ANSWER-handles mathematical operations
Bit - ANSWER-Binary digit,
-smallest piece of memory
-holds an electrical charge
- positive charge = on, negative charge = off
Byte - ANSWER-Contains 8 bits and an address in memory
Coercion - ANSWER--automatic conversion of an operand to another data type
-lower one is promoted with values of different data types
-with = operator, expression on right is converted to type on left
-affects value used in calculation
Computer - ANSWER-programmable machine designed to follow instructions
Constants - ANSWER--variables whose content cannot be changed during program
-must assign value when it is defined
Control Unit - ANSWER-receives and decodes program instructions and coordinates
computer operations
CPU? - ANSWER-Hardware component that runs programs
Cycle of Program - ANSWER-1. Fetch
2. Decode
3. Execute
Decode - ANSWER-interpret instruction and generate a signal
Demotion - ANSWER-conversion to a lower type
Execute - ANSWER-route the signal to the appropriate component to perform operation
Fetch - ANSWER-get next program instruction from memory
Hardware? - ANSWER-physical components of a computer
High-level Language - ANSWER-closer to human language