Presentation is loading. Please wait.

Presentation is loading. Please wait.

DATA REPRESENTATION CHAPTER 2. 2.1 DATA TYPES Different types of data (Fig. 2.1) The computer industry uses the term “MULTIMEDIA” to define information.

Similar presentations


Presentation on theme: "DATA REPRESENTATION CHAPTER 2. 2.1 DATA TYPES Different types of data (Fig. 2.1) The computer industry uses the term “MULTIMEDIA” to define information."— Presentation transcript:

1 DATA REPRESENTATION CHAPTER 2

2 2.1 DATA TYPES

3 Different types of data (Fig. 2.1) The computer industry uses the term “MULTIMEDIA” to define information that contains numbers, text, images, audio and video.

4 If there’re different types of data.. Do we’ve different types of computers for each data type So.. Ex. Is there a computer to process only numbers The Answer is: NO

5 2.2 DATA INSIDE THE COMPUTER

6 DATA Text Images Videos Audio 0101101010100 1010101010101 0101010111010 1011010100100 COMPUTER Bit The smallest unit of data that can be stored in a computer. it is either 0 or 1 1 = ON 0 = OFF

7 BIT PATTERN All data types are transformed into a uniform representation when they are stored in a computer and transformed back to their original form when retrieved. This universal representation is called a bit pattern A Bit pattern made of 16 bits 1000101010111111

8 How does a computer memory know what type of data a stored bit pattern represents The Answer is: It Doesn’t It’s the responsibility of input/output devices or programs

9 Data Coding & Decoding

10 BYTE 1 1 0 0 1 0 1 01 1 0 0 1 0 1 0 Bit Pattern of length 8 = BYTE Bytes used to measure the size of memory or other storage.

11 2.3 REPRESENTING DATA

12 Represent each symbol with bit pattern TEXT

13 How many bit patterns we need to represent the ENGLISH letters The Answer is: 52 bit patterns 26- Uppercase Letters 26- Lowercase Letters

14 TEXT If we’ve an Imaginary language that uses ONLY 4 symbols. What is the bit pattern length we need to represent this language The Answer is: bit pattern of length 2

15 TEXT Bit pattern length# of Symbols 12 24 38 416............ 65,536

16 TEXT Different sets of bit patterns have been designed to represent text symbols Each set is called a CODE

17 ASCII: The American standard code for information interchange. use 7 bit for each symbol Extended ASCII To make the size of each pattern 1 byte ( 8 bits) EBCDIC : Extended binary coded decimal interchange code. Only IBM main frames. Uses 8 bits pattern Unicode uses 16 bits. To represent more symbols for other languages not just English ISO International Organization for Standardization Has designed a code using 32bit pattern Examples of CODES

18 Representing of the word “BYTE” in ASCII code

19 Numbers are representing using the binary system before being stored in the computer memory. as described in Chapter 3. NUMBERS

20 Image representation methods Vector Bitmap IMAGES Image divided into a matrix of PIXELS ( picture elements ) where each pixel is small dot An image is decomposed into a combination of CURVES and LINES.

21 Bitmap IMAGES Example of representing a black & white image using bitmap method

22 Bitmap IMAGES Representation of color pixels using bitmap method (8 bit pattern) BGR 000000000 11111111 00000000011111111000000000 11111111000000000 11111111 RED  GREEN  BLUE  WHITE 

23 Vector IMAGES An image is decomposed into a combination of curves and lines. Each line or curve represented by a mathematical formula. Ex. Representing a LINE by the coordinates of it’s end points

24 IMAGES Which one is better.. Bitmap method OR Vector method

25 VIDEOS Is a representation of images (called FRAMES) in time. A Movie is a series of frames shown one after another to create the illusion of motion

26 If you want to manipulate bit patterns. Is it easy for you to write & remember a long stream of 0's &1's The Answer is: NO That’s why we use Hexadecimal OR Octal notations

27 2.4 HEXADECIMAL NOTATION

28 HEXADEC = 16 IN Greek So.. There are 16 symbols: HEXADECIMAL NOTATION FEDCBA9876543210 A 4- bit pattern can be represented by a hexadecimal digit, and vice versa.

29 Hexadecimal digit Bit Pattern 81000 91001 A1010 B1011 C1100 D1101 E1110 F1111 Hexadecimal digits HEXADECIMAL NOTATION Hexadecimal digit Bit Pattern 00000 10001 20010 30011 40100 50101 60110 70111

30 HEXADECIMAL NOTATION 1 1 1 1 1 1 0 0 1 1 1 0 0 1 0 0 FCE 4 1111110011100100 = xFCE4 “x” to show that the representation is in Hexadecimal

31 Example1: Show the hexadecimal equivalent of the bit pattern 110011100010. HEXADECIMAL NOTATION

32 Example2: What is the bit pattern for x24C? HEXADECIMAL NOTATION

33 2.5 OCTAL NOTATION

34 OCT= 8 IN Greek So.. There are 8 symbols: OCTAL NOTATION 76543210 A 3- bit pattern can be represented by an OCTAL digit, and vice versa.

35 OCTAL digits OCTAL NOTATION Hexadecimal digit Bit Pattern 0000 1001 2010 3011 4100 5101 6110 7111

36 OCTAL NOTATION 1 1 1 1 1 1 0 0 1 1 1 0 0 1 0 0 1634 “o” & “0” to show that the representation is in Octal 74 o176344 1111110011100100 = 0176344 176344 8

37 Example1: Show the octal equivalent of the bit pattern 101110010. OCTAL NOTATION

38 Example2: What is the bit pattern for 24 8 ? OCTAL NOTATION


Download ppt "DATA REPRESENTATION CHAPTER 2. 2.1 DATA TYPES Different types of data (Fig. 2.1) The computer industry uses the term “MULTIMEDIA” to define information."

Similar presentations


Ads by Google