Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Chapter 2 The Digital World. 2 Digital Data Representation.

Similar presentations


Presentation on theme: "1 Chapter 2 The Digital World. 2 Digital Data Representation."— Presentation transcript:

1 1 Chapter 2 The Digital World

2 2 Digital Data Representation

3 3 Binary Code to Circuit States v A system of rules that correlates the elements of one set with the elements of another is called a code. v Electronic circuits either have electricity flowing through them or they don’t. If we assign one number to each of the two possible circuit states, we might get a code like: l 0 = no electricity flow l 1 = electricity flow

4 4 Binary Numbering System The digits 0 and 1 make up the binary numbering system. The binary numbering system is a base-2 system instead of base-10, like our “normal” numbering system.

5 5 Binary Code to Circuit States v The “on” and “off” states of each of the many thousands, even millions, of circuits within a processor are represented by binary digits, or bits. v Since there are only two binary digits (0 and 1), a bit can only have one of two values (0 or 1). v The term digital refers to anything pertaining to bits. v A device that works with data in “bit” form is called a digital device.

6 6 From Real-World to Binary Code v When people describe the world around them, they already use a form of symbolic code - human language. v Human language is comprised of words - which are, in turn, comprised of letter or character symbols. v An individual series of 8 bits used to represent a character is called a byte.

7 7 ASCII Code v One of the most widely used data coding schemes is the (). v One of the most widely used data coding schemes is the American Standard Code for Information Interchange (ASCII). v ASCII code uses a series of either 7 bits (ASCII-7) or 8 bits (ASCII-8). v ASCII is used on microcomputers, mini- computers and digital telecommunications.

8 8 ASCII Example

9 9 EBCDIC Code v The coding scheme commonly used by mainframe computer systems is called (). v The coding scheme commonly used by mainframe computer systems is called Extended Binary Coded Decimal Interchange Code (EBCDIC). v With EBCDIC, each 8-bit byte is divided into two portions - the zone portion and the digit portion.

10 10 EBCDIC Example v The bits in both and the are assigned numeric values based on the binary number system and form the basis for a logical representation of data. v The bits in both the zone portion and the digit portion are assigned numeric values based on the binary number system and form the basis for a logical representation of data.

11 11 Digitizing Images v is. v Digitization is the process of converting black and white or color data into digital information. v v A picture is converted into a grid of dots. Each dot is called a pixel, a contraction of the words picture and element

12 12 Pixels n Different colors or shades of gray can be represented by using a number of bits for each pixel. n The significant features of all of computer coding schemes is that they are digital. They are based upon, or convertible to, a binary code of bits that can be used to turn individual processor circuits “on” and “off”.

13 13 Units of Information

14 14 Objective v Differentiate between the basic units of information (bits, bytes, and words) and order them by size.

15 15 How Does the Computer Understand What You Input? v Because digital computers are made of electronic circuits,  they cannot work directly with characters. Characters can be in the form of alphabetic (letters), numeric (numbers), and other special characters (such as *, $, +, and &), collectively called alphanumeric.  they can only recognize two distinct electrical states - ON or OFF. The on and off states are commonly represented with number 1 and 0, respectively.  various combinations of 1s and 0s can be entered and stored in a computer to represent all the numbers, letters, and symbols.

16 16 How Does the Computer Understand What You Input? (continued) v Figure 2.1 illustrates how information is represented in a computer by a specific combination of 0s and 1s.

17 17 How Does the Computer Understand What You Input? (continued) ONOFFON OFF ON “M” Figure 2.1 Representing Information

18 18 The Basic Units of Information?

19 19 Bit v. v The bit or binary digit, is the smallest unit of information that can be used by the computer and is always either a 0 or a 1. v Each bit represents a single on/off state of a computer circuit. v Computers can not store or retrieve individual bits when transferring information to or from memory. Therefore the computer works with larger elements of information called “bytes” and “words.”

20 20 Word v v Bits are grouped together and handled as a single entity known as a word. v A computer word can be addressed (either stored in or retrieved from memory) while a bit can not. v Depending on the type of computer used and the size of the word, a word may consist of anywhere from 8 to 64 bits. v Because information used by a computer may be either instructions or data, a computer word may represent either instructions or data.   If the word contains data to be processed, it is called a “ data word. ”   If the word contains an instruction, it is called a “ instruction word.”

