Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information Technology Islamic.

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

1 Chapter 2 The Digital World. 2 Digital Data Representation.
Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
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.
2 pt 3 pt 4 pt 5pt 1 pt 2 pt 3 pt 4 pt 5 pt 1 pt 2pt 3 pt 4pt 5 pt 1pt 2pt 3 pt 4 pt 5 pt 1 pt 2 pt 3 pt 4pt 5 pt 1pt Category1 Computers Category2 CPU.
Data Representation Computer Organization &
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third & Fourth Edition Spring 2008:
Data Representation COE 205
Connecting with Computer Science, 2e
Chapter 1: Data Storage.
Storage of Bits Computers represent information as patterns of bits
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
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.
Computer SCIENCE Data Representation and Machine Concepts Section 1.3
Bits and Data Storage. Basic Hardware Units of a Computer.
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.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
Programmable Logic Controllers
Lecture 5.
Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as.
Computers Organization & Assembly Language
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.
HARDWARE: CPU & STORAGE How to Buy a Multimedia Computer System.
Copyright © 2003 by Prentice Hall Module 5 Central Processing Unit 1. Binary representation of data 2. The components of the CPU 3. CPU and Instruction.
Pengantar Teknologi Informasi dan Ilmu Komputer Information Technology and Data Representation PTIIK- UB.
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
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.
Chapter 1: Data Storage.
1 Introduction to Computers By Masseta ICT Dept. Mzumbe University.
Islamic University Of Gaza, Nael Aburas Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
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.
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.
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Lecture 5: 9/10/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
Representing Sound and Image. Representing images One mean of representing an image it to interpret the image as a collection of dots, each is called.
09/06/ Data Representation ASCII, Binary Denary Conversion, Integer & Boolean data types.
Chapter 1: Data Storage.
Department of Computer Science Georgia State University
Computer Science: An Overview Eleventh Edition
3 – Boolean Logic and Logic Gates 4 – Binary Numbers
Invitation to Computer Science, C++ Version, Fourth Edition
Lec 3: Data Representation
Everything is a number Everything in a computer memory and on storages is a number. Number  Number Characters  Number by ASCII code Sounds  Number.
3.1 Denary, Binary and Hexadecimal Number Systems
Invitation to Computer Science, Java Version, Third Edition
Invitation to Computer Science, C++ Version, Third Edition
Chapter 1 Data Storage.
Main memory and mass storage
Ch2: Data Representation
The Building Blocks: Binary Numbers, Boolean Logic, and Gates
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
CHAPTER 69 NUMBER SYSTEMS AND CODES
Presentation transcript:

Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information Technology Islamic University of Gaza Islamic University Of Gaza, Nael Aburas1

Outline Introduction Bits and their storage Boolean operations Gates Main memory Memory organization Mass storage Islamic University Of Gaza, Nael Aburas2

Introduction We begin our study of computer science by considering how information is encoding and stored inside computers Islamic University Of Gaza, Nael Aburas3

Bits and their storage Inside the computers information is encoded as patterns of 0s and 1s. These digits are called bits (binary digits). bits are used to represent: ◦ Numeric values ◦ Characters ◦ Images ◦ Sounds Islamic University Of Gaza, Nael Aburas4

Boolean operations bit 0 represent the value false bit 1 represent the value true Operations that manipulate true/false values are called Boolean operations. basic Boolean operations are: ◦ AND, OR, and XOR (exclusive or) There is also NOT Islamic University Of Gaza, Nael Aburas5

Boolean operations AND, OR, and XOR operators take two operands, but the NOT operator takes a single operand ◦ AND  The AND operator performs logical conjunction on two Boolean expressions.  If both expressions are equal to true (1), then the AND return true, otherwise all other cases should produce an output False (0) Input1Input2output Truth table Islamic University Of Gaza, Nael Aburas6

Boolean operations OR The OR operator performs logical disjunction on two Boolean expressions. OR operator returns true value when at least one of their Boolean expression is equal to true. Input1Input2output Truth table Islamic University Of Gaza, Nael Aburas7

Boolean operations XOR (exclusive or) XOR performs logical exclusion on two expressions. XOR produce an output of 1 (true) when one of its inputs is 1 and the other is 0 (In short, the XOR operation produces an output of 1 when its input are different) Input1Input2output Truth table Islamic University Of Gaza, Nael Aburas8

