information computation and communication
play

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


  1. ICC Module Computation – Information Representation Information, Computation, and Communication Representation of Information 1

  2. ICC Module Computation – Information Representation Computation works with information Scientific Google computation/simulation datacenter --> numbers Information management --> text, photos, movies… Control process -->signals (measurements, control...) 2

  3. ICC Module Computation – Information Representation Objectives § Which ways can we use to represent numbers and symbols? § Is it possible to build an exact representation of the real world? 3

  4. ICC Module Computation – Information Representation Agenda § 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) 4

  5. ICC Module Computation – Information Representation A Convention 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. 5

  6. ICC Module Computation – Information Representation Towards the elementary unit of information 214 graphical motifs , called keys, were used to build ~100.000 Chinese ideograms The 26 letters of the Latin alphabet have been A B C … used to build/create ~1.000.000 words of western languages The 10 Arabic digits allow us to create an infinity of 0 1 2 3… 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 6

  7. ICC Module Computation – Information Representation A Bit 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 7

  8. ICC Module Computation – Information Representation 0 2 1 distinct pieces 1 bit of information 1 How to represent more information? 0 0 2 2 0 1 0 distinct pieces 2 bits of information 1 0 1 1 1 8

  9. ICC Module Computation – Information Representation n bits allow us to represent 2 n distinct pieces of information 2 n distinct pieces of information can be represented by 2 1 3 5 log 2 ( 2 n ) = n log 2 ( 2 ) = n bits 4 The uppercase letters of the latin alphabet The digits from 0 to 9 Exercise: The days of the week How many bits do we need to represent 2 4 • the days of the week: • the digits 0 to 9 : 8 • the letters of the alphabet: • upper case 10 • upper + lower case 7 16 • upper + lower case + signs ... General rule: For K distinct information , the number of bits n needed to represent this information 26 is the integer higher or equal to log 2 K 9 32

  10. ICC Module Computation – Information Representation n bits allow us to represent 2 n distinct pieces of information n 2 n 1 2 Good practice for fast estimation: 2 4 3 8 2 10 = Kb (Ki) ≈ 10 3 = kilo (k) 4 16 2 20 = Mb (Mi) ≈ 10 6 = mega (M) 5 32 6 64 2 30 = Gb (Gi) ≈ 10 9 = giga (G) 7 128 8 256 10 1'024 2 32 = 2 30+2 = 2 30 . 2 2 ≈ 4 G 20 1'048'576 30 1'073'741'824 32 4'294'967'296 10

  11. ICC Module Computation – Information Representation Organization of the information 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. byte 11

  12. ICC Module Computation – Information Representation Quiz § 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)? 12

  13. ICC Module Computation – Information Representation Agenda § 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) 13

  14. ICC Module Computation – Information Representation Representing Natural Numbers (Entier naturel) 14

  15. ICC Module Computation – Information Representation How to represent a natural number? 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 15

  16. ICC Module Computation – Information Representation Positional notation of numbers Example of an integer in base 10: 703 The number 703 is the abbreviated notation of the expression: 7 . 10 2 + 0 . 10 1 + 3 . 10 0 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 16

  17. ICC Module Computation – Information Representation Positional representation in base 2 § Depends on the same conventions as in base 10 (decimal) MSB LSB 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 § Most significant (bit) on the left (MSB) § Least significant (bit) on the right (LSB) 17

  18. ICC Module Computation – Information Representation Practice: Conversions § From binary to decimal: 1 16 8 4 2 128 64 32 2 7 2 6 2 5 2 4 2 3 2 2 2 1 2 0 1 0 0 1 0 1 0 0 § add the powers of two present in the binary pattern + + + + + + + 0 1 = 11 0 0 0 0 8 2 18

  19. ICC Module Computation – Information Representation Practice: Conversions From decimal to binary : decompose an integer X to a sum of powers of two: § 11 dec = 2 3 + 2 1 + 2 0 = 1011 bin 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 11 div 2 = 5 + 1 rest = 2 . (2 . 2 + 1) + 1 5 div 2 = 2 + 1 rest = 2 . (2 . (2 . 1 + 0) +1) + 1 2 div 2 = 1 + 0 rest = 1 . 2 3 + 0 . 2 2 + 1 . 2 1 + 1 . 2 0 = 1011 1011 19

  20. ICC Module Computation – Information Representation Natural numbers: covered domain (1) 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 2 32 20

  21. ICC Module Computation – Information Representation Natural Numbers: covered domain (2) If the representation is of natural numbers (= non-negative integers), its covered domain for 32 bits is: Min = binary pattern with 0 everywhere = zero 2 32 2 31 2 0 2 30 2 1 Max = binary pattern with 1 32 bits everywhere = 2 32 --1 21

  22. ICC Module Computation – Information Representation Quiz § 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? 22

  23. ICC Module Computation – Information Representation Natural Numbers: covered domain (3) 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 outcomes Reasons for capacity overflow: integer division: Loss of fractional part • multiplication, addition, subtraction: propagation of the • carry beyond 2 31 23

  24. ICC Module Computation – Information Representation Addition in Decimal vs Binary § Addition tables with numbers 0-9 and 0-1 a b a+b a b a+b 0 0 0 0 0 0 0 1 1 0 1 1 0 2 2 1 0 1 .. .. .. 1 1 1 0 0 9 9 2 1 2 0 1 0 1 1 1 2 .. .. .. 2 0 2 2 1 3 .. .. .. 9 9 1 8 24

  25. ICC Module Computation – Information Representation Examples of capacity overflow (1) Example 1: addition of 2 integer of capacity of one bit 0 0 1 1 +0 +1 +0 +1 -- -- -- -- 0 1 1 10 Only one bit for position 2 0 , therefore position 2 1 is lost. the carry is lost 25

  26. ICC Module Computation – Information Representation Examples of capacity overflow (2) Example 2: addition with 32 bits (2 32 – 1 ) + 1 = ? 0 2 31 2 32 2 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 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 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 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 26

  27. ICC Module Computation – Information Representation Unsigned integers: covered domain and overflow Example: 000 on 3 bits 001 111 0 1 7 010 110 2 6 3 5 4 101 011 100 27

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend