Title: ITE 272 Intro to ITE Part II
1ITE 272 - Intro to ITE Part II
- Chapter 3
- Data Representation
2Data Representation and Processing
- All processors must be able to
- Recognize external data / convert to internal
format - Store / retrieve internal data
- Transport data internally
- Manipulate internal data
3Binary Data Representation
- Stores data as
- True / false
- Yes / no
- On / off
- High / low
4Binary Data Representation
- Why do computers use binary?
- Can easily be represented as an electrical signal
- Can be reliably transported
- Among computer system components
- Processed by two-state electrical devices
- Easy to design
- Easy to build
5Binary Data Representation
- Why use?
- Corresponds directly to Boolean logic
- AND
- OR
- NOT
- XOR
6Numbering System Characteristics
- The number of characters in the number system is
equal to the base of the number system. - There are 10 characters in the decimal number
system (0, 1, 2, 3, 4, 5, 6, 7, 8, 9). - There are 2 characters in the binary number
system (0, 1)
7Numbering System Characteristics
- The fractional part of a numeric value is
separated from the whole number by a period
(radix point) - For Example 5,689.368
- (3 x .1) (6 x .01) (8 x .001)
- 0.3 0.06 0.008
- 0.368
8Numbering System Characteristics
9Numbering System Characteristics
10Numbering System Characteristics
11Numbering System Characteristics
- Hexadecimal Notation
- The base (radix) of a hexadecimal number system
is 16. - There are 16 characters in the hexadecimal number
system. - There are only 10 characters in the Arabic number
system that can be used to represent some of the
16 characters in the hexadecimal number system. - The letters A, B, C, D, E, F are used to
represent the last 6 characters in the
hexadecimal number system.
12Numbering System Characteristics
Hexadecimal and decimal values
13Numbering System Characteristics
- Octal Notation
- Some operating systems and machine language
programs use octal notation. - The base (radix) of an Octal number system is 8.
- There are 8 characters in the octal number
system. (0, 1, 2, 3, 4, 5, 6, 7)
14Goals of Data Representation
- Compactness
- Compact data representation requires less storage
space and less expensive processing and storage
devices. - Accuracy
- The accuracy of representation increases with the
number of data bits used.
15Goals of Data Representation
- Range
- Routine calculations can generate quantities that
are either too large or too small to be stored
within finite circuitry. - Ease of manipulation
- The efficiency of a processor depends on its
complexity.
16Goals of Data Representation
- Standardization
- Various organizations have created standard data
encoding methods for communication among computer
systems and their components.
17CPU Data Types
- Five Primitive Data Types
- Integer
- Excess Notation
- Twos Complement Notation
- Real number
- Floating Point Notation
- Character
- Boolean
- Memory address
18CPU Data Types
- Integer
- An integer is a whole number (ex 3, 5, 6)
- Integers can be signed or unsigned
- A signed integer uses one bit to represent the
sign - The sign bit is the high order bit
- Excess notation is used to represent signed
integers
19CPU Data Types
Excess notation using four bits
20CPU Data Types
- Twos Complement Notation
- Nonnegative integer values are represented as
ordinary binary numbers - Negative integer values are represented using
- Complement of positive value 1
- The complement of a number is formed by changing
all 1 bits to 0 and all 0 bits to 1
21CPU Data Types
- Real Numbers
- A real number can contain both whole and
fractional components - The whole portion appears to the left of the
radix point - The fractional portion appears to the right of
the radix point
22CPU Data Types
Real Number
23CPU Data Types
Scientific Notation
24CPU Data Types
- Floating Point Notation
- Floating point notation is used to represent very
small numbers and very large numbers - Values can either be very large or very small,
but not both at the same time
25CPU Data Types
Floating Point Notation
26CPU Data Types
- Character Data
- An individual symbol is a character.
- Characters grouped together form a string.
- Character data can only be represented in the
computer system using a coding scheme.
27CPU Data Types Coding Methods
- Binary Coded Decimal (BCD)
- Character coding method used by early IBM
mainframe computers. - Characters are encoded as strings of six bits.
- 26 symbols are represented.
28CPU Data Types Coding Methods
- Extended Binary Coded Decimal Interchange Code
- 8 bit coding method used by IBM mainframe
computers. - Characters are encoded as strings of eight bits.
- 28 symbols are represented.
29CPU Data Types Coding Methods
- American Standard Code of Information
Interchange - Coding method used in data communication that has
been adopted by the United States. - 7-bit and 8-bit formats
- Includes device control codes
30CPU Data Types
31CPU Data Types Coding Methods
- Unicode
- Multilingual character encoding standard
encompassing all of the worlds written
languages. - Characters are coded using 16 bit strings.
- 216 characters are represented.
32CPU Data Types
- Boolean Data
- Two data values true and false.
- Data is represented using a single bit.
- Binary 1 can represent true and binary 0 can
represent false.
33CPU Data Types
- Memory Addresses
- Flat memory model
- Memory addresses can be represented using a
single integer. - Segmented memory model
- Memory addresses require multiple integers.
34Data Structures
- What is a data structure?
- Group of primitive data elements
- Defined / manipulated by software
- Hardware cannot directly manipulated
- Done in hardware via primitive data types
- Uses primitive data elements to create a new data
type
35Data Structures
36Data Structures
Array Elements
37Data Structures
Character Array
38Data Structures
Linked List (Singly)
39Data Structures
Noncontiguous Character Array
40Data Structures
Linked List Insertion
41Data Structures
Insertion into Character Array
42Data Structures
Doubly Linked List
43Data Structures
Record (Data Structure)
44Data Structures
Indexing of Records
45The End