1.4.1 Data Types &1.4.2 Data Structures & 1.4.3 Boolean Algebra Flashcards
What is an integer?
A whole number
What data type would you use to store the following : 079321467823
String integer cant start with zero
What is real?
A float number [contains decimal points]
What is a character?
A single symbol
What is a string?
A collection of character
What is a Boolean?
True and False
What is an array?
An array is an ordered, finite set of elements of a single type.
Declare a 2d array pseudo code?
new array_name [num_rows][num_collums]
What is a list?
A list a a number of items in which items can occur more than once
What is a tuple?
An immutable, ordered set of values any type
What is a linked list?
A dynamic data structure used to hold an ordered set of items which are not stored in a contiguous locations.
Give an example of when might a stack be used?
Undo button
State De Morgan’s law?
¬(A∨B)≡¬A^¬B
¬(A^B)≡¬A∨¬B
State the distribution law?
A^(B∨C)≡(A^B)^(B^C)
A∨(B^C)≡(A∨B)∨(B∨C)
State the association law?
(A^B)^C≡A^(B^C)≡A^B^C
(A∨B)∨C≡A∨(B∨C)≡A∨B∨C