Chapter 1 Data Storage.

Slides:



Advertisements
Similar presentations
Lecture # 7. Topics Storage Techniques of Bits Storage Techniques of Bits Mass Storage Mass Storage Disk System Performance Disk System Performance File.
Advertisements

The Binary Numbering Systems
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, Java Version, Third Edition.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Chapter 3 Data Representation.
Chapter 1: Data Storage.
Chapter 3 Data Representation. Chapter goals Describe numbering systems and their use in data representation Compare and contrast various data representation.
Storage of Bits Computers represent information as patterns of bits
Figure 0.3: Jacquard’s loom. Figure 0.4: The Mark I computer.
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.
Chapter 1 Data Storage(1) Yonsei University 1 st Semester, 2015 Sanghyun Park.
Bits and Data Storage. Basic Hardware Units of a Computer.
Copyright © 2015 Pearson Education, Inc. Chapter 1: Data Storage.
1 Part I: Machine Architecture 4 A major process in the development of a science is the construction of theories that are confirmed or rejected by experimentation.
Lecture 5.
CSCE 106 Fundamentals of Computer Science Assisting Slides The American University in Cairo Computer Science and Engineering Department.
Chapter 1 Data Storage(2) Yonsei University 1 st Semester, 2014 Sanghyun Park.
INTRODUCTION TO COMPUTING Course Instructor: Asma Sanam Larik.
Pengantar Teknologi Informasi dan Ilmu Komputer Information Technology and Data Representation PTIIK- UB.
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.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
Lecture 5. Topics Sec 1.4 Representing Information as Bit Patterns Representing Text Representing Text Representing Numeric Values Representing Numeric.
1 i206: Lecture 2: Computer Architecture, Binary Encodings, and Data Representation Marti Hearst Spring 2012.
Chapter 1: Data Storage.
Compsci Today’s topics l Binary Numbers  Brookshear l Slides from Prof. Marti Hearst of UC Berkeley SIMS l Upcoming  Networks Interactive.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
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.
Computer Data Storage (Internal Representation) Fall 2011.
Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information Technology Islamic.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Copyright © 2015 Pearson Education, Inc. Chapter 1: Data Storage.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
More on data storage and representation CSC 2001.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Copyright © 2012 Pearson Education, Inc. Chapter 1: Data Storage Computer Science: An Overview Eleventh Edition by J. Glenn Brookshear.
Chapter 1: Data Storage.
Department of Computer Science Georgia State University
Binary and Hard Disk PEOPLE Program
Computer Science: An Overview Eleventh Edition
3 – Boolean Logic and Logic Gates 4 – Binary Numbers
Invitation to Computer Science, C++ Version, Fourth Edition
COMPUTER SCIENCE AN OVERVIEW.
Topics Introduction Hardware and Software How Computers Store Data
Chapter 3 Data Storage.
Invitation to Computer Science, Java Version, Third Edition
CMSC 100 From the Bottom Up: It's All Just Bits
Main memory and mass storage
Chapter One: Introduction
Figure 0.3: Jacquard’s loom
The Building Blocks: Binary Numbers, Boolean Logic, and Gates
CMSC 100 From the Bottom Up: It's All Just Bits
Number Systems Lecture 2.
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
CS149D Elements of Computer Science
Networks & I/O Devices.
Chapter 1: Data Storage 1.1 Bits and Their Storage 1.2 Main Memory
Computer Science An Overview
Presentation transcript:

Chapter 1 Data Storage

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.5 The Binary System 1.6 Storing Integers © 2005 Pearson Addison-Wesley. All rights reserved

Chapter 1: Data Storage (continued) 1.7 Storing Fractions 1.8 Data Compression 1.9 Communications Errors © 2005 Pearson Addison-Wesley. All rights reserved

Bits and their meaning Bit = Binary Digit = a symbol whose meaning depends on the application at hand. Some possible meanings for a single bit Numeric value (1 or 0) Boolean value (true or false) Voltage (high or low) © 2005 Pearson Addison-Wesley. All rights reserved

Bit patterns All data stored in a computer are represented by patterns of bits: Numbers Text characters Images Sound Anything else… © 2005 Pearson Addison-Wesley. All rights reserved

Boolean operations Boolean operation = any operation that manipulates one or more true/false values Can be used to operate on bits Specific operations AND OR XOR NOT © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.1 The Boolean operations AND, OR, and XOR (exclusive or) © 2005 Pearson Addison-Wesley. All rights reserved

Gates Gates = devices that produce the outputs of Boolean operations when given the operations’ input values Often implemented as electronic circuits Provide the building blocks from which computers are constructed © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.2 A pictorial representation of AND, OR, XOR, and NOT gates as well as their input and output values © 2005 Pearson Addison-Wesley. All rights reserved

