Computer Data Storage (Internal Representation) Fall 2011.

Slides:



Advertisements
Similar presentations
Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
Advertisements

The Binary Numbering Systems
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Connecting with Computer Science, 2e
Chapter 3 Data Representation.
Assembly Language and Computer Architecture Using C++ and Java
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
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.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
SIMS-201 Representing Information in Binary. 2  Overview Chapter 3: The search for an appropriate code Bits as building blocks of information Binary.
CMSC 104, Version 9/01 1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
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.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Numbering systems.
Data Representation – Binary Numbers
1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting.
IT253: Computer Organization
Data Types and Representation CS French Chapter 6 + Chapter 7 – Number Bases.
Pengantar Teknologi Informasi dan Ilmu Komputer Information Technology and Data Representation PTIIK- UB.
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
Data Representation.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
Digital Logic Design Lecture 3 Complements, Number Codes and Registers.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
Lecture 5. Topics Sec 1.4 Representing Information as Bit Patterns Representing Text Representing Text Representing Numeric Values Representing Numeric.
Number Systems and Codes. CS2100 Number Systems and Codes 2 NUMBER SYSTEMS & CODES Information Representations Number Systems Base Conversion Negative.
Chapter 1: Data Storage.
Topic 1 – Number Systems. What is a Number System? A number system consists of an ordered set of symbols (digits) with relations defined for addition,
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.
1 Representation of Data within the Computer Oct., 1999(Revised 2001 Oct)
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Data Representation, Number Systems and Base Conversions
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
Computer Math CPS120 Introduction to Computer Science Lecture 4.
 Lecture 2 Processor Organization  Control needs to have the  Ability to fetch instructions from memory  Logic and means to control instruction sequencing.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Machine Architecture and Number Systems
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
CS1Q Computer Systems Lecture 2 Simon Gay. Lecture 2CS1Q Computer Systems - Simon Gay2 Binary Numbers We’ll look at some details of the representation.
CMSC Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number.
MECH1500 Chapter 3.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Computer Math CPS120 Introduction to Computer Science Lecture 7.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Chapter 1: Data Storage.
Binary and Hard Disk PEOPLE Program
Computer Science: An Overview Eleventh Edition
CHAPTER 1 INTRODUCTION TO DIGITAL LOGIC
Chapter 3 Data Storage.
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
Chapter 1 Data Storage.
Fundamentals of Data Representation
How Computers Store Data
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
Chapter Four Data Representation in Computers By Bezawit E.
Machine Architecture and Number Systems
1.6) Storing Integer: 1.7) storing fraction:
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

Computer Data Storage (Internal Representation) Fall 2011

Other Forms of Mass Storage Compact disks –CD-DA (compact disk - digital audio) –CD-ROM (compact disk - read-only memory) 650MB –DVD - ROM (digital versatile disk - read only memory) 10 GB –DVD - RAM (digital versatile disk - random access memory) –Magneto-optical disk (200MB - 4 GB) –Magnetic Tape (25 GB) (typically used for “backing up” systems)

Other Storage Techniques Magnetic cores –Used in very early computers and in military electronics. –Data is not lost when the power is turned off –Magnetic cores aren’t as easily destroyed by an airburst nuclear explosion (EMP) Capacitors –Either charged or discharged –Must be “refreshed” many times per second -- dynamic memory (DRAM)

File Storage and Retrieval Information is stored on mass storage systems as files. i.e. a complete document, image, , etc. Mass storage systems manipulate whole sectors. When referring to this block of information on the disk we call this a physical record. A file will then typically be made up of many physical records (will be recorded over many sectors). Groups of data (files) are then further divided into logical records. Buffer Fragmentation Virtual memory

Machine Architecture ( The ideas which allow us to compute) How do we store information on a piece of Silicon? –Digital versus Analog information –Encoding of data (decimal,binary, hexadecimal) How do we manipulate that data? –i.e. how can we add two numbers

Digital & Analog Information Computers are digital -- What does that mean? Digital information is: –Robust (easy to handle without errors) –Low noise –Example: Digitization of audio Audio digitization software (SoundView for the Mac -- )

The process for digital audio goes something like this: At the recording studio analog signal digitized sound ……… encode to binary |0101|0111|0011|0000|0111|1001|…… record bits on CD “burning” a CD On your CD player read bits on CD |0101|0111|0011|0000|0111|1001|…… decode ……… play sound analog signal

Bit -- “A binary digit” –A “box” which can hold only the values 0 and Bits are easy to store on CDs as tiny pits, or spots, burned by a laser.

Binary Counting one = 1 Out of digits, must carry 101 two, 0 ones = two, 1 one = 3 Out of digits in 2’s column, carry four, 0 twos, 0 ones = four 0 twos 1 one = four, 1 two, 0 one = 6

