Unit 1: Basic Terminologies and Problem Solving Steps Flashcards
Define: Computer
Programmable machine designed to follow/process data/instructions at an enormous speed
Define: Computer program (software)
List of instructions, stored in the computer memory to direct the computer system to perform a task
Define: Hardware
Computer equipment, e.g. keyboard, mouse, etc.
Define: Software
Computer programs, e.g. operating system, application software
Define: Computer system
Combination of hardware and software
Define: Input devices
Devices used to input information into the CPU of the computer, e.g. keyboard, mouse, etc.
Define: Output devices
Devices used to make the computer-processed data/information available at the output, e.g. monitor, printer, etc.
What is the standard output of a computer system?
Computer monitor
What is the standard input of a computer system?
Keyboard
Define: Internal memory (primary storage)
Holds both program instructions and data
What is internal memory (primary storage) composed of?
Random Access Memory (RAM, also known as main memory) and Read-Only Memory (ROM)
Define: Random Access Memory (RAM)
Volatile (requires constant power to maintain the stored information, erased when the computer is turned off). Stores data and associated instructions for any application program
Define: Read-Only Memory (ROM)
Non-volatile (data items are retained even if the computer is turned off). Stores start-up instructions and the likes for a computer system
Where does any data go when being inputted through the input device
Directly to the RAM
Define: External memory
Non-volatile, suitable for long-term storage (also called secondary storage), e.g. floppy disk, SSD, flash memory, etc.
Define: Central Processing Unit (CPU)
Composed of two units: ALU (Arithmetic and Logic Unit) and CU (Central Unit). The CPU has some memory which are called the registers and the present-day CPU uses cache memory too (this is not considered as part of the internal memory)
Define: Cache memory
Auxiliary memory, generally inaccessible, from which high-speed retrieval of data is possible
Define: Control Unit (CU)
Part of the CPU. Controls the computer resources, also called processor
Define: Arithmetic and Logic Unit (ALU)
Part of the CPU. Performs mathematical operations
Define: The CPU operations
The CPU performs fetch/decode/execute cycle in order to process information
Define: Fetch (1st CPU operation)
From Ram, the CPU’s CU fetches the next encoded instruction in the sequence of program instructions (each instruction is encoded in the form of a number)
Define: Decode (2nd CPU operation)
The CU decodes the instruction and generates an electronic signal
Define: Execute (3rd CPU operation)
The electronic 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
True or False: A CPU consists of an ALU, scanner, and a processor
False
Instructions and data are stored in…
The memory
An operating system is…
Software that provides a convenient and efficient interface between the user and the hardware
What does RAM contain?
Currently running program instructions and data used by those programs
A byte is a sequence of how many bits?
8
What values can a bit contain?
0 (OFF, FALSE) or 1 (ON, TRUE)
What happens if a computer needs to store a large number that cannot fit into a single byte?
The computer uses more than one adjacent bytes
What are the three main categories of programming languages
Low level, mid level, and high level
Define: Low level language (machine language)
Computer hardware understands this language only, written using two alphabets (0 and 1), memory efficient language with very fast execution time, tedious to write
What is low level language used to develop?
Operating systems, device drivers, databases, and applications that require direct hardware access
True or False: Low level language is machine (CPU/Processor) dependent
True
Define: Mid level language (assembly language)
Assigns short names to commands (e.g. ADD, MOV) instead of raw binary, easier than machine language, must be translated to machine language, the “assembler” (computer program) translates the assembly language into machine language, still in use
True or False: Mid level language is machine (CPU/Processor) dependent
True
What is mid level language used to develop?
Operating systems, device drivers, compilers, and other programs that require direct hardware access
Define: High level language (source code)
Uses English-like commands and instructions along with some mathematical symbols (i.e. area = 5 * 5 * 3.1415;), easier than machine language, must be translated into machine language using compiler
True or False: High level language is machine (CPU/Processor) dependent
False
Define: Compiler
A general compiler translates the entire source code into a machine-code file (known as object-code), and the machine-code file is then executed. C++ uses a compiler
Define: Interpreter
A special compiler called that reads one statement from the source code, translates it to the machine code, and then executes it right away. Perl, Matlab, Python, use interpreters. A statement from the source code may be translated into several machine instructions
Is java a compiled, interpreted, or virtual machine programming language?
Virtual machine
Define: Virtual machine programming language
A language run through a virtual machine (VM) that is a software implementation of a computer that executes programs like a real machine
Define: Procedure
A list of instruction to tell the computer what to do in step-by-step order, it is a collection of statements that are grouped together to perform an operation (in OOP, procedures are known as methods)
Define: Procedural programming
Centered on procedures, data items are commonly passed from one procedure to another, the procedures are developed to operate on the program’s data
Define: Object-oriented programming (OOP)
Centered on creating objects rather than procedures,
Define: Objects
A combination of data and procedures, the procedures associated to the object manipulate the object’s data (data in an object are known as attributes, fields, data members, or instance variables. Procedures in an object are known as methods, member-functions, or member-methods), codes outside the objects interact with object’s methods
Define: Class
A program-structure (or blueprint or program-code-template) that allows a programmer to define the characteristics of an object that needs to be created, a class may contain methods only or attributes only
True or False: Assembly language is a high level language
False
True or False: The source code in Java is compiled into Java Virtual Machine code called bytecode, which is machine-independent
True
True or False: If you modify your code, written in high level language, you must compile it for the change to be effective
True
Fill in the Blank: ________ is the physical aspect of the computer that can be seen
Hardware
Fill in the Blank: ________ is the brain of a computer
CPU
Why do computer use zeros and ones?
Because digital devices (e.g., computer) have two stable states and those states can be well represented by 0 and 1
Fill in the Blank: _______ translates high-level language program into machine language program
A compiler
Fill in the Blank: ________ is a program that runs on a computer to manage and control a computer’s activities and provides interface between the user and the computer hardware
Operating system
True or False: In the RAM section, any two memory locations can NOT have the same address (location)
True
True or False: When a programmer defines a class, the programmer decides on the name of the class
True
Which hardware component stores the data and instructions?
Random Access Memory (RAM)
What are the steps in the engineering problem solving process?
Specification, design, implementation, testing
Describe the ‘specification’ step in the engineering problem solving process
Precise statement of what the system will do. Includes functional specifications, input/output specifications, and performance specifications
Describe the ‘design’ step in the engineering problem solving process
Decompose the system into parts and describe how the components communicate with each other
Define: Algorithm
An ordered sequence of well-defined instructions (NOT a computer program) that gives an initial state, performs some task, and halts in finite time
Define: Unified modeling language (UML)
The standard modeling language for object-oriented program design
Define: Class diagram
Shows the different objects, their relationship, their behaviors, and attributes. Used in UML
Define: Flowchart
Uses specific diagrams connected by arrows to represent the control-flow of any procedure/method/function
Describe the ‘implementation’ step in the engineering problem solving process
Where the programmer writes and compiles the code, easiest part
Define: Syntax error
Mistakes that the programmer has made that violate the rules of the programming language
Describe the ‘testing’ step in the engineering problem solving process
Ensures the implementation fulfils the specification, second most important step
True or False: A computer program is the implementation of an algorithm
True
True or False: An algorithm refers to a step-by-step solution to solve a specific problem
True
Writing code is done during which step of the engineering problem solving process?
Implementation
In which problem solving steps, syntactical (grammatical) errors are corrected?
Implementation