Range Overflow - PowerPoint PPT Presentation

About This Presentation
Title:

Range Overflow

Description:

American Standard Code for Information Interchange (ASCII) Data hardware communications ... Book: Transmission of one character at a time over a single wire ... – PowerPoint PPT presentation

Number of Views:87
Avg rating:3.0/5.0
Slides: 22
Provided by: morrisf
Category:

less

Transcript and Presenter's Notes

Title: Range Overflow


1
Range Overflow
Chapter 3
  • Fixed length of bits to hold numeric data
  • Can hold a maximum positive number (unsigned)

16 Bits
327681638481924096204810245122561286432
168421------------6553510
2
Range Overflow
  • Fixed length of bits to hold numeric data
  • Can hold a maximum positive and negative number
    (signed)

16 Bits
16384819240962048102451225612864321684
21------------/- 3276710
Sign bit not used to hold numeric data
3
Range Overflow
  • Numeric range of an unsigned integer(no sign
    bit all bits used for numeric data)

2n-1
n-1 number of bits
216-1 215 (16 bits 0 through 15)
215 214 213 212 211 210 29 28
27 26 25 24 23 22 21 20
327681638481924096204810245122561286432
168421------------6553510
4
Real Numbers
  • Contains Whole number and fraction
  • Fraction to the right of the radix point
    (decimal position)

100102 / 1002 100.12
5
Real Numbers
  • Contains Whole number and fraction
  • Fraction to the right of the radix point
    (decimal position)

X X X X X X X X X X
X X X X X X 16384 4096
1024 256 128 64 32 16 8 4 2 1
32768 8192 2048 512
4.510
1
0 0 . 1S 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 ½ .52-2 ¼ .25 2-3
1/8 .125 2-4 1/16 .0625
6
Floating Point
(Page 77-79)
  • Contains Whole number and fraction
  • Radix is movable to accommodate extremely large
    positive or negative numbers
  • Radix is not fixed

Sign Exponent Mantissa SEEEEEEEMMMMMMMMM
7
Character Data
(Page 81)
  • Alphabetic letters
  • Numerals
  • Punctuation
  • Special Purpose (,,, ETC.)
  • String a grouping of character data
  • Early Computers
  • Binary Coded Decimal (BCD)
  • 6 bits (Octal)
  • Limited character range
  • Limited memory
  • Slow processors

8
Character Data
(Table Page 83)
  • 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

9
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

10
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
(Page 88)
  • 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

11
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

12
Memory Addresses
  • Flat Memory Model
  • Beginning byte is 0 and continues sequentially
    until the last byte of memory

AddressRegister
13
Memory Addresses
  • 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

AddressRegister
14
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)

15
Pointers
(Page 93)
  • 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

Arrays and Lists
(Page 93)
  • List unordered set of related data
  • Array an ordered set of related data
  • Each element can be referenced specifically for
    its contents

16
Arrays and Lists
  • List unordered set of related data
  • Array an ordered set of related data
  • Each element can be referenced specifically for
    its contents

List(unordered)
Array(ordered)
1.00 8.00 10.00 4.00 5.00 2.00 9.00 3.00 6.00 7.00
1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 10.00
Purchase a 5 hamburgers got to 5th element in
the array
17
Linked Lists
(Page 95)
  • A data structure that uses pointers
  • Element may be scattered do not have to be
    contiguous

6.00
1.00
8.00
5.00
2.00
7.00
9.00
4.00
10.00
3.00
18
Linked Lists
(Page 96)
  • Insert a new element

6.00
1.00
8.00
5.00
2.00
7.00
9.00
4.50
4.00
10.00
3.00
19
Doubly Linked Lists
(Page 97)
  • Each element points to the next element as well
    as the preceding element

6.00
1.00
8.00
5.00
2.00
7.00
9.00
4.00
10.00
3.00
20
Files
(Page 98)
  • 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

Database
  • Records are called Tables
  • Not directly accessible via programming
  • Accesses data through the database engine

21
Object Oriented Programming
(Page 99)
  • 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
Write a Comment
User Comments (0)
About PowerShow.com