1 / 54

MATH 1020: Mathematics For Non-science Chapter 3: Information in a networked age

MATH 1020: Mathematics For Non-science Chapter 3: Information in a networked age. Instructor: Dr. Ken Tsang Room E409-R9 Email: kentsang @uic.edu.hk. Transmitting Information. Binary codes Data compression Encoding with parity-check sums Cryptography

Download Presentation

MATH 1020: Mathematics For Non-science Chapter 3: Information in a networked age

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MATH 1020: Mathematics For Non-scienceChapter 3: Information in a networked age Instructor: Dr. Ken Tsang Room E409-R9 Email: kentsang@uic.edu.hk

  2. Transmitting Information • Binary codes • Data compression • Encoding with parity-check sums • Cryptography • Model the genetic code

  3. Information , data & numbers • Today information are transmitted all over the world through the internet • Information is just collection of data • Pictures – jpg, tif … • Sound – mp3, mp4 • Video – wmv, mvb • Data consisted of numbers

  4. Decimal Number System • As human normally counts with hands and there are totally 10 fingers on both hands, this probably explains the origin of the decimal number system. • 10 digits: • 0,1,2,3,4,5,6,7,8,9 • Also called base-10 number system, • Or Hindu-Arabic, or Arabic system • Counting in base-10 • 1,2,…,9,10,11,…,19,20,21,…,99,100,… • Decimal number in expanded notation • 234 = 2 * 100 + 3 * 10 + 4 * 1

  5. Hindu–Arabic numeral system The Brahmi (ancient Indian) numerals at the basis of the system predate the Common Era. The development of the positional decimal system occurred during the Gupta period (笈多王朝, 320 to 540 CE). Aryabhata, a Gupta period scholar, is believed to be the first to come up with the concept of zero. These Indian developments were taken up in Islamic mathematics in the 8th century. A young Italian in the 12th century, Fibonacci, traveled throughout the Mediterranean world to study under the leading Arab mathematicians of the time, recognizing that arithmetic with Hindu-Arabic numerals is simpler and more efficient than with Roman numerals.

  6. Fibonacci (1170-1250 CE) The numeral system came to be called "Arabic" by the Europeans. It was used in European mathematics from the 12th century, and entered common use from the 15th century. Fibonacci significantly influenced the evolution of capitalist enterprise and public finance in Europe in the centuries that followed. Italian mathematician, Leonardo Fibonacci (through the publication in 1202 of his Book of Calculation, the Liber Abaci) introduced the Arabic numerals, the use of zero, and the positional decimal system to the Latin world. Liber Abaci showed the practical importance of the new numeral system, by applying it to commercial bookkeeping.

  7. Positional Numbering System • The value of a digit in a number depends on: • The digit itself • The position of the digit within the number • So 123 is different from 321 • 123: 1 hundred, 2 tens, and 3 units • 321: 3 hundred, 2 tens, and 1 units

  8. Roman numerals • Roman numerals are numeral system of ancient Rome based on the letters of the alphabet • The first ten Roman numerals are I, II, III, IV, V, VI, VII, VIII, IX, and X. (no zero) • Tens: X; hundreds: C; thousands: M • Non-positional: e.g. • 321  CCCXXI • 982  CMLXXXII • 2010  MMX

  9. Non-decimal Number Systems The Maya civilization and other civilizations of pre-Columbian Mesoamerica used base-20 (vigesimal), as did several North American tribes (two being in southern California). Evidence of base-20 counting systems is also found in the languages of central and western Africa. The Irish language also used base-20 in the past. Danish numerals display a similar base-20 structure.

  10. Base r Number System • For any value r • Value is based on the sum of a power series in powers of r • r is called the base, or radix

  11. Binary Number System • Binary number system has only two digits • 0, 1 • Also called base-2 system • Counting in binary system • 0, 1, 10, 11, 100, 101, 110, 111, 1000,…. • Binary number in expanded notation • (1011)2 = 1*23+ 0*22+ 1*21+ 1*20 • (1011)2 = 1*8 + 0*4 + 1*2 + 1*1 = (11)10

  12. Why Binary? • Computer is a Binary machine • It knows only ones and zeroes • Easy to implement in electronic circuits • Reliable • Cheap

  13. Gottfried Leibniz (1646-1716) Leibniz, German mathematician and philosopher, invented at least two things that are essential for the modern world: calculus, and the binary system. He invented the binary system around 1679, and published in 1701. This became the basis of virtually all modern computers.

  14. Leibniz's Step Reckoner • Leibniz designed a machine to carry out multiplication, the 'Stepped Reckoner'. It can multiple number of up to 5 and 12 digits to give a 16 digit operand. The machine was later lost in an attic until 1879.

  15. Leibniz & I-Ching (易经) As a Sinophile, Leibniz was aware of the I-Ching and noted with fascination how its hexagrams correspond to the binary numbers, and concluded that this mapping was evidence of major Chinese accomplishments in the sort of philosophical mathematics he admired.

  16. An ancient Chinese binary number system in Yi-Jing (易经) • Two symbols to represent 2 digits • Zero: represented by a broken line • One: represented by an unbroken line • “—” yan 阳爻,“--” yin 阴爻。

  17. Hexadecimal • Hexadecimal number system has 16 digits • 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F • Also called base-16 system • Counting in Hexadecimal • 0,1,…,F,10,11,…,1F,20,…FF,100,… • Hexadecimal number in expanded notation • (FF)16 = 15*161+ 15*160 = (255)10

  18. Some Numbers to Remember

  19. Bit and Byte • BIT = Binary digIT, “0” or “1” • State of on or off ( high or low) of a computer circuit • Kilo 1K = 210 = 1024 ≈ 103 • Mega 1M = 220 = 1,048,576 ≈ 106 • Giga 1G = 230 = 1,073,741,824 ≈ 109

  20. Bit and Byte • Byte is the basic unit of addressable memory • 1 Byte = 8 Bits • The right-most bit is called the LSB Least Significant Bit • The Left-most bit is called the MSB Most Significant Bit

  21. Natural Numbers • Natural numbers • Zero and any number obtained by repeatedly adding one to it • Negative Numbers • A value less than 0, with a – sign • Integers • A natural number, a negative number, zero • Rational Numbers • An integer or the quotient of two integers • We will only discuss the binary representation of non-negative integers

  22. Why Hexadecimal? • Hexadecimal is meaningful to humans, and easy to work with for a computer • Compact • A BYTE is composed of 8 bits • One byte can thus be expressed by 2 digits in hexadecimal • 11101111  EF • 11101111b EFh • Simple to convert them to binary

  23. Conversions Between Number Systems • Binary to Decimal

  24. Conversions Between Number Systems • Hexadecimal to Decimal

  25. Conversions Between Number Systems • Octal to Decimal • (32)8 = (?)10 • What’s wrong? • (187)8 = 1*64 + 8*8 + 7*1

  26. quotient remainder 321 / 2 = 160 1 160 / 2 = 80 0 80 / 2 = 40 0 40 / 2 = 20 0 20 / 2 = 10 0 10 / 2 = 5 0 5 / 2 = 2 1 2 / 2 = 1 0 1 / 2 = 0 1 Conversions Between Number Systems 32110 = ?2 • Decimal to Binary Reading the remainders from bottomto top, we have 32110 = 1010000012

  27. One More Example Convert 14710 to binary So, 14710 = 100100112

  28. Conversions Between Number Systems • Decimal to Base r • Same as Decimal to Binary • Divide the number by r • Record the quotient and remainder • Divide the new quotient by r again • ….. • Repeat until the newest quotient is 0 • Read the remainder from bottom to top

  29. Analogue Data • Analogue: something that is analogous or similar to something else (Webster) • Analogue Data: The use of continuously changing quantities to represent data. • A mercury thermometer is an analoguedevice. The mercury rises and falls in a continuous flow in the tube in direct proportion to the temperature. • The mathematical idealization of this smooth change as a continuous function leads to “Analogue Data”, an infinite amount of data

  30. From Analogue to Digital data • Data can be represented in one of two ways: analogueor digital: Analoguedata: A continuous representation (using mathematical function or smooth curve) , analogous to the actual information it represents Digitaldata: A discrete representation, breaking the information up into separate elements (data)

  31. Digitized Information • Computers, cannot work with analogue information • So we digitizeinformation by breaking it into pieces and representing those pieces separately • Why do we use binary? • Modern computers are designed to use and manage binary values because the devices that store and manage the data are far less expensive and far more reliable if they only have to represent one of two possible values.

  32. Binary Representation • One bit can be either 0 or 1 (“on” & “off” electronic signals) • 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

  33. Binary Representation Represents 2 numbers 4 8 16 32

  34. Binary Representation • In general, n bits can represent 2n things because there are 2n combinations of 0 and 1 that can be made from n bits • Note that every time we increase the number of bits by 1, we double the number of things we can represent • Questions: • How many bits are needed to represent 128 things? • How many bits are needed to represent 67 things?

  35. Binary mathematics Logical operations AND OR XOR

  36. ASCII • ASCII stands for American Standard Code for Information Interchange • The ASCII character set originally used seven bits to represent each character, allowing for 128 unique characters • Later ASCII evolved so that all eight bits were used which allows for 256 characters

  37. ASCII code

  38. ASCII • Note that the first 32 characters in the ASCII character chart do not have a simple character representation that you could print to the screen (unprintable)

  39. Unicode characters • Extended version of the ASCII character set is not enough for international use • The Unicode character set uses 16 bits per character • Therefore, the Unicode character set can represent 216, or over 65 thousand, characters • Unicode was designed to be a superset of ASCII • The first 256 characters in the Unicode character set correspond exactly to the extended ASCII character set • With the Unicode, all text (in most languages) information can be represented.

  40. Unicode 4 Hex-numerals to represent 1 Unicode

  41. Representing Audio Information • To digitize the signal we periodicallymeasure the voltage of the signal and record the appropriate numeric value • this process is called sampling • In general, a sampling rate of around 40,000 times per second is enough to create a reasonable sound reproduction

  42. Representing Audio Information

  43. Representing Audio Information • A compact disk (CD) stores audio information digitally • On the surface of the CD are microscopic pits that represent • Binary digits • A low intensity laser is pointed as the disc • The laser light reflects strongly if the surface is smooth and reflects poorly if the surface is pitted

  44. Representing Audio Information • Audio Formats • WAV, AU, AIFF, VQF, and MP3 • MP3 is dominant • MP3 is short for MPEG (Moving Picture Experts Group)audio layer 3 file • MP3 employs both lossy and lossless compression • First it analyzes the frequency spread and compares it to mathematical models of human psychoacoustics (the study of the interrelation between the ear and the brain), then it discards information that can’t be heard by humans • Then the bit stream is compressed to achieve additional compression

  45. Image Basics 00000000000000000011110000000000000000 00000000000000001100001100000000000000 00000000000000010000000010000000000000 00000000000000100000000001000000000000 00000000000000100010001001000000000000 00000000000001000111011100100000000000 00000000000001000010001000100000000000 00000000000001000000000000100000000000 00000000000001000000000000100000000000 00000000000001001000000100100000000000 00000000000000100100001001000000000000 00000000000000100011110001000000000000 00000000000000010000000010000000000000 00000000000000001100001100000000000000 00000000000000000011110000000000000000 00011110010000000000000000000000000000 01100010010000000000000000000000000000 11000100100000000000000000000000000000 00000100100001110001011000101100100100 00111111110010010001101000110101100100 00001001000100100111001011100101001000 00010010000101101010010101001011011010 00010010000110110111111011111101101100 00000000000000000100000010000000011000 00000000000000001100000110000000110000 00000000000000001000000100000000100000

  46. 1-bit, black and white 8-bit grayscale

  47. Representing Color • Color is often expressed in a computer as an RGB(red-green-blue) value, which is actually three numbers that indicate the relative contribution of each of these three primary colours • For example, an RGBvalue of (255, 255, 0) maximizes the contribution of red and green, and minimizes the contribution of blue, which results in a bright yellow

  48. RGB Color Model Red – Green – Blue Additive model combines varying amounts of these 3 colors RGB Model

  49. Image Basics (0, 255, 0) is green (255, 255, 0) is yellow (0, 255, 255) is cyan (0, 0, 255) is blue (255, 0, 0) is red (0, 0, 0) is black (255, 255, 255) is white (255, 0, 255) is magenta

  50. Three Dimension Color Space (0,0,0) (1,1,1)

More Related