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.

Slides:



Advertisements
Similar presentations
Information Representation
Advertisements

Technology ICT Option: Data Representation. Data Representation In our everyday lives, we communicate with each other using analogue data. This data takes.
1 Chapter 2 The Digital World. 2 Digital Data Representation.
The Binary Numbering Systems
Representing Data, Pictures, Time, and Size in Computer
Connecting with Computer Science, 2e
Binary 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.
March 2006Taner Erig - EMU2-1 Metamorphosis of Information How is information represented and how do computers store information?
Data Representation (in computer system) Computer Fundamental CIM2460 Bavy LI.
CHARACTERS Data Representation. Using binary to represent characters Computers can only process binary numbers (1’s and 0’s) so a system was developed.
Management Information Systems Lection 06 Archiving information CLARK UNIVERSITY College of Professional and Continuing Education (COPACE)
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Digital Information Technology
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 
BR 8/99 Digital Devices Integrated Circuits that operate on Digital Data are in 95% of every electrical powered device in the U.S. The theory of operation.
Binary Numbers and ASCII and EDCDIC Mrs. Cueni. Data Representation  Human speech is analog because it uses continuous signals (waves) that vary in strength.
Computing Higher - Unit 1… Computer Systems 1 Higher Computing Unit 1 – Topic 1 Data Representation.
Bits & Bytes: How Computers Represent Data
Chapter 1 Data Storage(2) Yonsei University 1 st Semester, 2014 Sanghyun Park.
Representing Nonnumeric Data Everything is really a number.
CS Topic 1 - Data Representation v2 1 Data representation considers how a computer uses numbers to represent data inside the computer. Three types of data.
Chapter 2 Computer Hardware
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 Foundations of Computer Science Chapter 2 Data Representation.
1 INFORMATION IN DIGITAL DEVICES. 2 Digital Devices Most computers today are composed of digital devices. –Process electrical signals. –Can only have.
HOW COMPUTERS MANIPULATE DATA Chapter 1 Coming up: Analog vs. Digital.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
7/11/20081 Today’s Agenda Friday 6 th Nov Revision of certain topics Floating point notation Excess Notation Exam format Interim Report.
Logical Circuit Design Week 2,3: Fundamental Concepts in Computer Science, Binary Logic, Number Systems Mentor Hamiti, MSc Office: ,
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 2 Data Representation.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
Data Representation, Number Systems and Base Conversions
Data Representation The storage of Text Numbers Graphics.
DATA REPRESENTATION CHAPTER DATA TYPES Different types of data (Fig. 2.1) The computer industry uses the term “MULTIMEDIA” to define information.
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.
COMP135/COMP535 Digital Multimedia, 2nd edition Nigel Chapman & Jenny Chapman Chapter 2 Lecture 2 – Digital Representations.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
ASCII AND EBCDIC CODES By : madam aisha.
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
Data Representation. In our everyday lives, we communicate with each other using analogue data. This data takes the form of: Sound Images Letters Numbers.
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.
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.
Binary Representation in Text
Binary Representation in Text
Binary and Decimal Numbers
Chapter 3 - Binary Numbering System
Binary Numbers and ASCII and EDCDIC
Computer Systems Nat 4/5 Data Representation Lesson 4:
Chapter 3 Data Storage.
Bits & Bytes How Computers Represent Data
Digital Electronics Jess 2008.
Representing Nonnumeric Data
Ch2: Data Representation
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Chapter 2 Data Representation.
Why use Binary? It is a two state system (on/off) which makes it simple to operate Even if degradation of current occurs (ie a slight drop in voltage)
How Computers Store Data
Data Representation Chapter 2 Computer HW (Von Neumann Model) Program
Option: Data Representation
Option: Data Representation
Chapter 3 - Binary Numbering System
Presentation transcript:

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 forms, the most efficient way is to represent all forms of information using a universal format.

Data Types Word processing programs Engineering programs Image processing programs Audio play program Video display programs Multimedia

Information coding and decoding Human senses deal with a variety of information (signals). Input devices of computer translates these information into electrical signals, why electrical?. Electrical signals are then translated into universal format (0s,1s), this is known as coding. After processing, output devices transform back data into their original form, this is known as decoding

Bit Pattern A bit is the smallest unit of data that the computer deals with. a bit can take two values (0 or 1). A two-state electrical switch (transistor) is used to represent a bit (on state →1, off state →0). To store 16 bits you need 16 switches, to store million bits you need million switches. In computer memory data are stored as blocks of bits (bit-patterns), the length of bit-patterns is the number of bits in the bit-patterns. A bit-pattern of 8 bits length is called a byte

Representing Data: 1. Text Representation Written text is made of alphabetical symbols (letters). For example, in English there are 26 uppercase and 26 lowercase symbols. Each of those symbols is represented by distinctive bit-pattern (code), ex table A1, P337. Once alphabetical symbols are represented by a bit-pattern, any word that is made of combination of letters can be represented.

Representation of word “BYTE” Ex: 34 Page13

Number of bits in bit-pattern The number of possible bit-patterns (symbols) made of N number of bits, M is given by: M = 2 N Inversely, the number of bits needed to construct M number of symbols is given by: N= Log 2 M ≈ 3.2 Log 10 M (Note: N must be rounded to next bigger integer) Ex: for M = 26, what is the min number of bits? N= Log 2 26 = 3.2 Log = 4.5 = 5 bits

