7/11/20081 Today’s Agenda Friday 6 th Nov Revision of certain topics Floating point notation Excess Notation Exam format Interim Report.

Slides:



Advertisements
Similar presentations
Information Representation
Advertisements

The Binary Numbering Systems
Chapter 1.7 Storing Fractions. Excess Notation, continued… In this notation, "m" indicates the total number of bits. For us (working with 8 bits), it.
Connecting with Computer Science, 2e
Level ISA3: Information Representation
The Binary Number System
How Images are Represented Bitmap images (Dots used to draw the image) Monochrome images 8 bit grey scale images 24 bit colour Colour lookup tables Vector.
Image and Sound Editing Raed S. Rasheed Image Image. Digital image. – Raster images. – Vector Images. – Stereo Images. – Image File Formats Lossless.
Binary Number Systems.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Real Numbers and the Decimal Number System
The Binary Number System
Data Representation Number Systems.
©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,
1 Bitmap Graphics It is represented by a dot pattern in which each dot is called a pixel. Each pixel can be in any one of the colors available and the.
Higher Computing Data Representation.
Numbering systems.
COMP Bitmapped and Vector Graphics Pages Using Qwizdom.
Computer Arithmetic Nizamettin AYDIN
Module Code: CU0001NI Technical Information on Digital Images Week -2.
Simple Graphics. Graphics Used in PowerPoint, Web pages and others Basic Knowledge drawing change of colour, shape and others acquiring, video camera,
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
Image Storage Bitmapped Graphics – in which an image is represented as a collection of dots Vector Graphics – in which an image is represented as a set.
Chapter 11 Fluency with Information Technology 4 th edition by Lawrence Snyder (slides by Deborah Woodall : 1.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Higher Computing Computer Systems S. McCrossan 1 Higher Grade Computing Studies 1. Data Representation Data Representation – Why do we use binary? simplicity,
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.
Shawlands Academy Higher Computing Data Representation.
Data Representation CS280 – 09/13/05. Binary (from a Hacker’s dictionary) A base-2 numbering system with only two digits, 0 and 1, which is perfectly.
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
Lecture 5. Topics Sec 1.4 Representing Information as Bit Patterns Representing Text Representing Text Representing Numeric Values Representing Numeric.
Chapter 1 Data Storage © 2007 Pearson Addison-Wesley. All rights reserved.
CS- 375 Graphics and Human Computer Interaction Lecture 1: 12/4/1435 Fundamental Techniques in Graphics Lecturer: Kawther Abas.
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
Optimizing Web Graphics Session #6 INP150. Image Types Types  Bitmap / Raster---dots  Bitmap images are made of individual pixels arranged in patterns.
Chapter 2 File Format Objectives (1 of 2) Identify the difference between vector based graphics and bitmap-based graphics Clarify bitmap and vector graphic.
Quiz # 1 Chapters 1,2, & 3.
Chapter 2 File Format Objectives (1 of 2) Identify the difference between vector based graphics and bitmap-based graphics Clarify 3 types of vector programs.
Graphics An image is made up of tiny dots called pixels (“picture elements”) The resolution determines the.
Data Representation, Number Systems and Base Conversions
Chapter 3 Image Files © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
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.
Bitmap images Resizing bitmaps Vector images Why are there so many image file formats? Resolution and Scanning “Bits” and.bmp files Photo editors JPG file.
Image File Formats. What is an Image File Format? Image file formats are standard way of organizing and storing of image files. Image files are composed.
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. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Graphics and Image Data Representations 1. Q1 How images are represented in a computer system? 2.
Software Design and Development Storing Data Part 2 Text, sound and video Computing Science.
 Computers are 2-state devices › Pulse – No pulse › On – Off  Represented by › 1 – 0  BINARY.
Chapter 1: Data Storage.
Department of Computer Science Georgia State University
Computer Science: An Overview Eleventh Edition
Graphics and image data representation
Data Representation.
Lec 3: Data Representation
Chapter 3 Image Files © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
Computer Science Higher
Introduction To Computer Science
Intermediate 2 Computing
LET’S LEARN ABOUT GRAPHICS!
Ch2: Data Representation
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)
Chapter 3 DataStorage Foundations of Computer Science ã Cengage Learning.
1.6) Storing Integer: 1.7) storing fraction:
Presentation transcript:

7/11/20081 Today’s Agenda Friday 6 th Nov Revision of certain topics Floating point notation Excess Notation Exam format Interim Report

7/11/20082 Excess Notation Table Bit patternsValue Rep

