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.

Slides:



Advertisements
Similar presentations
1/1/ / faculty of Electrical Engineering eindhoven university of technology Introduction Part 2: Data types and addressing modes dr.ir. A.C. Verschueren.
Advertisements

Assembly Language for Intel-Based Computers, 4 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and.
The Binary Numbering Systems
Lecture - 2 Number systems and computer data formats
Elementary Data Types Prof. Alamdeep Singh. Scalar Data Types Scalar data types represent a single object, i.e. only one value can be derived. In general,
©2004 Brooks/Cole Chapter 2 Variables, Values and Operations.
Representing Information as Bit Patterns
Review Binary –Each digit place is a power of 2 –Any two state phenomenon can encode a binary number –The number of bits (digits) required directly relates.
Chapter 3 Data Representation.
Chapter 3 Data Representation. Chapter goals Describe numbering systems and their use in data representation Compare and contrast various data representation.
Elementary Data Types Scalar Data Types Numerical Data Types Other
Data types and variables
Chapter 1 Data Storage. 2 Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns.
1 Chapter Overview Computer Communication The Computer Bus Objectives  Understand how a computer transmits and receives information.  Explain the principles.
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.
Data Representation in Computers
Introduction to Computing Systems from bits & gates to C & beyond Chapter 2 Bits, Data Types & Operations Integer Representation Floating-point Representation.
Cosc175/data1 Data comprised of constants and variables information stored in memory Each memory location has an address Address - number identifying a.
Numbers and Number Systems
Bits, Nybbles, Bytes, numbers and characters
Computers Organization & Assembly Language
SCSC 311 Information Systems: hardware and software
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Assembly Language for x86 Processors 7th Edition
Input & Output: Console
Machine Instruction Characteristics
Computers Data Representation Chapter 3, SA. Data Representation and Processing Data and information processors must be able to: Recognize external data.
Binary Arithmetic & Data representation
Pengantar Teknologi Informasi dan Ilmu Komputer Information Technology and Data Representation PTIIK- UB.
Data Representation and Computer Arithmetic
Data Representation.
Fill in the blanks: (1) _________ has only two possible values 0 and 1. (2) There are __________bits in a byte. (3) 1 kilobyte of memory space can store.
1 INFORMATION IN DIGITAL DEVICES. 2 Digital Devices Most computers today are composed of digital devices. –Process electrical signals. –Can only have.
Data Representation Dr. Ahmed El-Bialy Dr. Sahar Fawzy.
CS161 Computer Programming Instructor: Maria Sabir Fall 2009 Lecture #1.
Cis303a_chapt04.ppt Chapter 4 Processor Technology and Architecture Internal Components CPU Operation (internal components) Control Unit Move data and.
Chapter 19 Number Systems. Irvine, Kip R. Assembly Language for Intel-Based Computers, Translating Languages English: Display the sum of A times.
CISC1100: Binary Numbers Fall 2014, Dr. Zhang 1. Numeral System 2  A way for expressing numbers, using symbols in a consistent manner.  " 11 " can be.
CSNB374: Microprocessor Systems Chapter 1: Introduction to Microprocessor.
Codes by Dr. Amin Danial Asham. References  Programmable Controllers- Theory and Implementation, 2nd Edition, L.A. Bryan and E.A. Bryan.
Data Representation, Number Systems and Base Conversions
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Monday, January 14 Homework #1 is posted on the website Homework #1 is posted on the website Due before class, Jan. 16 Due before class, Jan. 16.
Computer Science I Storing data. Binary numbers. Classwork/homework: Catch up. Do analysis of image types.
Data Representation.
Systems Architecture, Fourth Edition 1 Data Representation Chapter 3.
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.
Types Chapter 2. C++ An Introduction to Computing, 3rd ed. 2 Objectives Observe types provided by C++ Literals of these types Explain syntax rules for.
Computer Data Formats Microprocessor Course Electrical Engineering Department University of Indonesia.
Nguyen Le CS147.  2.4 Signed Integer Representation  – Signed Magnitude  – Complement Systems  – Unsigned Versus Signed Numbers.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
1 Scalar and composite data Programming Language Design and Implementation (4th Edition) by T. Pratt and M. Zelkowitz Prentice Hall, 2001 Section
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 CE 454 Computer Architecture Lecture 4 Ahmed Ezzat The Digital Logic, Ch-3.1.
Chapter 3 Data Representation
Assembly Language for x86 Processors 6th Edition
Data Representation Binary Numbers Binary Addition
Microprocessor Systems Design I
Chapter 3 Data Storage.
Ch. 8 File Structures Sequential files. Text files. Indexed files.
CS1010 Programming Methodology
Chapter 1 Data Storage.
Chapter 2 Bits, Data Types & Operations Integer Representation
Computer Data Types Basics of Computing.
C1 Number systems.
Chapter 3 - Binary Numbering System
Presentation transcript:

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 X X X Bits Chapter 3

Cis303a_chapt03-2a.ppt Range Overflow X X X X X X X X X X X X X X X X / Fixed length of bits to hold numeric data Can hold a maximum positive and negative number (signed) 16 Bits Sign bit – not used to hold numeric data

Cis303a_chapt03-2a.ppt Range Overflow Numeric range of an unsigned integer (no sign bit – all bits used for numeric data) 2 n-1 n-1 = number of bits X X X X X X X X X X X X X X X X = 2 15 (16 bits – 0 through 15)

Cis303a_chapt03-2a.ppt Real Numbers Contains Whole number and fraction Fraction to the right of the radix point (decimal position) / = Radix (decimal point) =

