Chapter 3 Data Representation

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

1 Chapter 2 The Digital World. 2 Digital Data Representation.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Chapter 3 Data Representation.
CHAPTER 2: Number Systems
Chapter 3 Data Representation. Chapter goals Describe numbering systems and their use in data representation Compare and contrast various data representation.
Chapter 4 Processor Technology and Architecture. Chapter goals Describe CPU instruction and execution cycles Explain how primitive CPU instructions are.
State Machines Timing Computer Bus Computer Performance Instruction Set Architectures RISC / CISC Machines.
Chapter 2 Data Types, Declarations, and Displays
2 Systems Architecture, Fifth Edition Chapter Goals Describe numbering systems and their use in data representation Compare and contrast various data.
COMP201 Computer Systems Number Representation. Number Representation Introduction Number Systems Integer Representations Examples  Englander Chapter.
ENEL 111 Digital Electronics Richard Nelson G.1.29
CPS-304 DIGITAL LOGIC & DESIGN Instructor : Ms. Saba Iqbal.
Copyright Jim Martin Computers Inside and Out Dr Jim Martin
SCSC 311 Information Systems: hardware and software
Computers Data Representation Chapter 3, SA. Data Representation and Processing Data and information processors must be able to: Recognize external data.
L/O/G/O The Instruction Set Chapter 9 CS.216 Computer Architecture and Organization.
Cis303a_chapt03-2a.ppt Range Overflow Fixed length of bits to hold numeric data Can hold a maximum positive number (unsigned) X X X X X X X X X X X X X.
Data Representation in Computer Systems. 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers.
The Beauty and Joy of Computing Lecture #3 : Creativity & Abstraction UC Berkeley EECS Lecturer Gerald Friedland.
CHAPTER 3: Number Systems
CHAPTER 3: Number Systems The Architecture of Computer Hardware and Systems Software & Networking: An Information Technology Approach 4th Edition, Irv.
Discovering Computers Fundamentals, Third Edition CGS 1000 Introduction to Computers and Technology Spring 2007.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Data Representation, Number Systems and Base Conversions
Data as the computer sees it 1.  Number systems Number systems  Data storage Data storage  Glossary Glossary 2.
Systems Architecture, Fourth Edition 1 Data Representation Chapter 3.
CHAPTER 3: Number Systems
Chapter Two Hardware Basics: Inside the Box ©1999 Addison Wesley Longman2.2 Chapter Outline What Computers Do A Bit About Bits The Computer’s Core: CPU.
Data Representation Automated data Processing Binary Data representation Mathematical operations Boolean Algebra Hexadecimal Notation.
The purpose of a CPU is to process data Custom written software is created for a user to meet exact purpose Off the shelf software is developed by a software.
1 Chapter 1: Basic Concepts Assembly Language for Intel-Based Computers, 4th edition Kip R. Irvine 9/6/2003.
Chapter 3 Data Representation
Chapter 1: Introduction to Computers and Programming
Number Systems & Binary Arithmetic
Topic: Binary Encoding – Part 1
Invitation to Computer Science, C++ Version, Fourth Edition
Chapter 3 - Binary Numbering System
Assembly Language for x86 Processors 6th Edition
Binary Notation and Intro to Computer Graphics
Course Developer/Writer: A. J. Ikuomola
Computer Organisation
Assembly Language (CSW 353)
Data Representation Binary Numbers Binary Addition
ENEL 111 Digital Electronics
Chapter 6: Data Types Lectures # 10.
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Digital Electronics Jess 2008.
Ch. 8 File Structures Sequential files. Text files. Indexed files.
The Central Processing Unit
EPSII 59:006 Spring 2004.
Chapter 2 – Computer hardware
A Closer Look at Instruction Set Architectures
Invitation to Computer Science, Java Version, Third Edition
Chapter 1: Introduction to Computers and Programming
Chapter 11: File System Implementation
Disk Storage, Basic File Structures, and Hashing
Chapter One: Introduction
Hash Tables.
MSIS 670: Object-Oriented Software Engineering
Digital Systems and Binary Numbers
File Storage and Indexing
Data Representation and Organization
Chapter Four Data Representation in Computers By Bezawit E.
Chapter 14: File-System Implementation
Networks & I/O Devices.
Chapter 3 - Binary Numbering System
ENEL 111 Digital Electronics
CHAPTER 69 NUMBER SYSTEMS AND CODES
Computer Organization
Presentation transcript:

Chapter 3 Data Representation

Chapter 3 Data Representation Chapter Outline Data Representation and Processing Automated Data Processing Binary Data Representation Goals of Computer Data Representation CPU Data Types Integer Real number Character Boolean Memory address Technology Focus: Intel Memory Address Format Data Structures