7/11/20083 QUIZ 2 (Time 17 min) Decode the following using floating point format (i-e left most bit is s.b, next three are exp and the next four are mantissa). Show all your working?     Code the following values into floating point format.  ¾  (-)3 1/2 When using floating point format, what is the largest value that can be represented? Also indicate the smallest value that can be represented?

7/11/20084 Solution Demonstrated by instructor on white board

7/11/20085 Today's Agenda 10 th Nov 08 Truncation Errors Image Representation Hexadecimal Notation Student Presentation

7/11/20086 Truncation Errors Lets try to represent 2 5/8 with one byte floating point format. Steps- First represent 2 5/8 in binary, which gives us Copy this pattern into mantissa field Problem- when we do this we run out of space and the last 1(representing 1/8 ) is lost If this problem is ignored and exponent and sign-bit fields are populated, we get i-e 2 1/2 instead of 2 5/8

7/11/20087 Longer Mantissa and Exponent fields can reduce this problem Its common to use at least 32 bits for storing values in floating point notation Truncation errors in decimal system : e-g of which is the problem of non terminating expansions (occurs when trying to express 1/3 in decimal system). Truncation Errors are an everyday concern for people working in the area of numerical analysis (branch of maths that deals with problems involved when doing computations that are often massive and require significant accuracy)

7/11/20088 Suppose we are asked to add 2 1/2 + 1/8 + 1/8 If we add 2 1/2 and 1/8 we get should get 2 5/8 (hence truncation error) but 2 5/8 gets represented as 2 1/2 Now the next step is to add 1/8 to the result obtained by the addition of 2 1/2 and 1/8 (which is 2 1/2. Again a truncation error occurs and our final answer is 2 1/2. Now try to add values in reverse order Add 1/8 and 1/8, we get ¼ (.01) –result is

7/11/20089 Now we add ¼ to the next value in the list which is 2 1/2, and obtain 2 3/4 which can be accurately stored in a byte as The result this time is the correct answer. Crux: When adding values – order in which they are added are is important. Problem occurs when a very large number is added to a very small number, the small number gets truncated. General rule for adding multiple values is to add the smaller values first, in hope that they will accumulate to a value that is significant when added to larger values

7/11/ Hexadecimal Notation When considering the internal activities of a computer, we deal with strings of bits, some of which are very long. Human mind has difficulty handling such detail Merely transcribing the pattern is tedious and error prone To simply the representation of bit patterns, therefore, we usually use a shorthand notation called the hexadecimal notation

7/11/ Bit patternsHexadecimal Representation Bit patternsHexadecimal Representation A 1011B 1100C 1101D 1110E 1111F

7/11/ Hexdecimal Notation Left column displays all bit patterns of length 4 Right column shows the symbol used in hex- dec notation to represent the patterns on the left. Bit pattern represents B5 Obtained by dividing the string into substrings of length 4 and then representing each substring by its hex-dec equivalent. Decode in hex-dec notation?

7/11/ Representing Images (Bitmap technique) 2 popular ways of representing images Bitmap technique (Rastor images) and Vector technique Rastor or bitmap image is a collection of dots, each of which is called a pixel In its simplest form, an image represents a long string of bits representing the rows of pixels in the image, where each bit is either 1 or 0 depending on whether the corresponding pixel is black or white. Color images are slightly more complicated, where each pixel is represented by a combination of bits representing the color of that pixel. Computer Peripherals convert color images into bitmap form. These devices record color of each pixel as three components: red, blue and green component One byte is used to represent the intensity of each color component. Hence 3 bytes of storage are used to represent a single pixel in the original image. Three byte per pixel format means that an image consisting of 1280 rows of 1024 pixels (typical photograph) requires several megabytes of storage. This bulkiness of image is reduced by using compression technique. Disadvantage of bitmap images is that they cannot be rescaled to any arbitrary size. This is because this will lead to bigger pixels which leads to grainy images. Vector technique

7/11/ Vector technique RRM (Slide 14 and 15) Vector technique represents images using lines and geometric curves Vector Graphics is a series of commands that describes a lines direction, thickness and color File size is very small because not every pixel is accounted for. Vector graphics can be resized mathematically and these changes can be calculated dynamically Vector Technique not good for representing real life images- JPEG are far superior in that but vector graphics are good in representing line art and cartoon style drawings. Most popular vector format is Flash- Flash images are stored in binary format and require a special editor to create. Another vector format- SVG

7/11/ Common bitmap formats include: BMP GIF JPEG, JPG PNG PICT (Macintosh) PCX TIFF PSD (Adobe Photoshop)bitmap formats Popular bitmap editing programs are: Microsoft Paint Adobe Photoshop Corel Photo-Paint Corel Paint Shop Pro The GIMPbitmap editing programs