©Brooks/Cole, 2003 Chapter 2 Data Representation.

Slides:



Advertisements
Similar presentations
Number Systems and Codes
Advertisements

Information Representation
3.1 3 Data Storage Foundations of Computer Science  Cengage Learning.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Binary Expression Numbers & Text CS 105 Binary Representation At the fundamental hardware level, a modern computer can only distinguish between two values,
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Fourth Edition.
2.1 2 Number Systems Foundations of Computer Science  Cengage Learning.
Chapter 5 Data representation.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Chapter 2 Data Representation. Define data types. Visualize how data are stored inside a computer. Understand the differences between text, numbers, images,
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Chapter 3 Number Representation. Convert a number from decimal 、 hexadecimal,octal to binary notation and vice versa. Understand the different representations.
Bits & Bytes: How Computers Represent Data
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Representing Information Digitally. Digitization Initially transforming data for computer use Assigning people social security numbers The creation of.
Chapter 1 Data Storage(2) Yonsei University 1 st Semester, 2014 Sanghyun Park.
Module Code: CU0001NI Technical Information on Digital Images Week -2.
Representing Nonnumeric Data Everything is really a number.
1 Number SystemsLecture 8. 2 BINARY (BASE 2) numbers.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
Chapter 2 Data and Number Representations
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
Representing Data. Representing data u The basic unit of memory is the bit  A transistor that can hold either high or low voltage  Conceptually, a tiny.
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
1 Foundations of Computer Science Chapter 2 Data Representation.
Number systems & Binary codes MODULE 1 Digital Logic Design Ch1-2 Outline of Chapter 1  1.1 Digital Systems  1.2 Binary Numbers  1.3 Number-base Conversions.
©Brooks/Cole, 2003 Chapter 3 Number Representation.
Number Systems and Codes
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.
Quiz # 1 Chapters 1,2, & 3.
CPIT 201 Introduction to Computing
Chapter 2 Data Representation.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Data Representation, Number Systems and Base Conversions
DATA REPRESENTATION CHAPTER DATA TYPES Different types of data (Fig. 2.1) The computer industry uses the term “MULTIMEDIA” to define information.
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Marwan Al-Namari 1 Digital Representations. Bits and Bytes Devices can only be in one of two states 0 or 1, yes or no, on or off, … Bit: a unit of data.
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 Representation.
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 2 Lecture 2 – Digital Representations.
Binary 101 Gads Hill School. Aim To strengthen understanding of how computers use the binary number system to store information.
Computer Studies Today Chapter 19 1 Chapter 19. Computer Studies Today Chapter 19 2 »Information stored in a computer is in two states: –ON –OFF.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
Fundamentals of Data Representation Yusung Kim
DATA Unit 2 Topic 2. Different Types of Data ASCII code: ASCII - The American Standard Code for Information Interchange is a standard seven-bit code that.
Computers: Information Technology in Perspective By Long and Long Copyright 2002 Prentice Hall, Inc. Encoding J. Holvikivi 2012.
Lecture Coding Schemes. Representing Data English language uses 26 symbols to represent an idea Different sets of bit patterns have been designed to represent.
1 Section 1.3 Binary Number Systems Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Storing Graphics Nat 5 Data Representation Lesson 4a: Storing Graphics
Invitation to Computer Science, C++ Version, Fourth Edition
Number Systems and Codes
3 Data Storage Foundations of Computer Science ã Cengage Learning.
What is a byte? What is it? How would you use it?
Lecture 3: Binary values and number systems
CHAPTER 1 : INTRODUCTION
Chapter 3 Data Storage.
Bits & Bytes How Computers Represent Data
Number Systems Lab session 1 Xuan Guo.
Representing Nonnumeric Data
Number Systems and Codes
Ch2: Data Representation
Chapter 2 Data Representation.
Chapter 2: Number Systems
Data Representation Chapter 2 Computer HW (Von Neumann Model) Program
Learning Intention I will learn how computers store text.
Computer Systems Nat 4/5 Data Representation Lesson 4:
Chapter 3 - Binary Numbering System
Presentation transcript:

©Brooks/Cole, 2003 Chapter 2 Data Representation

©Brooks/Cole, 2003 Define data types. Visualize how data are stored inside a computer. Understand the differences between text, numbers, images, video, and audio. After reading this chapter, the reader should be able to: O BJECTIVES Work with hexadecimal and octal notations.

©Brooks/Cole, 2003 DATA TYPES 2.1

©Brooks/Cole, 2003 Figure 2-1 Different types of data