Chapter Goals Describe numbering systems and their use in data representation Compare and contrast various data representation methods Describe how nonnumeric data is represented Describe common data structures and their uses

Data Representation and Processing Capabilities required of any data/information processor–organic, mechanical, electrical, optical: Recognizing external data and converting it to an appropriate internal format Storing and retrieving data internally Transporting data among internal storage and processing components Manipulating data to produce desired results or decisions

Automated Data Processing Data is converted from native format into a form suitable for the processing device Computers represent data electrically and process it with electrical switches Laws of electricity can be stated as mathematical equations Electronic devices perform computational functions embedded in the equations

A + B = C Example Circuit

Binary Data Representation Binary number Only one of two possible values (0 or 1) per digit Reliably transported among computer system components Can be processed by two–state electrical devices (relatively easy to design and fabricate) Correspond directly with values in Boolean logic

Hexadecimal Notation Uses 16 as its base or radix (hex = 6, and decimal = 10) Compact; advantage over binary notation Often used to designate memory addresses

Hexadecimal Notation

Octal Notation Uses base 8 numbering system Has a range of digits from 0 to 7 Expresses large numeric values in: One-third the length of corresponding binary notation Double the length of corresponding hexadecimal notation

Goals of Computer Data Representation Computer data formats are subject to trade-offs between several factors, including Compactness Accuracy Range Ease of manipulation Standardization Cost

Goals of Data Representation Compactness (Size) Describes number of bits used to represent a numeric value Trade-off: hardware cost vs. range of values Fewer bits limits the range of values that can be represented More bits requires increased cost in computer hardware to represent numbers 216 = 65,53510 232 = 4,294,967,29610 264 = 18,446,744,073,709,551,61610

Goals of Data Representation Accuracy (Precision) Precision of representation increases with number of data bits used Trade-off: hardware cost vs. precision Fewer bits limits the precision of values that are represented More bits requires increased cost in computer hardware to represent numbers precisely Calculations can easily produce numbers too big or too small to represent precisely So, they are represented as approximations that have a predictable error

Goals of Data Representation Ease of Manipulation Machine efficiency increases when processing shorter and simpler numeric formats Trade-off: processing time vs. precision Processor efficiency depends on its complexity Shorter and simpler formats require simpler circuitry More precise formats require increased cost in computer hardware to process instructions

Goals of Data Representation Standardization Standardized data formats increases speed and accuracy of data communications Trade-off: processing time vs. networking The most efficient circuitry may require non-standard data formats To share information between a wide variety of devices, standardized data formats need to be used

CPU Data Types Primitive data types Integer Real number Character Boolean Memory address Representation format for each type balances compactness, accuracy, ease of manipulation, and standardization

Memory Addresses Identifying numbers of memory bytes in primary storage Simple or complex numeric values depending on memory model used by CPU Flat memory addresses single integer Segmented memory addresses multiple integers requires definition of specific coding format

Intel Memory Address Formats 8088 20-bit memory addresses 4-bit segment identifier 16-bit segment offset 80286 24-bit memory addresses 8-bit segment identifier 80386 32-bit memory addresses 16-bit segment identifier 80486 Pentium

Data Structures Related groups of primitive data elements organized for a type of common processing Defined and manipulated within software Many use pointers to link primitive data components

Commonly Used Data Structures arrays linked lists records tables files indices objects

One Address Finds Many Data Elements

Pointers and Addresses Data element that contains the address of another data element Address Location of a data element within a storage device

Arrays and Lists List A set of related data values Array An ordered list in which each element can be referenced by an index to its position

A simple array is used to store words

Linked Lists Data structures that use pointers so list elements can be scattered among nonsequential storage locations Singly linked lists Doubly linked lists Easier to expand or shrink than an array

A Singly Linked List

A Singly Linked List

Editing An Array

Editing A Singly Linked List

A Doubly Linked List

Records and Files Records Data structures composed of other data structures or primitive data elements Used as a unit of input and output to files Files Sequence of records on secondary storage

A Record Data Structure

Methods of Organizing Files Sequential Stores records in contiguous storage locations Indexed An array of pointers to records Efficient record insertion, deletion, and retrieval

An Indexed File

Classes and Objects Classes Data structures that contain traditional data elements and programs that manipulate that data Combine related data items and extend the record to include methods that manipulate the data items Objects One instance, or variable, of the class

A Class of Objects

Summary How data is represented and stored within computer hardware How simple data types are used as building blocks to create more complex data structures (e.g., arrays, records) Understanding data representation is key to understanding hardware and software technology

Chapter Goals Describe numbering systems and their use in data representation Compare and contrast various data representation methods Describe how nonnumeric data is represented Describe common data structures and their uses