Binary Numbers for 0-15 decimal

Binary to Integer conversion:

Integer to Binary conversion: figs and 1.16 Step 1: Divide the value by two and record the remainder. Step 2: As long as the quotient obtained is not zero, continue to divide the newest quotient by two and record the remainder. Step 3: Now that a quotient of zero has been obtained, the binary representation of the original value consists of the remainders listed from right to left in the order they were recorded. (This is an algorithm)

Characters Characters correspond to letters or symbols ASCII code look-up table (Appendix A, p. 539) (space) ! “ …..…….. W and so on ……. Hello = | | | | Now we have Unicode 100,000 characters and more.

Storing a bit Storing a bit within a machine requires a device that can be in one of two states. We’ve seen how to do this on a CD, namely with a pit burned by a laser. This, however, is permanent. Furthermore, you can’t flip a bit in order to, say, compute the 2’s complement, or add two binary sequences. A computer must have available a means of both storing a bit and changing it.

More than couple bits Hello Long and confusing - humans can only handle small sets of bits Hexadecimal system allows easier reading of bit patterns –Base 16

Section 1.1: Storage of Bits Is there an easier way to write all those 1’s and 0’s? Yes -- Hexadecimal notation: (base 16) A B C D E F Value 4-bit Hex. Example: 2 byte (16-bit) 0010 | 0111 | 1111 | 0001 | = ? D70B = ?

Hexadecimal con’t bit – – C bit – – C 4 A F bit – – C 4 A F 3 5 D 6

Sect. 1.5 The Binary System Let’s take a closer look at the Binary System Addition Rules of addition see fig. 1.17, p. 45 Adding two numbers using binary patterns (don’t say binary numbers because binary sequences can correspond to characters, which you could add as well) This is a carry, not a “ten”

Storing fractions in binary Radix point Plays the same role as the decimal point in decimal notation Addition is carried out the same as for binary sequences representing integers (just align the radix points).

Sect. Storing Integers (How to represent positive and negative integers at the same time) Two’s Complement Notation –a method compatible with digital circuitry –negative numbers bit If the left most bit is a 1 then it represents a negative number

Examples of 2’s Complement Representation Starting with the binary representation of a positive integer, find the representation of its negative counterpart. –Copy and flip method –1’s Complement and add 1 method Addition in 2’s complement Subtraction in 2’s complement Overflow errors

Storing non-integers We’ve seen how to represent integers (i.e. whole numbers), characters, and fractions by binary sequences. Now we look at how to represent non-integer numbers in binary. Floating point numbers are numbers like or –For larger or smaller numbers we use scientific notation or engineering notation == x 10 5 == E == x == E-4 signmantissa exponent

Floating point numbers (con’t) == x 10 5 == E == x == E-4 signmantissa exponent 8-bit binary sequence The exact way we represent the mantissa and exponent can be complicated. The algorithm used depends on the precision required. Typically we have either 32 or 64-bit sequences. We won’t go into the details here. The binary sequence is broken up into 3 sections.

Sect. : Communication Errors Any time we have multiple computers or multiple devices that are connected by cables, wires or radio waves we must transmit binary sequences in order to transfer information. Environmental factors such as dirt, water, electrical interference (including sunspots!) are unavoidable. These can cause errors to arise in the transmission. What can we do about these errors?

Communication Errors con’t Create a scheme where we can detect errors. Add to this a scheme where we can correct errors.

Parity Bits One way of detecting errors is to add a parity bit to a sequence of bits. For example, consider an odd parity system: –For each binary sequence add one bit. This bit is a 1 if there are an even number of 1’s in the original binary sequence. Make this bit a 0 if there are an odd number of 1’s. –The point is to make every binary sequence have an odd number of 1’s. –After transmission we check the parity of the incoming sequences. If any sequence has an even number of 1’s (even parity) then we encountered an error. Q: If all received sequences have odd parity can we be sure no errors occurred?

Error Correcting Codes Q: Can we correct a message with errors in it even if we don’t know the original message? Yes, to an extent. Hamming distance –First, create a code. This code has the property that every member is represented by a binary sequence that is different from all the other members in a special way. Each member has a Hamming distance of at least 3. The Hamming distance is the number of bits in which two binary sequences differ, column by column. See example. –Second, encode your information using this code. –Transmit your data

Error Correcting Codes, con’t –Decode the data using the code. If any one sequence doesn’t match to a legal binary sequence in the code, an error has occurred. –Finally, to correct the error we compare the received code with the code table. If we find that our received code differs by one bit from a legal sequence then we assume this legal sequence, which represents a certain character, is what was originally sent -- so we substitute it in. –This last step assumes that only 1 error happened. But there are ways of solving this problem too. We can simply increase the Hamming distances between all members of our code. That way we could account for more errors.