Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 115: Computing for The Socio-Techno Web

Similar presentations


Presentation on theme: "CS 115: Computing for The Socio-Techno Web"— Presentation transcript:

1 CS 115: Computing for The Socio-Techno Web
( Representation of Text, Numbers and code

2 Today Computer components Binary numbers Text representation

3 Opening the box

4 Computer Architecture
Do “About this Mac” to see CPU specs, clock, memory.

5 A simple computer Fetch the next instruction from memory Decode it Execute it REPEAT ad infinitum

6 Binary numbers (Activity)

7 Bits: 0 and 1 The “blood” of the computer
Only 2 bits: electric current passes or does not pass through a wire. Only 2 bits: we use symbols 0 and 1 Still enough to represent anything: Numbers Letters Instructions Images, videos, music, … Unbelievable? Amazing?

8 Our Positional Decimal System
Positional: The position of a digit has specific meaning. You know that = 1* * * *1 (duh!) We really mean 1492 = 1* * * *100 (aha!) We really need a symbol for 0 in order to do that! The decimal system is great for arithmetic (if you are human) Computer use a binary system

9 Understanding powers of 2
Like with our decimal system, we can represent any number in binary using powers of 2: 1010 = 1* *4 + 1* *1 (= 10) 1010 = 1*23 + 0*22 + 1*21 + 0*20 (= 10) The first 10 powers of 2: x 2x 1 2 4 3 8 16 5 32 6 64 7 128 256 9 512 10 1024 Note that 1024 is almost 1000

10 Anyway, if you have two symbols…
Position of digit signifies contribution of (the corresponding) base power Base 10 1492 = 1* * *10 + 2*1 2009 = 2* * *10 + 9*1 Base 2: 1010 = 1*8 + 0*4 + 1*2 + 0*1 (= 10) 0111 = 0*8 + 1*4 + 1*2 + 1*1 (= 7) Activity: creating binary numbers You can represent any number! Apparently you need many more digits to represent a number in binary than in decimal … you can represent any number

11 How Many Bits do You Need?
Bit depth Can repr. 21 2 22 4 23 8 24 16 25 32 26 64 27 128 28 256 29 512 What comes next? Complete the table. Tera, Peta, Zetta, Iotta, 2^40 tera byte ~ 10^12 2^50 petabyte ~ million gigabyte Byte

12 Quantities of bytes

13 Happy Birthday to ? 1100 / 1001 / Dec Grace Hopper

14 Representing Text … you can represent any character A is repr’d by 65, or Hi! is repr’d by , or If you allocate enough bits…

15 ASCII code Text is represented with the so-called ASCII code. Years ago, the manufacturers of early computers decided to represent every possible character (visible or invisible, like the space or the newline) with a number. The result was (partially) the code you see below. So, A is represented by decimal number 65 or binary number The greeting "Hi!" is represented by the sequence or in binary Of course some care must be taken to recognize when we are looking at a number and when we are looking at a string of characters. But that's not difficult.

16 How many ASCII characters? 8 bits each, so there are in all
2 8 = 256 February 2, 2009

17 … of any language that exists or ever existed
The early ASCII system had space for 256 symbols, enough to represent all English characters, punctuation marks, numbers etc. It turns out that there are other languages on Earth besides English, (;-) and recent software is being written to accommodate those, too, via a much larger code called Unicode. You may want to read up on that in your spare time.

18 Unicode

19 Tamil

20 Linear A Linear A is famous for being on the Phaestos disks and contains 46 different symbols. No one has understood the language yet.


Download ppt "CS 115: Computing for The Socio-Techno Web"

Similar presentations


Ads by Google