Information Representation

Slides:



Advertisements
Similar presentations
Data Representation. Units & Prefixes Review kilo, mega, and giga are different in binary! bit (b) – binary digit Byte (B) – 8 binary digits KiloByte.
Advertisements

KFUPM COE 202: Digital Logic Design Number Systems Part 3 Courtesy of Dr. Ahmad Almulhem.
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
CSC /703 CTI/DePaul1 CSC-255 Lecture 4 Negative Numbers, Images, Parity (Brookshear Chapter 1, pages 46-72) Modified by Ufuk Verun from Jim Janossy.
Lecture 6 Graphics, Number Systems. 7.2 Bit-map Graphics Similar to real painting on the canvas, there is no way to change something but paint over it.
Binary Expression Numbers & Text CS 105 Binary Representation At the fundamental hardware level, a modern computer can only distinguish between two values,
March 2006Taner Erig - EMU2-1 Metamorphosis of Information How is information represented and how do computers store information?
Image Representation CS105. Data Representation Text representation – ASCII character set – Unicode – Data compression Images!
1 A Balanced Introduction to Computer Science, 2/E David Reed, Creighton University ©2008 Pearson Prentice Hall ISBN Chapter 12 Data.
Binary and Decimal Numbers
Introduction to Information Technology
Number Systems & Logic Gates Day 1
Bits and Bytes.
Digital Information Technology
Bits, Bytes, KiloBytes, MegaBytes, GigaBytes & TeraBytes.
©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,
Chapter 3 Representing Numbers and Text in Binary Information Technology in Theory By Pelin Aksoy and Laura DeNardis.
Bits & Bytes: How Computers Represent Data
Computers Organization & Assembly Language
Chapter 1 Data Storage(2) Yonsei University 1 st Semester, 2014 Sanghyun Park.
Module Code: CU0001NI Technical Information on Digital Images Week -2.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 14 Introduction to Computer Graphics.
Data Representation Int 2 Computing Unit 1 – Computer Systems St Kentigern’s Academy.
Chapter 2 Computer Hardware
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.
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.
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
©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.
Marr CollegeHigher ComputingSlide 1 Higher Computing: COMPUTER SYSTEMS Part 1: Data Representation – 6 hours.
Quiz # 1 Chapters 1,2, & 3.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Data Representation, Number Systems and Base Conversions
Data Representation Robin Burke IT 130. Outline Data Representation Binary Numbers Image types.
Lecture 7: Intro to Computer Graphics. Remember…… DIGITAL - Digital means discrete. DIGITAL - Digital means discrete. Digital representation is comprised.
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.
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.
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Data Representation. In our everyday lives, we communicate with each other using analogue data. This data takes the form of: Sound Images Letters Numbers.
Storing Graphics Nat 5 Data Representation Lesson 4a: Storing Graphics
Data Representation.
Lec 3: Data Representation
Binary Notation and Intro to Computer Graphics
INFS 211: Introduction to Information Technology
Computer Systems Nat 4/5 Data Representation Lesson 4:
3.1 Denary, Binary and Hexadecimal Number Systems
Bits & Bytes How Computers Represent Data
Information Support and Services
Intermediate 2 Computing
Representing Images 2.6 – Data Representation.
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)
Data Representation Chapter 2 Computer HW (Von Neumann Model) Program
Option: Data Representation
Binary CSCE 101.
Option: Data Representation
WJEC GCSE Computer Science
Chapter 3 - Binary Numbering System
Presentation transcript:

Information Representation

Computer Architecture

Memory Memory is a collection of cells, each with a unique physical address for random (direct) access memory is divided into fixed-length units or words Information that is stored in memory cells is in binary coded format: Instructions that make up programs Data: text symbols, numbers, images, etc.

Information Representation The Binary System: Using On/Off Electrical States to Represent Data & Instructions The binary system has only two digits--0 and 1. Bit - binary digit Byte - group of 8 bits used to represent one character, digit, or other value

Representing Information with Bit Combinations To encode entities (e.g., symbols), we need to assign a unique number to each entity (e.g., social security number). Binary encoding means that we assign a unique combinations of bits to each object. One bit can be either 0 or 1. Therefore, one bit can represent only two things. To represent more than two things, we need multiple bits. Two bits can represent four things because there are four combinations of 0 and 1 that can be made from two bits: 00, 01, 10,11. If we want to represent more than four things, we need more than two bits. In general, 2n bits can represent 2n things because there are 2n combinations of 0 and 1 that can be made from n bits. Q: how many bits do we need to encode all the 37 people in the class?

Information Representation Kilobyte approx. 1000 bytes (actually 210 = 1024 bytes) Megabyte approx. 1,000,000 bytes (one million) Gigabyte approx. 1,000,000,000 bytes (one billion) Terabyte approx. 1 trillion bytes Petabyte approx. 1 quadrillion bytes FACTOIDs: The prefix “mega” in “megabyte” comes from the Greek word “megas” meaning “mighty” or “great.” The prefix “giga” in “gigabyte” comes from a Greek word meaning “giant.” The prefix “tera” in “terabyte” comes from a Greek word meaning “monster.” You might think that the largest unit of storage capacity is a petabyte, but in fact, there are also exabytes, zetabytes, and yottabytes.

