{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}


LectureNotesPartSix - LECTURE NOTES Section Six Definition...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
LECTURE NOTES Section Six Definition: Data Type: a set of values and the operations defined on those values. Generally, the allowable values of a data type will be defined over some range. For example, it would not make much sense to define the integer data types of a specific machine to include all integers….the range would be limited by word length. From an architectural point of view, there are two classes of data types or simply types. intrinsic types . Those that are explicitly visible because of the nature of the physical storage resources themselves. supported data types . These are types that are implicitly supported by the hardware by virtue of: An encoding or representation of the values of this type in terms of intrinsic data types. Specific type-related operations or instructions implemented in the hardware. The basic instrinsic type is the bit: set of binary digits {0,1} logical operators {AND, OR, NOT, EXOR……} arithmetic operators { +,-,*,/} The second intrinsic type is the bit sequence (bit string) A bit sequence of length, L, is the set of binary numbers 0…..0, 0……01,…..11….11 of length L along with the set of logical and arithmetic operators and perhaps left and right shift. It is possible to view a bit sequence as a primitive type or as a structured type since it is composed of individual bits. But it is reasonable to view the bit sequence as the primitive type since we define so many system parameters with respect to bit sequences of various lengths. a bit sequence of length 8 = 1 byte registers memory words instructions We have other structured intrinsic types array…..what is memory….an array of bit sequences of length 8 a register file is an array record…ordered set of intrinsic types which may not be identical an instruction can be viewed as a record composed of bit sequences of various lenghts opcode field address field, etc. Examples of supported data types: character integer real boolean
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
In each of these cases, we must describe the encoding of the bit sequences to give meaning to the values being represented and the operations defined on them. Note that intrinsic types are used to represent or encoded supported types. Note also that instructions are a supported data type, their encoding and representation are completely defined, i.e, the meaning of various fields along with a set of operations….fetch, execute. Examples of the representations of various data types: fixed point numbers ….integers sign magnitude . given N bits, use the left most bit to represent sign with 0 =positive and 1 = negative. The remaining N-1 bits represent magnitude. this provides a range of -( 2 N-1 –1) to +(2 N-1 –1) one problem with this method is that it provides two representations of zero. One’s complement Non-negative numbers are represented by ordinary binary notation with left most bit being 0. Represent negative numbers by complementing all N bits of the corresponding positive value. Note that this is different from sign magnitude…problem again is that there are two representations of zero.
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}