Introduction to Computer Science

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Boolean Operator

&& and, || or, ! not. Evaluates to true or false. The expressions to the left and right must also evaluate to true or false.

Arithmetic Operator

+ Addition, - Subtraction, * Multiplication, / Division. Unlike in mathematics there is no implicit multiplication in Java. Two numeric values typed adjacent to each other without any operator between them will result in an error message.

Relational Operator

> greater than, < less than, >= greater or equal, <= less or equal, == equal. Evaluates to true or false. The expressions to the left and right must related appropriately make comparison reasonable, for example (5>3) is true, but (5>"apple") can't be evaluated and is an error.

Data Type

A classification of data that determines the possible values, the operations that can be done and the way values of that type can be stored.

Operating System

A collection of software that manages computer hardware resources and provides common services for computer programs, and may also provide a graphical user interface (Windows, Icons, Menus, Pointer). Examples include Microsoft Windows, Linux, MacOS, Android...

Control Unit

A component of a computer's central processing unit which directs operation of the processor. It controls communication and co-ordination between input/output devices. It reads and interprets instructions and determines the sequence for processing the data.

Array

A composite data type consisting of a fixed size collection of some other data elements. It is permissible for the other data type to be either Primitive or Composite data.

List

A composite data type consisting of a flexible sized collection of some other composite data elements.

Compiler

A computer program that transforms source code written in a high level programming language into machine language. The purpose of the compiler is to create an executable program.

ALU

A digital circuit that performs integer arithmetic and logical operations. The Arithmetic and Logic Unit is a fundamental building block of the central processing unit.

Recursion

A function, method, or procedure calls itself.

Assembly Language

A low-level programming language in which there is generally a one-to-one correspondence between the language and machine code instructions.

int

A primitive data type representing a finite subset of integer numbers stored in 32 bits.

char

A primitive data type representing a single character in the alphabet stored in 8 bits.

float

A primitive data type representing an approximation of a real number in a way that can support a wide range of values. Stored in 32 bits.

bool

A primitive data type that can hold only two possible values (true or false). Used with logical operators and in conditional constructs to control the order of execution within a program.

High Level Language

A programming language with strong abstraction from the details of the computer making the process of developing a program simpler and more understandable relative to a lower-level language.

Object Oriented Programming

A programming methodology that focuses on bundling data and instructions that operate on that data.

Identifier

A sequence of characters in a program declared to identify a memory location to store data, or instructions to be executed. In object oriented programming an identifier may also indicate a data type defined by a class. The characters of an identifier may be letters, numbers, $, or _. The first character may not be a number.

Program

A sequence of instructions, written to perform a specified task with a computer. An implementation of an Algorithm.

Machine Language

A set of instructions executed directly by a computer's central processing unit. Each instruction performs a very specific task, such as a load, a jump, or an ALU operation on a unit of data in a CPU register or memory. Every program directly executed by a CPU is made up of a series of such instructions.

Register

A small amount of storage available as part of a digital processor.

Algorithm

A step-by-step procedure for calculations, data processing, and automated reasoning expressed as list of well-defined instructions for calculating an output from an input. Conceptual process for solving a problem, independent of any particular language. Examples include Binary Search.

byte

A unit of digital information in computing and telecommunications that consists of eight bits.

String

An composite data type consisting of multiple char basic data elements. Used to represent textual information.

Binary Operator

An operator that takes two operands. Examples include the arithmetic operators, relational operators, and boolean operators with the exception of negation.

Software

Any set of machine-readable instructions that directs a computer's processor to perform specific operations.

Analog

Continuous. Examples include voltage, temperature, pressure, height... For any two different analog values there exists another value between them. Any method used to copy an analog signal will result in some degradation of the signal.

Composite Data Types

Data types constructed in a program using a combination of other data types. In Java "Classes" are used to define the rules and operations of composite data types.

Primitive Data Types

Data types provided by a programming language as a basic building blocks. Operations on these data constructs are the fastest possible.

Digital

Discrete. Examples include the number of people in a room, a switch that is either on or off, a statement that is true or false, the day of the week. It is possible to have two different digital values without any possible value between them. It is possible to make a perfect copy of a digital signal.

Advantages of Object Oriented Programming

Faster program development through reuse of tested modules. Maintainability, as bugs can often be traced quickly to a particular module. Facilitates teamwork as distinct modules may be assigned to different team members.

Indentation

Followed by nearly all programmers in industry, but not enforced by compiler. Indentation is used to keep track of nesting level of brackets. Good indentation can greatly improve the readability of code.

Naming Convention

Followed by nearly all programmers in industry, but not enforced by the compiler. In Java if an identifier is the name of a class it should start with a capital letter. If it names a variable or method then it starts with a lowercase letter. If it names a constant then all letters are capital with _ between words. If not a constant then second and remaining words begin with capital, remaining letters of each word are lowercase.

CPU

Hardware within a computer that carries out the instructions of a computer program. Central Processing Unit.

Operator Precedence

In a complex expression when two operators share an operand the operator with the higher precedence goes first. From math class we are familiar with the rule that multiplication comes before addition. In most cases it is enough to know that parenthesis trump all else, then come arithmetic operators, then Relational, and Boolean last. In the case of ambiguity execution proceeds left to right and if the final value can be determined before all calculations are complete the remaining operations will not be performed.

Object or Instance

Memory set aside to store data consistent with the rules of a class.

Disadvantages of Object Oriented Programming

Not all problems lend themselves easily to a modular solution. Complex frameworks often require significant overhead and large amounts of code even for relatively simple tasks. As programmers become less aware of underlying details they often create overly complex, inefficient, or ineffective solutions.

Assignment

Storing a value in a memory location. An assignment statement has a variable on the left and an expression on the right between them is a single = The result of evaluating the expression on the right is stored in the memory location referred to by the variable on the left.

Instruction Cycle

The basic operation cycle of a computer. It is the process by which a computer retrieves a program instruction from its memory, determines what actions the instruction requires, and carries out those actions. This cycle is repeated continuously by the central processing unit from bootup to when the computer is shut down.

Delimiter

The characters used to separate words in a language. In most cases it is sufficient to put a "space" between items. Sometimes other characters are used like "coma" or "period". Sometimes like in the case of "5+3" the separation is implicit. There are three items "5", "+", and "3".

Hardware

The collection of physical elements that constitutes a computer system.

Clock rate

The frequency at which a central processing unit is running. After each clock pulse, the signal lines inside the CPU need time to settle to their new state. That is, every signal line must finish transitioning from 0 to 1, or from 1 to 0. If the next clock pulse comes before that, the results will be incorrect.

Transistor

The fundamental building block of modern electronic devices. Used to amplify and switch electronic signals.

bit

The most basic unit of information in computing and digital communications. A bit can have only one of two values. The most common representation of these values are 0 and 1.

Main Memory or primary memory

The only memory directly accessible to the central processing unit. The processor reads instructions stored there and executes them. Any data actively operated on is also stored there.

Identifier Scope

The part of a computer program where the identifier, a name that refers to some entity in the program, can be used to find the referred entity.

Ripple Carry Adder

The part of the arithmetic and logic unit that does addition.

Identifier Lifespan

The period of time between allocation and deallocation of the memory to which an identifier referrs.


Ensembles d'études connexes

MGT 370: Chapter 07 Assignment: Designing Adaptive Organizations

View Set

Passpoint - Endocrine and Metabolic Disorders

View Set

Biology Chapter 5: Membrane Transport

View Set