©Brooks/Cole, 2003 The computer industry uses the term “multimedia” to define information that contains numbers, text, images, audio, and video. Note:

©Brooks/Cole, 2003 DATA INSIDE THE COMPUTER DATA INSIDE THE COMPUTER 2.2

©Brooks/Cole, 2003 A bit is the smallest unit of data that can be stored in a computer. It is either 0 or 1. Bit pattern: Byte: a bit pattern of length 8 Figure 2-2 Bit, Bit pattern, and Byte

©Brooks/Cole, 2003 Figure 2-3 Examples of bit patterns

©Brooks/Cole, 2003 REPRESENTINGDATAREPRESENTINGDATA 2.3

Data type representation Text Codes Numbers Images Bitmap Graphic Vector Graphic Audio Video

©Brooks/Cole, 2003 Figure 2-4 Representing symbols using bit patterns Text: example

©Brooks/Cole, 2003 Table 2.1 Number of symbols and bit pattern length Number of Symbols Number of Symbols … … 65,536 Bit Pattern Length Bit Pattern Length … 7 8 … 16

©Brooks/Cole, 2003 ASCII: American Standard Code for Information Interchange (Appendix A) Some features of ASCII code (P. 18) Figure 2-5 Representation of the word “BYTE” in ASCII code

©Brooks/Cole, 2003 Images: bitmap graphic and vector graphics Figure 2-6 Image representation methods

©Brooks/Cole, 2003 Figure 2-7 Bitmap graphic method of a black-and-white image

©Brooks/Cole, 2003 Figure 2-8 Representation of color pixels

©Brooks/Cole, 2003 Vector Graphics The problem of the bitmap graphic method: Difficult to rescale the image Vector graphic method: An image is decomposed into a combination of curves and line. Each curve or line is represented by a mathematical formula.

©Brooks/Cole, 2003 Figure 2-9 Audio representation

©Brooks/Cole, 2003 Audio Sampling means measuring the value of the signal at equal intervals. Quantization means assigning a value to a sample (i.e to 29). Coding means changing the quantized values to binary patterns.

©Brooks/Cole, 2003 Video Video is a representation of images (frames) in time. Example: a movie Method: MPEG

©Brooks/Cole, 2003 HEXADECIMALNOTATIONHEXADECIMALNOTATION 2.4

A 4-bit pattern can be represented by a hexadecimal digit, and vice versa. Note:

©Brooks/Cole, 2003 Table 2.2 Hexadecimal digits Bit Pattern Bit Pattern Hex Digit Hex Digit Bit Pattern Bit Pattern Hex Digit Hex Digit A B C D E F

©Brooks/Cole, 2003 Figure 2-10 Binary to hexadecimal and hexadecimal to binary transformation

©Brooks/Cole, 2003 Example 1 Show the hexadecimal equivalent of the bit pattern Solution Each group of 4 bits is translated to one hexadecimal digit. The equivalent is xCE2.

©Brooks/Cole, 2003 Example 2 Show the hexadecimal equivalent of the bit pattern Solution Divide the bit pattern into 4-bit groups (from the right). In this case, add two extra 0s at the left to make the number of bits divisible by 4. So you have , which is translated to x0E2.

©Brooks/Cole, 2003 Example 3 What is the bit pattern for x24C? Solution Write each hexadecimal digit as its equivalent bit pattern to get

©Brooks/Cole, 2003 OCTALNOTATIONOCTALNOTATION 2.5

A 3-bit pattern can be represented by an octal digit, and vice versa. Note:

©Brooks/Cole, 2003 Table 2.3 Octal digits Bit Pattern Bit Pattern Oct Digit Oct Digit Bit Pattern Bit Pattern Oct Digit Oct Digit

©Brooks/Cole, 2003 Figure 2-11 Binary to octal and octal to binary transformation

©Brooks/Cole, 2003 Example 4 Show the octal equivalent of the bit pattern Solution Each group of 3 bits is translated to one octal digit. The equivalent is 0562, o562, or

©Brooks/Cole, 2003 Example 5 Show the octal equivalent of the bit pattern Solution Divide the bit pattern into 3-bit groups (from the right). In this case, add two extra 0s at the left to make the number of bits divisible by 3. So you have , which is translated to

©Brooks/Cole, 2003 Example 6 What is the bit pattern for 24 8 ? Solution Write each octal digit as its equivalent bit pattern to get

©Brooks/Cole, 2003 Key Terms ASCII Analog Binary digit Binary system Bit Bitmap graphic Bit pattern Byte Code Digital Hexadecimal notation Image Octal notation Picture element Pixel Quantization Sampling Switch Text Vector graphic Video