Information, Computation, and Communication Representation of - - PowerPoint PPT Presentation

information computation and communication
SMART_READER_LITE
LIVE PREVIEW

Information, Computation, and Communication Representation of - - PowerPoint PPT Presentation

ICC Module Computation Information Representation Information, Computation, and Communication Representation of Information 1 ICC Module Computation Information Representation Computation works with information Scientific Google


slide-1
SLIDE 1

ICC Module Computation – Information Representation

1

Information, Computation, and Communication

Representation of Information

slide-2
SLIDE 2

ICC Module Computation – Information Representation

2

Computation works with information

Scientific computation/simulation

  • -> numbers

Google datacenter Information management

  • -> text, photos,

movies… Control process

  • ->signals

(measurements, control...)

slide-3
SLIDE 3

ICC Module Computation – Information Representation

3

§ Which ways can we use to represent numbers and symbols? § Is it possible to build an exact representation of the real world?

Objectives

slide-4
SLIDE 4

ICC Module Computation – Information Representation

4

§ Representation of the information § Natural Numbers (e.g., 2 4 5 6): operations/domain § Integers (e.g., -1 -5 4 45698) - Videos § Reals (e.g., 3.4 4.756): fix and floating point - Videos § From the alphabet to the ideograms (next week)

Agenda

slide-5
SLIDE 5

ICC Module Computation – Information Representation

5

A representation is a convention 1 billion of people understand it… It is not difficult to assign meaning to a symbol but to agree on a common way to interpret it.

A Convention

slide-6
SLIDE 6

ICC Module Computation – Information Representation

6

A B C …

214 graphical motifs, called keys, were used to build ~100.000 Chinese ideograms The 26 letters of the Latin alphabet have been used to build/create ~1.000.000 words of western languages The 10 Arabic digits allow us to create an infinity of numbers (and even encrypt all the words!) Question: which one is the simplest system of signs allowing to keep/save/preserve the same expression wealth/richness like the 10 digits? Answer: a system of 2 symbols

Towards the elementary unit of information

0 1 2 3…

slide-7
SLIDE 7

ICC Module Computation – Information Representation

7

All information can be represented with the help of a set of binary elements In agreement, a binary element is worth 0 or 1. In agreement we use the English expression “binary digit ” or bit in short (abbreviated) Shortcut for bit: b or bit

A Bit

slide-8
SLIDE 8

ICC Module Computation – Information Representation

8

21 distinct pieces

  • f information

1 bit

1

How to represent more information?

distinct pieces

  • f information

2 bits 1 1 1 1 0 0 1

22

slide-9
SLIDE 9

ICC Module Computation – Information Representation

9

Exercise: How many bits do we need to represent

  • the days of the week:
  • the digits 0 to 9 :
  • the letters of the alphabet:
  • upper case
  • upper + lower case
  • upper + lower case + signs ...

n bits allow us to represent 2n distinct pieces of information 2n distinct pieces of information can be represented by log2(2n) = n log2 (2) = n bits

General rule: For K distinct information, the number of bits n needed to represent this information is the integer higher or equal to log2 K

1 2 2 4 3 The days of the week 7 8 The digits from 0 to 9 10 4 16 5 32 The uppercase letters of the latin alphabet 26

slide-10
SLIDE 10

ICC Module Computation – Information Representation

10

n bits allow us to represent 2n distinct pieces of information

Good practice for fast estimation:

210 = Kb (Ki) ≈ 103 = kilo (k) 220 = Mb (Mi) ≈ 106 = mega (M) 230 = Gb (Gi) ≈ 109 = giga (G) 232 = 230+2 = 230 .22 ≈ 4 G

n 2n 1 2 2 4 3 8 4 16 5 32 6 64 7 128 8 256 10 1'024 20 1'048'576 30 1'073'741'824 32 4'294'967'296

slide-11
SLIDE 11

ICC Module Computation – Information Representation

11

Convention: a byte (octet in French) is a group of 8 bits. Shortcut for byte: B Recall shortcut for bit: b (or simply bit) The most common information representations use a byte or a sequence of bytes.

Organization of the information

byte

slide-12
SLIDE 12

ICC Module Computation – Information Representation

12

§ What is the simplest system to represent information? § How many bits to you need to store all the days of a year? § How many pieces of information can you store with 2B (bytes)?

Quiz

slide-13
SLIDE 13

ICC Module Computation – Information Representation

13

§ Representation of the information § Natural Numbers (e.g., 2 4 5 6): operations/domain § Integers (e.g., -1 -5 4 45698) - Videos § Reals (e.g., 3.4 4.756): fix and floating point - Videos § From the alphabet to the ideograms (next week)

Agenda

slide-14
SLIDE 14

ICC Module Computation – Information Representation

14

Representing Natural Numbers (Entier naturel)

slide-15
SLIDE 15

ICC Module Computation – Information Representation

15

