CMPSC 201 Exam 1 Flashcards
What is a computer?
A programmable electronic device that can
store, retrieve and process data.
Advantages of computers
Reliable, Fast, Does not tire,
Follows instructions (programs) precisely
Disadvantages of computers
Not “smart”– cannot analyze problems
Follows instructions (programs) precisely
What can a computer do?
Arithmetic, Comparisons/decision making, Communication-input, output, transfer of data.
CPU
fetches and follows a set of simple instructions
(also called processor).
Main Memory
stores the executing program and its data in RAM
(random access memory). Volatile
Volatile Memory
Volatile memory is a type of memory that requires a constant power supply to retain data. When the power is turned off, all data stored in volatile memory is lost. This type of memory is typically used for temporary storage and fast data access.
Secondary Memory
stores permanent records (files). Non-volatile
Non-volatile Memory
Non-volatile memory (NVM) is a type of computer memory that retains stored information even after power is removed. This makes it ideal for long-term data storage and secondary storage applications.
Examples of Secondary Memory
hard disks, USB-drives,
CD-ROMs, DVDs, etc.
Components of a Computer
Input Device, CPU, Main Memory, Secondary Memory, Output Device
ALU
Part of CPU stands for Arithmetic and Logic Unit performs mathematical operations
Control Unit
Control Unit coordinates all of the computer’s operations, performs the
fetch/decode/execute cycle
Fetch: Control Unit fetches next instruction
Decode: Control Unit decodes instruction
Execute: instruction is executed by appropriate
component
RAM Main Memory
consists of a long list of numbered memory
locations (RAM). Main memory is volatile!
Memory Locations
contain zeros and ones, on and off switches,
called binary digits or bits
Byte
8 bits 1 address for the memory stored there
Storage of Secondary Memory
Uses same idea of bits and bytes
Programs/data stored in units called files.
Stores files when they are not in use
Operating Systems
Operating Systems – allocates computer’s
resources and allows communication between
user and computer.
Programs/Program
a set of instructions to perform
specific tasks. / A set of instructions a computer
follows to perform a task. An algorithm that has
been translated into a programming language so
the computer can “understand” and perform the
steps.
Programming language
special language used
to write programs.
Algorithm
set of well-defined steps for
performing a task or solving a problem
High Level Languages
designed to be easy for humans to read
and to write programs in, but too complicated for the computerand to write programs in, but too complicated for the computer
to understand
Low Level Languages
consist of simple instructions which can
be understood by the computer after a minor translation
Compiled Languages
a separate file is created for the translated binary
code (C++, Java, FORTRAN, etc.)