Cis303a_chapt03-2a.ppt X X X X X X X X X X X X X X X X Real Numbers Contains Whole number and fraction Fraction to the right of the radix point (decimal position) S X X X X X X X X X X X X X X X X. X X X X X X X X X X X X X X X (Page 67) 2 -1 = ½ = = ¼ = = 1/8 = = 1/16 =

Cis303a_chapt03-2a.ppt Floating Point Contains Whole number and fraction Radix is movable to accommodate extremely large positive or negative numbers Radix is not fixed Negative exponent – radix moves to the left the exponent amount 2 -5 xxxxxxxxx. Positive exponent – radix moves to the right the exponent amount 2 5 x.xxxxxxxx Sign Exponent Mantissa SEEEEEEEMMMMMMMMM (Page 77-79)

Cis303a_chapt03-2a.ppt Character Data Alphabetic letters Numerals Punctuation Special Purpose ($,%,&,# ETC.) String: a grouping of character data (Page 81) Early Computers Binary Coded Decimal (BCD) 6 bits (Octal) Limited character range Limited memory Slow processors

Cis303a_chapt03-2a.ppt Character Data Modern computers Extended Binary Coded Decimal Interchange Code (EBCDIC) 8 bits (Hexadecimal) Mainframes American Standard Code for Information Interchange (ASCII) Data hardware communications Printers, displays (monitors) 8 bit format Parity checking – one bit Data – 7 bits Data communications Displayable characters (A-Z, 0-9 etc.) Device control characters Page eject Load/unload CD (Table Page 83)

Cis303a_chapt03-2a.ppt Device Control (Page 84) Serial Transmission: Book: Transmission of one character at a time over a single wire Transmission of one or more bytes of data transmitted one bit after another Data is placed in a buffer in the receiving device Data is acted upon (control character or information data) when the buffer is filled or an Escape character is received (Table 3-6 page 85) Parallel Transmission: Transmission of one or more bytes of data transmitted at the same time along multiple wires Data is placed in a buffer in the receiving device Data is acted upon (control character or information data) when the buffer is filled or an Escape character is received

Cis303a_chapt03-2a.ppt Unicode (Page 87) An attempt to commonize data formation Includes the ASCII character set 16 bit – allows up to 65,536 separate characters/commands International Standards Organization (ISO) Can handle many languages other than English Boolean Data Contains on one of two possible states True False Used with programmatic logic (IF statements) Decision statements Pack data Store boolean results (single bits) into bytes (Page 88)

Cis303a_chapt03-2a.ppt Memory Addresses (Page 89) Contiguous bytes of storage Each byte is addressable (accessible) Non negative address numbers An attempt to commonize data formation Flat Memory Model Beginning byte is 0 and continues sequentially until the last byte of memory Segmented Memory Model Memory divided into sections (pages) Each page has separate address Each byte in a page has an address 9Includes the ASCII character set 16 bit – allows up to 65,536 separate characters/commands International Standards Organization (ISO) Can handle many languages other than English

Cis303a_chapt03-2a.ppt Memory Addresses Flat Memory Model Beginning byte is 0 and continues sequentially until the last byte of memory Address Register

Cis303a_chapt03-2a.ppt Memory Addresses Address Register Segmented Memory Model Memory divided into sections (pages) Each page has separate address Each byte in a page has an address 9Includes the ASCII character set Segment

Cis303a_chapt03-2a.ppt Data Structures Primitive Data types Data types of the CPU Binary strings of bits Programming Data types Character Numeric Data Structure A related group of primitive data elements that is organized for some type of common processing (page 91) Groups of Primitive Data Types assembled by the programmer into usable data strings (alpha or numeric) Character strings, numbers, arrays, records, files System software provides application services to manipulate commonly used Data Structures (i.e. drivers, interfaces) (page 92)

Cis303a_chapt03-2a.ppt Pointers A data element that contains the address (points to) another data element (data or and address) Disk read/writes Blocks (i.e. 512k block) Address ‘points’ to the beginning of the block The driver knows how much data to gather for the read/write (Page 93) Arrays and Lists List: unordered set of related data Array: an ordered set of related data Each element can be referenced specifically for it’s contents (Page 93)

Cis303a_chapt03-2a.ppt Arrays and Lists List: unordered set of related data Array: an ordered set of related data Each element can be referenced specifically for it’s contents List (unordered) Array (ordered) Purchase a 5 hamburgers: got to 5 th element in the array

Cis303a_chapt03-2a.ppt Linked Lists A data structure that uses pointers Element may be scattered – do not have to be contiguous (Page 95)

Cis303a_chapt03-2a.ppt Linked Lists Insert a new element (Page 96) 4.50

Cis303a_chapt03-2a.ppt Doubly Linked Lists Each element points to the next element as well as the preceding element (Page 97)

Cis303a_chapt03-2a.ppt Files Groups of related records Are accessed via a driver for the specific hardware device Are varied in type: sequential, random, indexed Records One element in a file that contains the required information All data is contained in fields (unique positions) pertinent to the data type and information (Page 98) Database ‘Records’ are called Tables Not directly accessible via programming Accesses data through the database engine

Cis303a_chapt03-2a.ppt Object Oriented Programming Is a programming methodology not a language CLASS: data structure that contains both the data and the programming code to manipulate the data METHOD: the programming code to manipulate the data OBJECT: an instance of the CLASS (Page 99) CLASS: Customer OBJECT Instance Customer 1 Methods OBJECT Instance Customer 2 Methods OBJECT Instance Customer 3 Methods