Reminder: all numbers can be represented with a set of binary elements. Definition: a sequence of 0’s and 1’s is called a binary pattern A binary pattern on its own is not enough to understand what is encoded. We need an interpretation method of the binary pattern given as data One solution: the positional notation of numbers

How to represent a natural number?

slide-16
SLIDE 16

ICC Module Computation – Information Representation

16

Example of an integer in base 10: 703 The number 703 is the abbreviated notation of the expression: 7 . 102 + 0 . 101 + 3 . 100 § the digit on the right is always multiplied to the base (10) raised to the power 0 § the power of the base increases by one from digit to digit, going from right to left § this convention of positional notation can be used with any base

Positional notation of numbers

slide-17
SLIDE 17

ICC Module Computation – Information Representation

17

§ Depends on the same conventions as in base 10 (decimal) § Most significant (bit) on the left (MSB) § Least significant (bit) on the right (LSB)

Positional representation in base 2

20 21 22 23 24 25 26 27

MSB LSB

slide-18
SLIDE 18

ICC Module Computation – Information Representation

18

§ From binary to decimal: § add the powers of two present in the binary pattern

Practice: Conversions

1 2 4 8 16 32 64 128

20 21 22 23 24 25 26 27

1 1 1 2 1 8 + + + + + + + = 11

slide-19
SLIDE 19

ICC Module Computation – Information Representation

19

From decimal to binary: decompose an integer X to a sum of powers of two: § 11dec = 23 + 21 + 20 = 1011bin Algorithm: take the integer division of the number by 2 as long as the result it larger than or equal to 2

11 = 2.5 + 1 = 2.(2.2 + 1) + 1 = 2.(2.(2.1 + 0) +1) + 1 = 1.23 + 0.22 + 1.21 + 1.20 = 1011

Practice: Conversions

11 div 2 = 5 + 1 rest 5 div 2 = 2 + 1 rest 2 div 2 = 1 + 0 rest

1011

slide-20
SLIDE 20

ICC Module Computation – Information Representation

20

A representation for a computer is associated to a fix capacity expressed in number of bits (or of bytes). Example: 32-bit computer. This device has instructions to implement the base operations (addition, multiplication, etc.) very rapidly for numbers represented with 4 bytes (32 bits). So the limit to the number of different numbers that can be represented is 232

Natural numbers: covered domain (1)

slide-21
SLIDE 21

ICC Module Computation – Information Representation

21

If the representation is of natural numbers (= non-negative integers), its covered domain for 32 bits is: Min = binary pattern with 0 everywhere = zero Max = binary pattern with 1 everywhere = 232 --1

232 20 21 230 231 32 bits

Natural Numbers: covered domain (2)

slide-22
SLIDE 22

ICC Module Computation – Information Representation

22

§ If we represent natural numbers with 8 bits using the positional representation in base 2, which numbers can we represent? § Which number does the binary patter 1001001 represent, if we interpret it using positional representation in base 2? § What is the representation of number 156 using 8 bits in positional representation in base 2?

Quiz

slide-23
SLIDE 23

ICC Module Computation – Information Representation

23

Computations on natural numbers are correct if the desired result is a natural number and belongs to the covered domain The chosen representation must take into account all possible

  • utcomes

Reasons for capacity overflow:

  • integer division: Loss of fractional part
  • multiplication, addition, subtraction: propagation of the

carry beyond 231

Natural Numbers: covered domain (3)

slide-24
SLIDE 24

ICC Module Computation – Information Representation

24

§ Addition tables with numbers 0-9 and 0-1

Addition in Decimal vs Binary

a b a+b 1 1 2 2 .. .. .. 9 9 1 1 1 1 2 .. .. .. 2 2 2 1 3 .. .. .. 9 9 1 8 a b a+b 1 1 1 1 1 1 1 21 20

slide-25
SLIDE 25

ICC Module Computation – Information Representation

25

Example 1: addition of 2 integer of capacity of one bit 1 1 +0 +1 +0 +1

  • 1

1 10

Examples of capacity overflow (1)

the carry is lost

Only one bit for position 20, therefore position 21 is lost.

slide-26
SLIDE 26

ICC Module Computation – Information Representation

26

Example 2: addition with 32 bits

Examples of capacity overflow (2)

231 232 20 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

(232 – 1 ) + 1 = ?

slide-27
SLIDE 27

ICC Module Computation – Information Representation

27

010

Example:

  • n 3 bits

001 011 100 101 110 111 000

1 2 3 4 5 6 7

Unsigned integers: covered domain and overflow

slide-28
SLIDE 28

ICC Module Computation – Information Representation

28

§ Representation of the information § Natural Numbers (e.g., 2 4 5 6): operations/domain § Integers (e.g., -1 -5 4 45698) - Videos § Reals (e.g., 3.4 4.756): fix and floating point - Videos § From the alphabet to the ideograms (next week)

Agenda