Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one...

27
Chapters 1,2, & 3 Quiz # 1 1

Transcript of Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one...

Page 1: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Chapters 1,2, & 3

Quiz # 1

1

Page 2: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

2

Analog and Digital Information

Information can be represented in one of two ways: analog or digital

Analog data

A continuous representation, analogous to the actual information it represents

Digital data

A discrete representation, breaking the information up into separate elements

Page 3: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Digitization

Initially transforming data for computer use• Assigning people social security numbers• The creation of telephone numbers

Encoding information became the way to transform the real world into a context that the computer could understand

Page 4: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Information Metamorphosis

•Fitting the real world into the computer•Computer’s world

– Electronic– Fast– Binary

•Real World– Multiple forms of data / information– Imprecise / vague– Non uniform speeds

Page 5: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Information Metamorphosis

•Real World Data Forms– Numeric Data– Character Data– Graphical / Visual Data– Audio Data– Instructional Data

•Methodology needed to transform real world data into computer world (binary)

Page 6: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Binary Number System

•Binary for numeric data•Binary digit = Bit•8 Bits = Byte

– Smallest addressable unit within the computer

•4 Bytes = Word– Basic unit for arithmetic– Contains 32 bits

•Converting from binary

1 0 0 1 1 1 0 1

1 X 128 = 1280 X 64 = 00 X 32 = 01 X 16 = 161 X 8 = 81 X 4 = 40 X 2 = 01 X 1 = 1

157

Page 7: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Numeric Data

•Converting to binary– Repeated division by 2– Remainders are the

important part– Read from bottom up

as if left to right

Page 8: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Character Data

•Binary for Character Data– 8 bit combinations assigned to a symbol– Name for mapping process is ASCII table

@ 0100 0000 P 0101 0000 0110 0000A 0100 0001 Q 0101 0001 a 0110 0001B 0100 0010 R 0101 0010 b 0110 0010C 0100 0011 S 0101 0011 c 0110 0011D 0100 0100 T 0101 0100 d 0110 0100E 0100 0101 U 0101 0101 e 0110 0101F 0100 0110 V 0101 0110 f 0110 0110G 0100 0111 W 0101 0111 g 0110 0111H 0100 1000 X 0101 1000 h 0110 1000I 0100 1001 Y 0101 1001 i 0110 1001J 0100 1010 Z 0101 1010 j 0110 1010K 0100 1011 [ 0101 1011 k 0110 1011L 0100 1100 \ 0101 1100 l 0110 1100M 0100 1101 ] 0101 1101 m 0110 1101N 0100 1110 ^ 0101 1110 n 0110 1110O 0100 1111 _ 0101 1111 o 0110 1111

Page 9: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Graphical Data

•Binary for Graphical Data

Page 10: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Graphical Data

•Binary for Graphical Data

Page 11: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Graphical Data

•Binary for Graphical Data•Each black pixel is represented as a “1”•Each white pixel is represented as a “0”•Pixels are grouped in units of 8 so they can be stored in 1 byte

Page 12: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Graphical Data

A 1” picture scanned at 150 DPI (dots per inch)

Total size = 150 X 150 22,500 dots

Memory required = 22,500 / 8 2,813 bytes

Color requires more bits to represent each dotUsing 8 bits for each dot allows for 256 different colors

The 1” picture now requires 22,500 bytes

Page 13: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Graphical Data

•Printers are rated in DPI for print quality•Scanners are rated in DPI for image resolution•Monitors / displays have display settings for display resolution

–800 X 600–1024 X 768–1280 X 1024–1400 X 1050

Page 14: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Audio Data

•Binary for audio data•Sound as a waveform

–Y-axis represents voltage–X-axis represents time

•Suppose the wave form shown represents 1 second of sound

Page 15: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Audio Data

•Divide Sample into segments

Page 16: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Audio Data

•Divide Sample into more segments

Page 17: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Audio Data

•Divide Sample into even more segments

Page 18: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Audio Data

•The more segments the better the re-created wave form•The given sample was divided into 34 segments (approx)•An Audio CD utilizes 44,000 samples per second of sound

Page 19: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

Instructional Data

•Binary for Instructional Data•Instructional Data has not only content but sequence•Driving directions to NJ Aquarium

–Designated number of steps–Sequence of steps is critical to success–Rearranging sequence will not get you to the NJ Acquarium

•Recipe / Directions / Program

Page 20: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

20

The Unicode Character Set

Extended ASCII is not enough for international use

One Unicode mapping uses 16 bits per character

How many characters can this mapping represent?

Unicode is a superset of ASCII

The first 256 characters correspond exactly to the extended ASCII character set

Page 21: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

21

Keyword Encoding

Replace frequently used words with a single character

Page 22: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

22

Run-Length Encoding

A single character may be repeated over and over again in a long sequenceReplace a repeated sequence with

– a flag character – repeated character– number of repetitions

*n8– * is the flag character– n is the repeated character– 8 is the number of times n is repeated

Page 23: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

23

Huffman Encoding

In Huffman encoding no character's bit string is the prefix of any other character's bit string

To decode

look for match left to right, bit by bit

record letter when a match is found

begin where you left off,going left to right

Page 24: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

24

Digitized Images and Graphics

Digitizing a picture

Representing it as a collection of individual dots called pixels

Resolution

The number of pixels used to represent a picture

Raster Graphics

Storage of data on a pixel-by-pixel basis

Bitmap (BMP), GIF, JPEG, and PNG are raster-

grahics formats

Page 25: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

25

Digitized Images and Graphics

Bitmap formatContains the pixel color values of the image from left to right and from top to bottomGIF format (indexed color)Each image is made up of only 256 colorsJPEG formatAverages color hues over short distancesPNG formatLike GIF but achieves greater compression with wider range of color depths

Which is better for line drawings? Pictures?

Page 26: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

26

Vector Graphics

Vector graphics A format that describes an image in terms of lines and geometric shapes

A vector graphic is a series of commands that describe a line’s direction, thickness, and color

The file sizes tend to be smaller because not every pixel is described

Page 27: Chapters 1,2, & 3 Quiz # 1 1. 2 Analog and Digital Information Information can be represented in one of two ways: analog or digital Analog data A continuous.

27

Vector Graphics

The good side and the bad side…

Vector graphics can be resized mathematically and changes can be calculated dynamically as needed

Vector graphics are not good for representing real-world images