Download presentation
Presentation is loading. Please wait.
Published byGerard Griffith Modified over 9 years ago
1
Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas nras@iugaza.edu.psnras@iugaza.edu.ps Faculty of Information Technology Islamic University of Gaza Islamic University Of Gaza, Nael Aburas1
2
Outline Introduction Bits and their storage Boolean operations Gates Main memory Memory organization Mass storage Islamic University Of Gaza, Nael Aburas2
3
Introduction We begin our study of computer science by considering how information is encoding and stored inside computers Islamic University Of Gaza, Nael Aburas3
4
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
5
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
6
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 000 010 100 111 Truth table Islamic University Of Gaza, Nael Aburas6
7
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 000 011 101 111 Truth table Islamic University Of Gaza, Nael Aburas7
8
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 000 011 101 110 Truth table Islamic University Of Gaza, Nael Aburas8
9
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 01 10 Truth table Islamic University Of Gaza, Nael Aburas9
10
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
11
Gates Islamic University Of Gaza, Nael Aburas11
12
Exercise What input bit patterns will cause the following circuits to produce an output of 1? Islamic University Of Gaza, Nael Aburas12
13
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
14
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
15
Memory organization Islamic University Of Gaza, Nael Aburas15
16
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
17
Measuring memory capacity Kilobyte = 1024 byte Megabyte = 1024 kilobyte Gigabyte = 1024 megabyte Islamic University Of Gaza, Nael Aburas17
18
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
19
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
20
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
21
Mass Storage Systems Magnetic Systems ◦ Disk ◦ Tape Optical Systems ◦ CD ◦ DVD Flash Drives Islamic University Of Gaza, Nael Aburas21
22
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
23
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
24
Figure 1.9 A magnetic disk storage system Islamic University Of Gaza, Nael Aburas24
25
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
26
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
27
Figure 1.10 Magnetic tape storage Islamic University Of Gaza, Nael Aburas27
28
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
29
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
30
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
31
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
32
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
33
Islamic University Of Gaza, Nael Aburas33
34
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
35
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
36
Figure 1.13 The message “Hello.” in ASCII Islamic University Of Gaza, Nael Aburas36
37
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
38
Representing Numeric Values Binary notation is a way of representing numeric values using only digits 0 and 1. Islamic University Of Gaza, Nael Aburas38
39
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
40
Representing Numeric Values A number represented as: Each digit carries a certain weight based on its position IntegerFraction Islamic University Of Gaza, Nael Aburas40
41
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
42
Binary system 11001) 2 For example, here is ( 11001) 2 in binary (101.11) 2 (101.11) 2 Islamic University Of Gaza, Nael Aburas42
43
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
44
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
45
Figure 1.15 The base ten and binary systems Islamic University Of Gaza, Nael Aburas45
46
Figure 1.16 Decoding the binary representation 100101 Islamic University Of Gaza, Nael Aburas46
47
Exercise Convert each of the following binary representation to its base ten: ◦ 0101 ◦ 1001 ◦ 1011 ◦ 0110 ◦ 1000 ◦ 10010 Islamic University Of Gaza, Nael Aburas47
48
Figure 1.17 An algorithm for finding the binary representation of a positive integer Islamic University Of Gaza, Nael Aburas48
49
Figure 1.18 Applying the algorithm in Figure 1.15 to obtain the binary representation of thirteen Islamic University Of Gaza, Nael Aburas49
50
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
51
Binary addition 111010 + 11011 1 111010 + 11011 01 Islamic University Of Gaza, Nael Aburas51
52
Binary addition 1 111010 + 11011 0101 1 111010 + 11011 010101 Islamic University Of Gaza, Nael Aburas52
53
Binary addition 111010 + 11011 1010101 Islamic University Of Gaza, Nael Aburas53
54
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
55
Fraction in binary Islamic University Of Gaza, Nael Aburas55
56
Decimal fraction to binary Covert 0.625 to base 2 625 x 2 = 1.25.625 =.1 25 x 2 = 0.50.625 =.10.50 x 2 = 1.00.625 =.101 Islamic University Of Gaza, Nael Aburas56
57
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
58
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
59
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
60
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
61
Storing integers Two’s complement Notation, excess notation are used for representing integer values in computing equipment. Islamic University Of Gaza, Nael Aburas61
62
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
63
Figure 1.21 Two’s complement notation systems Islamic University Of Gaza, Nael Aburas63
64
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
65
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
66
Example of encoding value Islamic University Of Gaza, Nael Aburas66
67
Addition in two’s complement Islamic University Of Gaza, Nael Aburas67
68
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
69
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
70
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
71
Figure 1.24 An excess eight conversion table Islamic University Of Gaza, Nael Aburas71
72
Figure 1.25 An excess notation system using bit patterns of length three Islamic University Of Gaza, Nael Aburas72
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.