Boolean operations NOT The operation NOT is another Boolean operation. It differs from AND, OR, and XOR because it has only one input. Its output is the opposite of that input. InputOutput Truth table Islamic University Of Gaza, Nael Aburas9

Gates and Flip-flops Gate is a device that produces the output of a Boolean operation. Its often implemented as (small) electronic circuits, in which the digits 0 and 1 are represented as voltage levels. Gates provides the building blocks from which computer are constructed. Islamic University Of Gaza, Nael Aburas10

Gates Islamic University Of Gaza, Nael Aburas11

Exercise What input bit patterns will cause the following circuits to produce an output of 1? Islamic University Of Gaza, Nael Aburas12

Main memory For storing data, a computer contains a large collection of circuits, each capable of storing a single bit. Also known as RAM “Random Access Memory” Islamic University Of Gaza, Nael Aburas13

Memory organization A computer main memory is organized in manageable units called cells. Cell: A unit of main memory (typically 8 bits which is one byte) Each cell’s size equal to eight (8) bits. higher-order end: the left end of the row of bits on the memory lower-order end: the right end most significant bit: the last bit at the high- order end. least significant bit: the bit at the right end. Islamic University Of Gaza, Nael Aburas14

Memory organization Islamic University Of Gaza, Nael Aburas15

Memory organization To identify individual cell in a computer’s main memory, each cell is assigned a unique “name”, called its address. Address: A “name” that uniquely identifies one cell in the computer’s main memory. As shown in Figure Islamic University Of Gaza, Nael Aburas16

Measuring memory capacity Kilobyte = 1024 byte Megabyte = 1024 kilobyte Gigabyte = 1024 megabyte Islamic University Of Gaza, Nael Aburas17

Mass storage Due to the volatility and limited size of a computer’s main memory, most computers have additional memory devices called mass storage (or secondary storage) system. example: magnetic disks, CDs, DVDs, magnetic tapes, and flash drivers. Islamic University Of Gaza, Nael Aburas18

Advantages of mass storage less volatility large storage capacity low cost the ability to remove the storage medium from machine for archival purpose Islamic University Of Gaza, Nael Aburas19

Disadvantages of mass storage It require mechanical motion and therefore require significantly more time to store and retrieve data than a machine’s main memory, where all activities are performed electronically Islamic University Of Gaza, Nael Aburas20

Mass Storage Systems Magnetic Systems ◦ Disk ◦ Tape Optical Systems ◦ CD ◦ DVD Flash Drives Islamic University Of Gaza, Nael Aburas21

Magnetic systems Example: magnetic disk Thin spinning disk with magnetic coating is used to hold data. Read/write heads are placed above and/or below the disk so that as the disk spins, each head traverses a circle, called track. Be repositioning the read/write heads, different concentric tracks can be accessed. Islamic University Of Gaza, Nael Aburas22

Magnetic systems Each track divided into small arcs called sectors on which information is recorded as a continuous string of bits. The location of tracks and sectors are marked magnetically through the format process. Islamic University Of Gaza, Nael Aburas23

Figure 1.9 A magnetic disk storage system Islamic University Of Gaza, Nael Aburas24

Magnetic systems Magnetic disk performance evaluation depends on four criteria's: ◦ Seek time, the time required to move the read/write head from track to another. ◦ Rotation delay (latency time), half -average calculation the time required for the disk to make complete rotation. ◦ Access time, the sum of the seek time and rotation delay. ◦ Transfer rate, the rate at which data can be transferred to/from the disk. Islamic University Of Gaza, Nael Aburas25

Magnetic tape An older from of mass storage Information is recorded on the magnetic coating of a thin tape that is wound on a reel. Taps is mounted in a device called tape drive (read/write). A major disadvantages of it, that moving between different position on tape can be very time-consuming Islamic University Of Gaza, Nael Aburas26

Figure 1.10 Magnetic tape storage Islamic University Of Gaza, Nael Aburas27

Optical system Another class of mass storage. CD, consists of reflective material covered with a clear protective coating Information is recorded by creating variations in their reflective surfaces Information retrieved by laser beam that monitors irregularities on the reflective surface Islamic University Of Gaza, Nael Aburas28

