• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/59

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

59 Cards in this Set

  • Front
  • Back
Elementary data item
A single item such as a number or character. What we concentrate on in this course.
Aggregate data item
A group of numbers or characters. Sometimes called a data structure. Deals with arrays. Character strings. etc.
Program Data Elements vs Data Types
Programs have different types of elements that hold data created by the programmer to reference data. These elements we speak of can hold different types of data.
Variable element
A data item with a name and that contains a value that may change as the program executes
Constant element
A data item with a name and that contains a value that remains the same during the execution of the program no matter what. Usually in capital letters.
Literal element
A constant whose name is the representation of it's value. Ex: "A" or "100". It's literal, see?
Integer data type
Whole numbers, positive, negative or zero
Floating Point data type
Numbers that may have post-decimal digits
Character data type
Keyboard characters plus some special chars
Boolean data type
Only two values available: true or false
String data type
A group of characters. The only aggregate data type we cover.
Identifier
Variable, constant, or function, etc. Meaningful names describing the kind of data stored.
Value vs Representation
These are two different things. There's a CONCEPT of numeric value in a represented number and then there is HOW that value is represented.
Decimal Number System
Base 10. Grouped by powers of ten. Digits 0-9. Commonly used in society.
Binary Number System
Base 2. Grouped by powers of 2. Consists of bits: 0 and 1. It is used as a computer storage system and known for reliability.
Hexadecimal Number System
Base 16. Grouped by powers of 16. Consists of hex digits... 0, 1-9, A-F. Known to conserve space... makes for easy conversion to and from binary.
Data Representation
Refers to the manner in which data is stored in the computer. Several different formats for data storage.
Data overflow, uh oh!
Since we have finite storage, it is possible to overflow a storage location by trying to store too large a number etc. It is up to the programmer to choose the data type with a length that wont overflow. Knowing how numbers are represented in storage helps one to understand this.
Data forms
Characters, numbers, graphical, media, etc
Bits
Binary digits... What all data is stored in the computer as
Bit Pattern
A universal storage format for all data types
More on Bits
Smallest unit of data stored in a computer. Value of 0 or 1. Is like a switch: on (1) or off (0). Bits are stored electronically in RAM and auxiliary storage devices by two-state digital circuits. It is the software that stores and interprets the pattern.
Process of data retrieval
Data is coded then stored and when retrieved it is decoded
Byte
A byte is a string of 8 bits. Called a Character when the data is text.
Character
A string of 8 bits that is text
Binary Number
A number represented by 0s and 1s. Ex: 10010101
ASCII
American Standard Code for Information Interchange. The scheme used to assign a bit pattern to each of the characters available. Charts come in different flavors: 7bit strings, some 8, some binary code as well as decimal representation, etc.
Control Characters
ASCII codes before decimal 32... like bell, backspace and carriage return
ASCII Chart
Uppercase characters have different ASCII code than lowercase. Uppercase comes before lowercase. Numbers come before letters. Special characters spread around.
Extended ASCII
The 8 bit character chart is sometimes called this. Extra zero on the left.
Unicode
Another scheme developed so that many symbols in international languages may be represented. Also uses bit patterns like ASCII.
Integer
A whole number without a decimal portion. May be positive negative or zero. 2 categories: signed and unsigned.
Unsigned Integer
An integer without a sign, that is... a non negative integer. Range from zero to infinity. Is stored on RAM as it's value when represented as a binary number.
Overflow
When one tries to store a number in a memory location that is not large enough. May or may not receive an error message.
Maximum number storable in 1 byte
255
Sign and magnitude format
For signed integers. Used to allow positive and negative numbers and zero alike
Twos Complement
A format to use for negative number, still a sign and magnitude format... simply made for negative numbers. Used by switching 0s and 1s.
Unsigned integers
Stored as the binary number equivalent to the original
Signed positive integer
Stored using the sign and magnitude format where the magnitude is the binary equivalent
Signed negative integer
Stored using the sign and magnitude format where the magnitude is in the two's complement format
Floating point numbers
Represented using sign, exponent and mantissa (boring)
Sequence
Default control structure
The Structure Theorem
Sequence, selection and repetition have been shown to be enough control structures to write any computer program
Selection
Making a decision to execute several statements.. or not. Comparing one value with another and then making a decision from the comparison. Formed by a condition statement. If the condition is true one choice is selected. If it is false another choice is selected.
Condition statement
A statement that compares two values such that the result is true or false. Written as an If statement. Allows the algorithm and program to make a decision.
Comparison operators
> < = <= >= <>
Simple selection statement
A choice between two alternatives. If - then - else - endif.
Null else selection statement
Performs statements only when the condition is true. If - then - endif.
Combined selection statement
Multiple conditions using And and Or. If - and - then - endif. (Could use else)
Structured Programming
Indentation helps us see which statements are dependent on others. Using good programming style.
Control structures
Refer to the flow of control through the statements in our algorithms and programs
Repetition
When a set of statements are repeated forming a loop (multiple iterations of a block of code)
While loop
Repeats while a condition is true
For loop
Repeats a counted number of times
Sentinel value
A special input value that signals the end of a loop
Priming the loop
To set things up before the loop so the condition makes sense the first time it is tested (inputting a value to a variable, setting count to 0 etc)
Objects in Small Basic
objects containing predefined operations that are useful in many programs. are like toolboxes in which there are tools that are handy for lots of situations. Like text.converttouppercase etc.
Logic Error
An error found at desk check time for the algorithm or at run time for the program because it does not perform properly. Like an infinite loop.
Input validation
To check that what the user entered is legitimate and meaningful to the situation. Can use a While loop to do this.