Professional Documents
Culture Documents
0 Data Representation
Binary to Decimal
Decimal to Binary
—> data size represents number of bits used to represent numeric values
—> smaller size = smaller range
—> Signed - uses 1 bit to represent the value if either positive or negative
0 = positive
1 = negative
2’s Complement
to avoid overflow, some CPU designers use double precision == long integer
Real Number
Character
—> EBCDIC (Extended Binary Coded Decimal Interchange Code)
a subset of unicode
—> Unicode
Carriage Return - moves print head to start of the line (like in typewriter)
Boolean
—> has only 2 value, true and false
Memory Address
—> each byte has a unique address
—> a pointer is a data element containing the address of another data element
—> address values always starts with zero
—> Flat memory model
Data Structures
—> group of primitive data elements organized and manipulated in software
Linked List
—> uses pointers so that list elements can be placed in nonsequential manner
—> each list element contains a pointer that holds the location of the next list
element
Record
—> composed of other data structures and commonly used as unit of input and
output from other files
—> class contains both traditional (static) data and manipulates the data
—> object is one variable of a class