Docsity

CPSC 120 Midterm Study Guide with Complete Solutions, Exams of Advanced Education

Toggle sidebar
bg1
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
pf3

Partial preview of the text

Download CPSC 120 Midterm Study Guide with Complete Solutions and more Exams Advanced Education in PDF only on Docsity!

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
  1. Decode
  2. 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

How does a high-level program convert to an executable file? - ANSWER-Source code is run through the preprocessor to create modified source code. Modified source code is then run through the compiler to convert modified source code into object code. Object Code is run through the linker to connect the object code and hardware-specific library code. This link creates an executable file Input devices - ANSWER-used to send information to the computer from the inside Line - ANSWER-all of the characters entered before a carriage return Literal - ANSWER-piece of data that is written directly in source code of a program Low-level Language - ANSWER-used for communication with computer hardware directly (not easy to read by humans) Main Memory - ANSWER--holds program instructions and data -volatile: data is erased when computer is turned off -Random Access Memory; CPU can access data from any memory location Operating Systems - ANSWER--controls the operation of the computer -manages connected devices and access to storage -allows programs to run Output devices - ANSWER-used to send information from the computer to the outside Overflow and Underflow - ANSWER--occurs when assigning a value that is too large(overflow) or too close to zero to be held in a variable(underflow Program - ANSWER-set o instructions directing a computer to perform a task Program/Software - ANSWER-set of instructions that the computer follows to perform a task Programmer - ANSWER-person who designs, creates, and test programs Programming language - ANSWER-special language used to write programs Promotion - ANSWER-conversion to a higher type