Digital Versatile Disks (DVD) Traditional CDs have capacity in range 600 to 700MB. Digital Versatile Disks (DVD), constructed from multiple, semi-transparent layers that serves as distinct surface when viewed by a precisely focused laser. Islamic University Of Gaza, Nael Aburas29

Flash drivers In mass storage, data storage and retrieval is slow compared to the speed of electronic circuitry. Flash memory has the potential of solving this drawback. Bits are stored by sending electronic signals directly to the storage medium Islamic University Of Gaza, Nael Aburas30

File storage File: A unit of data stored in mass storage system ◦ data stored in a mass storage system is conceptually grouped into large unit called files ◦ Files stored on a magnetic disk must be manipulated by sector. ◦ A block of data conforming to the specific characteristics of a storage device is called a physical record. ◦ A large file stored in a mass storage will consists of many physical record. “the size of the sector” Islamic University Of Gaza, Nael Aburas31

File Storage The nature f a file division is determined by the information represented in the file. ◦ File containing information regarding a company's employee would consists of multiple units. Each consists of information about one employee. ◦ These naturally producing “occurring” blocks of data are called logical records. ◦ Logical record: the nature divisions within the data Islamic University Of Gaza, Nael Aburas32

Islamic University Of Gaza, Nael Aburas33

File Storage Logical record consists of smaller units called fields.  Employee name, address, employee ID, etc. Identifying a field by a key field. Buffer: A memory area used for the temporary storage of data (usually as a step in transferring the data) Islamic University Of Gaza, Nael Aburas34

Representing text Each of different symbol on the text (alphabet letter) is assigned a unique bit patterns the text is then representing as a long string of bits. ◦ ASCII” American standard code for information interchange”: Uses patterns of 7-bits to represent most symbols used in written English text. ◦ Today, it is extended to 8-bits. Islamic University Of Gaza, Nael Aburas35

Figure 1.13 The message “Hello.” in ASCII Islamic University Of Gaza, Nael Aburas36

Representing text Unicode: Uses patterns of 16-bits to represent the major symbols used in languages world side ISO standard: Uses patterns of 32-bits to represent most symbols used in languages world wide Islamic University Of Gaza, Nael Aburas37

Representing Numeric Values Binary notation is a way of representing numeric values using only digits 0 and 1. Islamic University Of Gaza, Nael Aburas38

Representing Numeric Values A number can be represented differently in different systems. For example, the two numbers (2A) 16 and (52) 8 both refer to the same quantity, (42) 10, but their representations are different. Each number system is associated with a base Islamic University Of Gaza, Nael Aburas39

Representing Numeric Values A number represented as: Each digit carries a certain weight based on its position IntegerFraction Islamic University Of Gaza, Nael Aburas40

Binary system In the binary system, there are only two symbols or possible digit values, 0 and 1. This base-2 system can be used to represent any quantity that can be represented in decimal or other number system Islamic University Of Gaza, Nael Aburas41

Binary system 11001) 2 For example, here is ( 11001) 2 in binary (101.11) 2 (101.11) 2 Islamic University Of Gaza, Nael Aburas42

Decimal The decimal system is composed of 10 numerals or symbols. These 10 symbols are 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9; using these symbols as digits of a number, we can express any quantity. The decimal system, also called the base-10 system Islamic University Of Gaza, Nael Aburas43

Decimal system (224) 10 (224) 10 Note that the digit 2 in position 1 has the value 20, but the same digit in position 2 has the value 200 Note that the digit 2 in position 1 has the value 20, but the same digit in position 2 has the value 200 Islamic University Of Gaza, Nael Aburas44

Figure 1.15 The base ten and binary systems Islamic University Of Gaza, Nael Aburas45

Figure 1.16 Decoding the binary representation Islamic University Of Gaza, Nael Aburas46

Exercise Convert each of the following binary representation to its base ten: ◦ 0101 ◦ 1001 ◦ 1011 ◦ 0110 ◦ 1000 ◦ Islamic University Of Gaza, Nael Aburas47

Figure 1.17 An algorithm for finding the binary representation of a positive integer Islamic University Of Gaza, Nael Aburas48

