L02-InfoEncoding - Representing Information 0 1 1 0 1 1 0 0...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
L02 – Encoding Information 1 Comp411 – Fall 2009 8/31/2008 Representing Information “Bit Juggling” - Representing information using bits - Number representations - Some other bits Chapter 2.3-2.4 0 0 0 0 1 1 1 1
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
L02 – Encoding Information 2 Comp411 – Fall 2009 8/31/2008 Motivations Computers Process Information Information is measured in bits By virtue of containing only “switches” and “wires” digital computer technologies use a binary representation of bits How do we use/interpret bits We need standards of representations for Letters Numbers Colors/pixels Music Etc. Last Time Today
Background image of page 2
L02 – Encoding Information 3 Comp411 – Fall 2009 8/31/2008 Encoding Encoding describes the process of assigning representations to information Choosing an appropriate and efficient encoding is a real engineering challenge (and an art) Impacts design at many levels - Mechanism (devices, # of components used) - Efficiency (bits used) - Reliability (noise) - Security (encryption)
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
L02 – Encoding Information 4 Comp411 – Fall 2009 8/31/2008 If all choices are equally likely (or we have no reason to expect otherwise), then a fixed-length code is often used. Such a code should use at least enough bits to represent the information content. ex. Decimal digits 10 = {0,1,2,3,4,5,6,7,8,9} 4-bit BCD (binary code decimal) ex. ~84 English characters = {A-Z (26), a-z (26), 0-9 (10), punctuation (8), math (9), financial (5)} 7-bit ASCII ( American Standard Code for Information Interchange ) Fixed-Length Encodings bits 7 392 . 6 ) 84 ( log 2 < = bits 4 322 . 3 ) 10 ( log 2 < =
Background image of page 4
L02 – Encoding Information 5 Comp411 – Fall 2009 8/31/2008 ASCII Table
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
L02 – Encoding Information 6 Comp411 – Fall 2009 8/31/2008 Unicode ASCII is biased towards western languages. English in particular. There are, in fact, many more than 256 characters in common use: â, m, ö, ñ, è, ¥, , , , , , , ℵ ℷ ж, , Unicode is a worldwide standard that supports all languages, special characters, classic, and arcane Several encoding variants 16-bit (UTF-8) 1 0 x x x x x x 1 0 z y y y y x 1 1 1 1 0 w w w 1 0 w w z z z z 0 x x x x x x x ASCII equiv range: 1 0 x x x x x x 1 1 0 y y y y x Lower 11-bits of 16-bit Unicode 1 0 x x x x x x 1 0 z y y y y x 1 1 1 0 z z z z 16-bit Unicode
Background image of page 6
L02 – Encoding Information 7 Comp411 – Fall 2009 8/31/2008 Encoding Positive Integers - = = 1 n 0 i i i b 2 v 2 11 2 10 2 9 2 8 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 0 1 1 1 1 1 0 1 0 0 0 0 It is straightforward to encode positive integers as a sequence of bits. Each bit is assigned a weight. Ordered from right to left, these weights are increasing powers of 2. The value of an n-bit number encoded in this fashion is given by the following formula: 2 4 = 16 + 2 8 = 256 + 2 6 = 64 + 2 7 = 128 + 2 9 = 512 + 2 10 = 1024 2000 10
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 23

L02-InfoEncoding - Representing Information 0 1 1 0 1 1 0 0...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online