Code systems for text representation There are about 5 code systems used to represent alphabetical symbols: 1.ASCII (American Standard Code for Information Interchange) 2.Extended ASCII 3.EBCDIC (Extended Coded Decimal Interchange Code) 4.Unicode (Universal Code) 5.ISO (International Organization for Standardization)

(1) ASCII In ASCII codes each code is made of 7 bits. Number of possible codes M = 2 7 = 128 codes. Bit-patterns ranging from to The first pattern represents (null character) The last pattern represents (delete character) Appendix A

(2) Extended ASCII Is invented to make the bit-pattern length equal to 8 bits (Byte), by adding a bit to the left of the ASCII code representation. Ex. If ASCII code is the extended ASCII code is Extended ASCII is not used because it is not standardized as each manufacturer has different 8-bits system.

(3) EBCDIC Uses 8 bit patterns → # of codes = 2 8 =256 Just used in IBM mainframe (system)

(4) Unicode To represent more languages’ character beside English, Unicode is invented. Uses 16 bit pattern → # of codes = 2 16 =65536 enough to represent all world’s languages. Some codes are allocated for geographical and special symbols. Java uses Unicode, Microsoft uses the first 256 symbols Appendix B

(5) ISO ISO uses 32 bit patterns → # of codes = 2 32 =4,294,967,296 symbols enough to represent all world’s symbols.

Representing Data: 2. Image Representation Image representation methods

1. Bitmap Graphic Image is divided into matrix of pixels. A pixel represents a dot which is the smallest unit of the image. Image resolution depends on the number of pixels in the image. Higher resolution images require larger memory. Once image is divided into pixels, each pixel is given a bit-pattern. The pixel bit-pattern determines the color of the pixel

Black & white)) Pixel Color For black and white images, only two bit- patterns are needed, one to represent a black pixel and the other to represent a white pixel. In this case, the length of the pattern could be only one bit, i.e. 1 pattern to represent a black pixel and 0 pattern to represent a white pixel. The rows of patterns are then stored in the memory.

Bitmap graphic method of a black-and-white image

(gray scale) Pixel Color To represent a gray-scale image of 4 colors (for example) we need to increase the length of bit-pattern representing the pixel to be 2 bits. In this case 00→ black pixel 01→ dark gray pixel 10→ light gray pixel 11→ white pixel

(colored pixel) Pixel Color Any visible color could be constructed from the 3 basic colors Red, Green, Blue (RBG) The difference between one color another depends on the intensity of the RBG colors in the color Therefore, to represent a colored image, each pixel in the image must be represented by 3 different bit-patterns. Each of them represent the intensity of the basic colors. The length of a bit pattern representing each basic color is usually 8 bits

Representation of color pixels

1. Vector Graphic Image is decomposed into lines and curves. Each curve and line is represented by a mathematical formula. The mathematical formula is sorted. No bit-patterns are stored For example a line is described by its coordinates, the circle is described by it’s the coordinates of its centre and length of the radius. The advantage of vector representation is that image can be scaled by multiplying the formula by the scale factor without effecting the image resolution as in bitmap representation

Representing Data: 3. Audio Representation Audio is sound Sound signal is analog signal The representation of audio signal requires converting analog signal into digital signal (A/D)

Audio representation

Representing Data: 4. Video Representation Video is a series of images (frame) shown sequentially (one after another) Thus video data representation is basically the representation of images changed with time. Video files are multimedia files

Binary Notation Is a way to write binary numbers In this way we assign a symbol for multiples of successive bits that makes the binary number We are going to learn two binary notation systems: – Octal notation: a symbol for 3 bits. – Hexadecimal notation: a symbol for 4 bits.

Decimal numbers A decimal number is made of digits A digit takes the value between (0-9) Each of the digits is multiplied by its weight which is 10 to the power of 0 for the first digit from the right, 1 for the second digit, 2 for the third digit …. etc

Binary numbers A binary number is made of digits A digit takes the value of either 0 or 1 Each of the digit is multiplied by its weight which is 2 to the power of 0 for the first digit from the right, 1 for the second digit, 2 for the third digit …. Etc

Octal Notation 1.Oct means eight in Greek 2.In Octal notation, successive 3 bits are given a symbol (0, 1, 2, 3, 4, 5, 6, 7). 3.In binary to octal transformation, if the number of bits in a bit pattern is not a multiple of three, we fill with 0s added to the lift of bit-pattern to make the total number of bits multiple of three. 4.Converted octal notation must be distinguished by either: 1. adding o or O in front of the octal number 2.Adding subscript 8 to the base of the octal number

Hexadecimal Notation 1.hexadec means 16 in Greek 2.In hexadecimal notation, successive 4 bits are given a symbol (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D,E, F). 3.In binary to hexadecimal transformation, if the number of bits in a bit pattern is not a multiple of four, we fill with 0s added to the lift of bit-pattern to make the total number of bits multiple of four. 4.Converted hexadecimal notation must be distinguished by either: 1.Adding x or X in front of the hexadecimal number 2.Adding subscript 16 to the base of the hexadecimal number

Note 1.Octal or binary notation is just a way to represent binary numbers (i.e. they are not a numbering systems) 2.You have to make sure the converted number is always distinguished.