Thursday, September 22, 2011

lecture


http://xkcd.com/792/

password reuse

http://xkcd.com/936/


how come some computers are MUCH MORE COSTLY than others?
power. how much you can do at one time.

speed.
measures in hertz
http://en.wikipedia.org/wiki/Hertz

Gigahertz
http://en.wikipedia.org/wiki/Megahertz_myth

other factors:
RAM -- how much do you have?

swap space -- they will swap data and instructions from RAM to the hard drive and back

Moore's law
http://en.wikipedia.org/wiki/Moore's_law

also, computing speed does seem to continuously increase

Traveling salesman problem

millenium prize
http://www.claymath.org/millennium/

1) Generate all permutations of cities
2) For each, calculate the trip length
3) Go through all those lengths, select the smallest one

This works for 4 cities
only 4! permutations

100 cities?
100!
20,098,468,420,666 years

this is assuming current computer architecture
there are other approaches
multiple CPUs in one computer
parallel computing

Quantum computing
DNA computing
maybe we can solve it that way

Phishing

<a href="http://scamsite.com">www.trustedbank.com</a>
http://en.wikipedia.org/wiki/Phishing

Tuesday, September 20, 2011

lecture notes


assigned reading:
finish ch 1 in lecture book
do the quickchecks


first quiz:
up to last class. in lab. next tuesday.

types of software
System
programming software
end-user

VBA (visual basic for applications)
1) You will need to display the Developer Tab
search google for:
how do i display the Developer Tab in word 2010
http://msdn.microsoft.com/en-us/library/bb608625.aspx

2) Click on the Visual Basic Button

3) Insert / UserForm

4) Draw a userform

5) Click Play

6) Save the document as a macro-enabled document


http://www.w3schools.com/
to learn HTML
try it out editor
go up to HTML basic


Word Exam walkthrough



Practice Word Exam.
Word practice exam file, 

Word exam:

Thursday, September 15, 2011


how do we store images?
what are the repercussions in terms of file size?

pixel - picture element
300 x 200 dimensions
60000

using 256 colors, each byte = 1 pixel
60000 bytes

using 16 colors, each nibble = 1 pixel
30000 bytes

using 2 colors, each bit = 1 pixel
60000/4 bytes bytes

24 bit bitmap (true color)
each pixel = 3 bytes
RGB
60000 x 3 bytes

covered bitmaps

raster graphics and vector graphics
http://en.wikipedia.org/wiki/Raster_graphics
http://en.wikipedia.org/wiki/Vector_graphics
http://en.wikipedia.org/wiki/Scalable_Vector_Graphics

http://www.w3schools.com/

http://www.w3schools.com/svg/default.asp

vector graphics will be sharper when zoom in
will take less space

counting in binary

bitmap

Tuesday, September 13, 2011


reading:
lecture book, ch 1, section a
hw: quickcheck at the end of the section

how do we store numbers?
base 2 numbers
decimal = base 10 numbers
binary = base 2 numbers

how do we store letters?
ASCII -
http://www.asciitable.com/

extended ascii
there is also unicode
A

http://www.ssec.wisc.edu/~tomw/java/unicode.html



nibble = 4 bits
word = 2 bytes
dword = 4 bytes

kilobyte = 1024 bytes (2^10)
megabyte = 2^20 (1024 kilobytes)
gigabyte = 2^30
trilobite = extinct marine arthropod
terabyte = 2^40

http://en.wikipedia.org/wiki/Terabyte


try converting the following binary to decimal:
101101

try converting 542 into binary


Thursday, September 8, 2011

lecture


lbinary
bits 0, 1

machine language: 0100111 10001 100111

add 5 and 6

next level:
assembly language

move into A the value 5
move into B the value 6
add A and B and store the result in A

MOV AX, 5
MOV BX, 6
ADD AX, BX

An assembler program (first written in machine language) takes as input some text consisting of assembly language, puts out output of 0100100111001

C++, Java, JavaScript, Visual Basic, Python: programming languages. On a higher level than assembly language.

Visual Basic:
For I = 1 To 10
MsgBox "Hello!"
Next

100: MOV AX, 1
108: SAY "Hello!"
ADD AX, 1
CMP AX, 11
JNE 108

this is a loop

2 different ways of translating a computer program:
* compiling : will give me an EXE
* interpreting




Tuesday, September 6, 2011

lecture notes


General purpose machine / universal computer

hardware -- physical components of the computer
software -- instructions (a type of data)

pass info from one component in von Neumann architecture to another via the bus


1) First, my program sits on the hard drive
2) Double click on it, it is copied to RAM
3) Point the IP (instruction pointer) to the beginning of the computer program.
4) fetch-execute cycle
a) fetch
b) execute
c) fetch
d) execute

a loop

algorithm: recipe. a set of instructions one can follow to solve some problem.

RAM: short term memory.
RAM: stands for Random Access Memory
as opposed to - sequential access memory
Random Access Memory means that you can get to any random slot in memory in about equal time.

RAM is much more expensive than Hard Drives.
500 GB of HD space
But, only 4 GB of RAM


Von Neumann Architecture


Thursday, September 1, 2011

lecture 2 notes


What is a computer?
something that computes

what does a "computer" need?

eyes, ears (input)
mouth, hands (output)
memory (short term)
control
math ability (brain)

Alan Turing
http://en.wikipedia.org/wiki/Alan_Turing
Turing Test
(part of field of AI -artificial intelligence)

link to a description of Machine passing Turing test

http://home.sprynet.com/~owl1/turing.htm

http://xkcd.com/329/


on a machine:

input (keyboard)
output (speakers)
short-term memory (RAM)
CPU - central processing unit
- ALU -- arithmetic / logic unit
- control unit

von Neumann architecture
http://en.wikipedia.org/wiki/Von_Neumann_architecture

how do I increase pages in a Word Document

1 pt = 1/72 "
change line spacing, including "Exactly" and "Multiple"
adjust margins
replace periods with periods with 16pt (search and replace)
change font face itself
change point size

serif
sans serif

fixed width
proportional