Figure 1.18 Applying the algorithm in Figure 1.15 to obtain the binary representation of thirteen Islamic University Of Gaza, Nael Aburas49

Binary addition To add two integers represented in binary notation, we follow the same procedure in the traditional base ten except that all sums are computed using the following addition fact. Islamic University Of Gaza, Nael Aburas50

Binary addition Islamic University Of Gaza, Nael Aburas51

Binary addition Islamic University Of Gaza, Nael Aburas52

Binary addition Islamic University Of Gaza, Nael Aburas53

Fraction in binary The digit to the right of radix point represent the fractional part. The positions are assigned fractional quantities The first position is assigned the quantity ½ (which is 2 -1 ), and so on Islamic University Of Gaza, Nael Aburas54

Fraction in binary Islamic University Of Gaza, Nael Aburas55

Decimal fraction to binary Covert to base x 2 = =.1 25 x 2 = = x 2 = =.101 Islamic University Of Gaza, Nael Aburas56

Representing images One mean of representing an image it to interpret the image as a collection of dots, each is called pixel. Pixel is a picture element. Each pixel is encoded. Image is represented as a collection encoded pixels. Such collection is called bit map Islamic University Of Gaza, Nael Aburas57

Black and white image Each pixel can be represented by a single bit. For more elaborate black and white picture, each pixel can be represented by a collection of bits. Islamic University Of Gaza, Nael Aburas58

Color image RGB encoding ◦ Each pixel is represented as three color: red, green and blue. ◦ One byte is normally used to represent the intensity of each color. ◦ Three byte of storage are required to represent a single pixel. Islamic University Of Gaza, Nael Aburas59

Representing sounds The most generic method of encoding audio information is to sample the amplitude of the sound wave at regular intervals and record the series of values obtained. Sound waves rises in amplitude, falls, rises at a higher level, and then drop back to 0. The voice at one end of the communication is encoded as numeric values representing the amplitude of the voice. The numeric values can be then transmitted over the communication line to the receiving end. Islamic University Of Gaza, Nael Aburas60

Storing integers Two’s complement Notation, excess notation are used for representing integer values in computing equipment. Islamic University Of Gaza, Nael Aburas61

Two’s complement Notation The most popular system within today’s computer. system in which negative numbers are represented by the two's complement of the absolute value Used a fixed number of bits to represent each of the values in the system. In today’s equipment, it is common to represent by a pattern of 32 bits which allows a wide range of numbers to be represented. Islamic University Of Gaza, Nael Aburas62

Figure 1.21 Two’s complement notation systems Islamic University Of Gaza, Nael Aburas63

Two’s complement Notation The leftmost bit of a bit pattern represent the sign of the value. ◦ “1” represent the negative sign. ◦ “0” represent the positive sign The complement of a pattern is the pattern obtained by changing all the 0s to1s and all the 1s to 0s. Islamic University Of Gaza, Nael Aburas64

Coding the value using Two’s complement Representing negative value ◦ Copy the original pattern from the right to left until a 1 has been copied, then complement the remaining bits until the final bit pattern. Islamic University Of Gaza, Nael Aburas65

Example of encoding value Islamic University Of Gaza, Nael Aburas66

Addition in two’s complement Islamic University Of Gaza, Nael Aburas67

Addition in two’s complement To add values represented in two’s complement, we apply the same way that we used for binary. The answer must be in the same length, this means that any extra bit generated at the left of the answer by a final carry must be truncated. Islamic University Of Gaza, Nael Aburas68

The problem of overflow When using the two’s complement with pattern with four bits, the largest positive integer that can be represented is 7 and the most negative integer is -8. We can’t obtain the correct answer to the problem 5+4. This is called overflow problem Overflow is the problem that occurs when a computation produces a value that falls outside the range of values that can be represented. Islamic University Of Gaza, Nael Aburas69

Excess notation Another method of representing integers values As in two’s complement, each of the values is represented by a bit patterns of the same length. The difference between an excess system and two’s complement id that the sign bits are reversed. Islamic University Of Gaza, Nael Aburas70

Figure 1.24 An excess eight conversion table Islamic University Of Gaza, Nael Aburas71

Figure 1.25 An excess notation system using bit patterns of length three Islamic University Of Gaza, Nael Aburas72