21 21 Byte v v Words are divided into smaller subunits called “ bytes.” v A byte is usually either one-half or one-quarter the size of the computer word, and is typically 8 bits long. v Bytes, like words, contain a fixed number of bits and are treated as a single unit of information. v A byte is a single character of data. v v The byte is the smallest unit of information that can be addressed.

22 22 v Figure 2.2 illustrates all computer information, whether data or instructions, consists of bits, bytes, and words.

23 23 BIT0 8-BIT BYTE (1/2 WORD) BIT WORD Figure 2.2 Relationship of Bit, Byte, and Word

24 24 Storage and Retrieval of Information

25 25 Objectives 1. Explain how information is stored by differentiating among memory address, memory location, and memory contents. 2. Convert memory sizes, expressed in "k", “M”, and “G” notations, into the exact number of words expressed in decimal notation.

26 26 Memory Structure v Main memory consists of thousands of individual components, or cells, which are referred to as memory “ location.” v Each location is used to store information that the CPU needs for processing or to store the results of the processing. v An individual memory location can hold only one piece of information at a time. v One location can store only a single instruction word or a single data word.

27 27 Memory Structure (continued) v If a particular computer uses “bytes,” then each location will hold only one instruction byte or one data byte. v Every location in main memory is identified by a unique address that has been assigned to it at the time of manufacture. v. v It is important to remember that this address specifies the location, not the contents of the location. v It is similar to a house address which specifies the location of the house rather than identifying the names of the people who might be living there at the time.

28 28 Memory Structure (continued) v Memory addresses are numbers that usually begin at 0 and progress to the highest number required to identify all of the locations within a specific memory. v Because each location has its own unique address, the CPU can go directly to any location in memory and either store a word or retrieve a previously stored word. v v The address of a location can never be changed but the contents of a location can be changed whenever desired.

29 29 Memory Structure (continued) v Figure 2.3 illustrates a portion of main memory and indicates the relationship among a memory location, the address of that location, and the contents of that location.

30 30 Memory Structure (continued) ADDRESS 33 ADD LOCATION 34 CONTENTS Figure 2.3 Segment of Main Memory

31 31 Storage and Retrieving Information v When any memory location is to be used for either storing or retrieving information, the CPU must first specify the address of the location that is to be used. This action is referred to as addressing memory. v Once a memory location has been addressed, information can be moved into the specified location for storage.   Whenever new information is stored in a memory location, it replaces (or destroys ) the previous contents of that location.

32 32 Storage and Retrieving Information (continued) v When the CPU wants to retrieve information from memory, it addresses the memory location and removes the contents. v v During retrieval operations, the contents of that location are not destroyed. v v During stored operations, the contents of that location are destroyed.

33 33 Memory Size v The byte is the basic unit for measuring the size of the memory. v Computer memories are available in many different sizes. v Memory size refers to the that can be stored in a specific memory. v Memory size refers to the total number of bytes that can be stored in a specific memory. v Because one location can be used to store one byte, memory size also refers to the in memory. v Because one location can be used to store one byte, memory size also refers to the total number of locations in memory.

34 34 Memory Size (continued) v Memory size for most computers is measured in v Memory size for most computers is measured in Kilobytes ( KB ) and Megabytes ( MB ). K = 2 10 = 1024 bytes M = 2 20 = 1,048,576 bytes v It is a common practice to round off “K” to 1,000, “M” to 1,000,000. v The memory size of some high-end mainframes and supercomputers are measured in, about one billion bytes, and Terabytes (), about one trillion bytes. v The memory size of some high-end mainframes and supercomputers are measured in Gigabytes ( GB ), about one billion bytes, and Terabytes ( TB ), about one trillion bytes.

35 35 Memory Size (continued) v GB and TB are used in reference to high-capacity secondary storage. v It is important to remember that each memory location is assigned a unique address. v 32K memory has approximately 32,000 locations (addresses). v 32K memory has actually 32,786 locations (addresses).


Download ppt "1 Chapter 2 The Digital World. 2 Digital Data Representation."

Similar presentations


Ads by Google