Flip-flops Flip-flop = a circuit built from gates that can store one bit of data. Has an input line which sets its stored value to 1 Has an input line which sets its stored value to 0 While both input lines are 0, the most recently stored value is preserved © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.3 A simple flip-flop circuit © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.4 Setting the output of a flip-flop to 1 © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.4 Setting the output of a flip-flop to 1 (cont’d) © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.4 Setting the output of a flip-flop to 1 (cont’d) © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.5 Another way of constructing a flip-flop © 2005 Pearson Addison-Wesley. All rights reserved

Other storage techniques Dynamic memory – must be replenished periodically – Example: capacitors Volatile memory – holds its value until the power is turned off – Example: flip-flops Non-volatile memory – holds its value after the power is off – Example: magnetic storage Read-only memory (ROM) – never changes – Examples: flash memory, compact disks © 2005 Pearson Addison-Wesley. All rights reserved

Hexadecimal notation Hexadecimal notation = a shorthand notation for streams of bits. Stream = a long string of bits. Long bit streams are difficult to make sense of. The lengths of most bit streams used in a machine are multiples of four. Hexadecimal notation is more compact. Less error-prone to manually read, copy, or write © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.6 The hexadecimal coding system

Main memory: cells Cells = manageable units (typically 8 bits) into which a computer’s main memory is arranged. Byte = a string of 8 bits. High-order end = the left end of the conceptual row in which the contents of a cell are laid out. Low-order end = the right end of the conceptual row in which the contents of a cell are laid out. Least significant bit = the last bit at the low-order end. © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.7 The organization of a byte-size memory cell © 2005 Pearson Addison-Wesley. All rights reserved

Main memory addresses Address = a “name” to uniquely identify one cell in the computer’s main memory The names for cells in a computer are consecutive numbers, usually starting at zero Cells have an order: “previous cell” and “next cell” have reasonable meanings Random Access Memory = memory where any cell can be accessed independently © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.8 Memory cells arranged by address © 2005 Pearson Addison-Wesley. All rights reserved

Measuring memory capacity: Not quite like the metric system “Kilo-” normally means 1,000; Kilobyte = 210 = 1024 “Mega-” normally means 1,000,000; Megabyte = 220 = 1,048,576 “Giga-” normally means 1,000,000,000; Megabyte = 230 = 1,073,741,824 © 2005 Pearson Addison-Wesley. All rights reserved

Mass Storage Systems Non-volatile; data remains when computer is off Usually much bigger than main memory Usually rotating disks Hard disk, floppy disk, CD-ROM Much slower than main memory Data access must wait for seek time (head positioning) Data access must wait for rotational latency © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.9 A disk storage system © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.10 CD storage format © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.11 A magnetic tape storage mechanism © 2005 Pearson Addison-Wesley. All rights reserved

Files File = the unit of data stored on a mass storage system. Logical record and Field = natural groups of data within a file Physical record = a block of data conforming to the physical characteristics of the storage device. Buffer = main memory area sometimes set aside for assembling logical records or fields of a file © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.12 Logical records versus physical records on a disk © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.13 The message “Hello.” in ASCII © 2005 Pearson Addison-Wesley. All rights reserved

Representing text Each printable character (letter, punctuation, etc.) is assigned a unique bit pattern. ASCII = 7-bit values for most symbols used in written English text Unicode = 16-bit values for most symbols used in most world languages today ISO proposed standard = 32-bit values © 2005 Pearson Addison-Wesley. All rights reserved

Representing numeric values Binary notation – uses bits to represent a number in base two Limitations of computer representations of numeric values Overflow – happens when a number is too big to be represented Truncation – happens when a number is between two representable numbers © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1. 14 The sound wave represented by the sequence 0, 1. 5, 2 © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.15 The base ten and binary systems © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.16 Decoding the binary representation 100101 © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.17 An algorithm for finding the binary representation of a positive integer © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1. 18 Applying the algorithm in Figure 1 Figure 1.18 Applying the algorithm in Figure 1.15 to obtain the binary representation of thirteen © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.19 The binary addition facts © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.20 Decoding the binary representation 101.101 © 2005 Pearson Addison-Wesley. All rights reserved

Representing Integers Unsigned integers can be represented in base two Signed integers = numbers that can be positive or negative Two’s complement notation = the most popular representation Excess notation = another less popular representation © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.21 Two’s complement notation systems © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.22 Coding the value -6 in two’s complement notation using four bits © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.23 Addition problems converted to two’s complement notation © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.24 An excess eight conversion table © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.25 An excess notation system using bit patterns of length three © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.26 Floating-point notation components © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.27 Coding the value 25⁄8 © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.28 Decompressing xyxxyzy (5, 4, x) © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.29 The ASCII codes for the letters A and F adjusted for odd parity © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.30 An error-correcting code © 2005 Pearson Addison-Wesley. All rights reserved

Figure 1.31 Decoding the pattern 010100 using the code in Figure 1.30 © 2005 Pearson Addison-Wesley. All rights reserved