Representing Text and Symbols To represent a text document in digital form, we simply need to be able to represent every possible character that may appear. There are finite number of characters to represent. So the general approach for representing characters is to list them all and assign each a number (represented in binary). An encoding scheme is simply a list of characters and the codes used to represent each one. To represent symbols, computers must use a standard encoding scheme, so that the same symbols have the same codes across different computers. Discussion question: How many possible different characters can Unicode represent and how is that derived? Answer: 2 to the 16th power=65,526 character combinations

ASCII Encoding Scheme ASCII stands for American Standard Code for Information Interchange. The ASCII character set originally uses 8 bits to represent each character, allowing for 256 (or 28) unique characters. Discussion question: How many possible different characters can Unicode represent and how is that derived? Answer: 2 to the 16th power=65,526 character combinations

Representing Text and Symbols ASCII - the binary code most widely used with microcomputers EBCDIC - used with large computers Unicode - uses two bytes for each character rather than one Discussion question: How many possible different characters can Unicode represent and how is that derived? Answer: 2 to the 16th power=65,526 character combinations

The Parity Bit Parity bit - an extra bit attached to the end of a byte for purposes of checking for accuracy Even parity - sum of bits must come out even Ex: given code 01010101, the extended code is: 010101010 Ex: given code 01101101, the extended code is: 011011011 Odd parity - sum of bits must come out odd Even parity scheme

Representing Numbers The binary number system Decimal is base 10: 0,1,2,3,4,5,6,7,8,9 Binary is base 2: 0,1 Any decimal number can be converted to binary by doing base conversion from base 10 to base 2. Any binary number can be converted to decimal by doing base conversion from base 2 to base 10.

Number base 10 - decimal The Decimal Number 101 102 101 100 102 101 100 100’s 10’s 1’s 1 0 1 x 1 = 1 x10 = 0 x100 = 100 101

Number base 2 - binary The Binary Number 101 22 21 20 4’s 2’s 1’s 22 21 20 4’s 2’s 1’s 1 0 1 x 1 = 1 x 2 = 0 x 4 = 4 5

Binary Conversion - Examples 1 0 1 1 0 1 32 + 0 + 8 + 4 + 0 + 1 = 45 25 24 23 22 21 20 32 16 8 4 2 1

Binary Conversion - Examples 1 0 1 0 1 1 0 64 + 0 + 16 + 0 + 4 + 2 + 0 = 86 64 32 16 8 4 2 1 Easier way to remember: Just add the values for each position where there is a 1 128 64 32 16 8 4 2 1 1 128 + 32 + 16 + 4 + 1 = 181

Hexadecimal Representation Hexadecimal (Hex) = Base 16 Hex digits: 0, 1, 2, …, 9, A, B, C, D, E, F Decimal Hex Binary 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 Decimal Hex Binary 8 1000 9 1001 10 A 1010 11 B 1011 12 C 1100 13 D 1101 14 E 1110 15 F 1111

Hexadecimal Representation Hex can be used as a short hand for long binary strings Use one Hex digit to represent every group of 4 bits Start from the right and an go left grouping 4 bit sequences Add leading 0’s if the last group has less then 4 bits 1 0 1 0 1 1 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 1 1 0 A D 6 1 0 1 1 0 1 1 0 1 0 1 1 0 1 1 5 B

Hexadecimal Representation What is Hex 4C8F in binary? 4 C 8 F 0100 1100 1000 1111

Representing Images as Bit maps Image is collection of dots (pixels) Pixel = “picture element” Black & white: one bit per pixel Color: each pixel represented by combination of green, red, blue in varying intensity, to form all colors. Three bytes per pixel: one byte (8 bits) for each color intensity, 0-255 value Usually each byte is represented in Hex D4 7F 59  red (D4), green (7F), blue (59) For example, D4 is binary 1101 0100 which is decimal value 212 Bit maps are not efficient 3 byte/pixel, for 1280 x 1024 pixels = several megabytes Image cannot be enlarged, since pixels get bigger and image gets grainy or “blocky” .GIF and .JPEG formats compress images

Image Formats GIF JPEG (JPG) Graphics Interchange Format Developed by Compuserve (ISP) Stores only 256 colors Loses some picture quality but is simple and fast Common in computer action games JPEG (JPG) Joint Photographic Experts Group Stores differences between adjacent pixels, not absolute values Uses variable-length data (values take a minimum number of bits to store), uses only 5% of the space of bitmaps

Image Formats Vector Images Pixels are not mapped Equations for the lines and curves making up the image are stored Image is stored as the instructions for drawing the image Images are easily scaled Modern type fonts are vector images Used in computer aided design (CAD) systems for “blueprint” drawings Good for three-dimensional drawings Windows metafile (.wmf) or Visio (.vsd) Cannot produce photographic images