0% found this document useful (0 votes)
31 views

ECS15: Introduction To Computers: Part I. More General Class Information Part II. Digital Data

Computers are rational - understand, not memorize. Active classroom participation; e.g. Ask questions, in do your own assignments - you will understand what you do!

Uploaded by

Brittany Han
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views

ECS15: Introduction To Computers: Part I. More General Class Information Part II. Digital Data

Computers are rational - understand, not memorize. Active classroom participation; e.g. Ask questions, in do your own assignments - you will understand what you do!

Uploaded by

Brittany Han
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 20

ECS15: Introduction to Computers Lecture 2 Part I. More general class information Part II.

Digital Data

Course materials
Textbooks (optional but very useful)
Michael Dawson, Python programming for the absolute beginner, 2nd edition, Thomson Course Technology, ISBN: 1-59863-112-8. Spraul, V. Anton, Computer Science Made Simple, Broadway Books, 2005, ISBN: 0-7679-1707-3.

Lectures and Labs Lecture notes on Python (from Prof Koehl) Smartsite:
Announcements Assignments Gradebook Chatroom

Some rules
All lab assignments require individual efforts. Discussions are allowed, no copying allowed. Late policy
Full credit if on time 50% if within 24 hours 25% if within 48 hours 0 after 48 hours

Regrading Policy
One week regrading period after grades returned to students

Exam policy: no make ups! (Plan accordingly.)


Midterm Tues, Feb 21; Final Tuesday, March 20, 10:30am - 12:30pm

Incomplete will not be granted


Unless proved emergency with filled emergency form

Academic Integrity
Writing: we use commercial software to check for plagiarism Lab assignments Take this opportunity to learn professionalism in writing (see class homepage for example of proper way to word an email).

How to get a good grade?


Computers are rational Understand, not memorize. Active classroom participation; e.g. ask questions, in Do your own assignments You will understand what you do! Make sure you check the web site + notes + textbooks Midterm course review Final review
class exercises. This will help if you are boarder line in grades.

What we will study


Computers (3-4 weeks) Hardware: motherboard, processor, memory, I/O devices, etc. Software and application: Graphics: image, video, 2D, 3D, game, History and ethics The Internet (2-3 weeks) Layered architecture Applications: web, email, p2p, etc. The path of your email/webpage. LAN: local area network, wireless local area network. Security Python Programming (3-4 weeks) Getting started Basic concepts: type, variable, I/O Loops: while, for, Conditionals: if

Term paper
20% of the total grade ~2500 words (around 10 pages) A research paper on a topic related to computers that interest you An opportunity to learn how computers are used in an area you are interested in. Start early! (Dates below may change, stay posted.)

Prospectus due Friday, January 20 Progress report Due Friday, February 3 Draft due Friday, February 17 The paper itself is due Friday, Mar 9 All due at 6pm, submitted via Smartsite.

Possible Topics
Computers in education for teaching reading for teaching music Computers in biology bioinformatics computational biology Computers in art, architecture, and design computer-generated and computer-supported art computer-aided design Digital libraries legal issues (e.g., intellectual property) technologies Music on the Internet Internet on entertainment P2P file sharing Video-on-demand E-books Social networking websites and their impacts -- Copyright and Digital Rights Management Online advertising Google, adwords, auctions, consumer behavior Security and privacy computer and/or Internet addiction failures due to computers -- Stock market crash due to automated trading famous computer viruses and "worms" Digital divide

Computer Science
heory of computation T oftware engineering S omputer graphics C omputer security and cryptography C omputer networks C rtificial intelligence A uman-computer interface H ioinformatics B ystem and architecture S

Computers and You


The computer will implement whatever you tell it to It can be your best friend It may mean a lot of frustration It does exactly what you tell it to Your job is to figure out what/how to tell it! Learning the language is easy First Digital Data Second Programming: instructions (algorithms) for data transformation Third Digital Logic: from algorithm to transistors

Topic 1: Digital Data


Binary and Hexadecimal numbers ASCII code and UNICODE Sampling and Quantitizing
Example: sound

Basic Concepts
Binary and Hexadecimal numbers ASCII code and UNICODE Sampling and Quantitizing
Example: sound

Number representation
We are used to counting in base 10:
1000 100 10 1

103
..

102

101
tens

100
units

thousands hundreds

Example: 1
1000

7
100

3
10

2
1

digits

1x1000+7x100+3x10+2x1 = 1732

Number representation
Computers use a different system: base 2:
1024 210 512 29 256 28 128 27 64 26 32 25 16 24 8 23 4 22 21 2 1 20

Example: 1
1024

1
512

0
256

1
128

1
64

0
32

0
16

0
8

1
4

0
2

0
1

bits

1x1024+1x512+0x256+1x128+1x64+0x32+ 0x16+ 0x8 + 1x4 + 0x2 + 0x1 = 1732

Number representation
Base 10 0 1 2 3 4 5 6 253 254 255 Base 2 0 1 10 11 100 101 110 11111101 11111110 11111111

Conversion
From base 2 to base 10: 1
1024

1
512

1
256

0
128

1
64

0
32

1
16

0
8

1
4

0
2

0
1

1x1024+1x512+1x256+0x128+1x64+0x32+ 1x16+ 0x8 + 1x4 + 0x2 + 0x1 = 1876

From base 10 to base 2:


1877 %2 = 938 %2 = 469 %2 = 234 %2 = 117 %2 = 58 %2 = 29 %2 = 14 %2 = 7 %2 = 3 %2 = 1 %2 = 938 469 234 117 58 29 14 7 3 1 0 Remainder 1 Remainder 0 Remainder 1 Remainder 0 Remainder 1 Remainder 0 Remainder 1 Remainder 0 Remainder 1 Remainder 1 Remainder 1

1877 (base10) = 11101010101 (base 2)

Facts about Binary Numbers


- ach digit of a binary number (each 0 or 1) is called a bit E - byte = 8 bits 1 - KB = 1 kilobyte = 210 bytes = 1024 bytes (1 thousand bytes) 1 - MB = 1 Megabyte = 220 bytes = 1,048,580 bytes ( 1 million bytes) 1 - GB = 1 Gigabyte = 230 bytes = 1,073,741,824 bytes (1 billion bytes) 1 - TB = 1 Tetabyte = 240 bytes = 1,099,511,627,776 bytes ( 1 trillion bytes) 1 - byte can represent numbers up to 255: 11111111 (base 2) = 255 (base 10) A - he maximum number represented by a binary number of size N is 2N - 1 T

In class exercise
1. Choose at random a base 2 number, of 8 digits in length, with for 1s and four 0s. Convert it to the corresponding base 10 number. 2. Choose at random a 4 digit base 10 number. Make sure it is not a simple power of 2. Convert it into the corresponding binary number.

Hexadecimal numbers
While base 10 and base 2 are the most common bases used to represent numbers, others are also possible: base 16 is another popular one, corresponding to hexadecimal numbers
256 162 16 161 1 160

The digits are: 0 1 2 3 4 5 6 7 8 9 A B C D E F Example:


2 256 A 16 F 1 15x1 = 687

2x256 + 10*16 +

Hexadecimal numbers
Everything we have learned in base 10 should be studied again in other bases !! Example: multiplication table in base 16:

Number representation
Base 10 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Base 2 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Base 16 0 1 2 3 4 5 6 7 8 9 A B C D E F

You might also like