Lecture 2 (1)

Содержание

Слайд 2

Computer

general purpose device that can be programmed to carry out a set

Computer general purpose device that can be programmed to carry out a
of arithmetic or logical operations
(Examples: cameras, phones)
Two main parts of computer:
Hardware refers to the physical parts of the computer
Example: piano is a hardware
Software refers to the code that runs on the computer
Example: the music is the software

Слайд 3

"Computer" word's history

The term "computer", in use from the early 17th century

"Computer" word's history The term "computer", in use from the early 17th
, meant "one who computes": a person performing mathematical calculations, before electronic computers became commercially available.

"The human computer is supposed to be following fixed rules; he has no authority to deviate from them in any detail."

Слайд 4

US Census 1890

US Census 1880 has taken 8 years to summarize data.
Hollerith

US Census 1890 US Census 1880 has taken 8 years to summarize
invented "Tabulating machine" electromechanical machine that was made for summarization of census

Слайд 6

Mechanical relay

Light turns on if coil was turned on

Mechanical relay Light turns on if coil was turned on

Слайд 7

Before transistors

Vacuum tubes:

Before transistors Vacuum tubes:

Слайд 8

Transistors

Transistor is a “solid state” device, meaning it has no moving parts
works

Transistors Transistor is a “solid state” device, meaning it has no moving
as a sort of amplifying valve for a flow of electrons
It is a basic building block used to construct more complex electronic components
Nowadays transistors are made of silicon
silicone (rubber) and silicon (chips, кремний) are different

Слайд 9

When B is ON current goes through C to E

When B is

When B is ON current goes through C to E When B
OFF current doesn't go through C to E

Слайд 10

Water analogy

We can apply water tube analogy to transistors

Water analogy We can apply water tube analogy to transistors

Слайд 11

What we can do with transistors?

What we can do with transistors?

Слайд 12

AND gate

When A is OFF and B is OFF current can’t pass

AND gate When A is OFF and B is OFF current can’t
A gate, Out is OFF When A is OFF and B is ON current can’t pass A gate, Out is OFF
When A is ON and B is OFF current pass A gate, but can’t pass B gate, Out is OFF
When A is ON and B is ON current pass A gate, and B gate, Out is ON

Слайд 13

AND logic table

Instead of OFF we can use FALSE
Instead of ON we

AND logic table Instead of OFF we can use FALSE Instead of
can use TRUE

Слайд 14

Schemes that perform logical operations

OR

NAND

NOR

Schemes that perform logical operations OR NAND NOR

Слайд 15

Basic Logic gates

AND

OR

XOR

NOT

Basic Logic gates AND OR XOR NOT

Слайд 16

Basic Logic gates (2)

NAND

NOR

XNOR

Basic Logic gates (2) NAND NOR XNOR

Слайд 17

How to add two numbers by logic gates

Let's create simplest ever calculator

How to add two numbers by logic gates Let's create simplest ever
It adds two binary numbers
So let's find what should it output, on specific inputs Output is XOR gates, and Carry is AND gate

Слайд 18

Binary adder (half adder)
+ 1
1
1 0

Binary adder (half adder) + 1 1 1 0

Слайд 19

Scheme for adding two 4-bit numbers, input switches are A3, A2, A1,

Scheme for adding two 4-bit numbers, input switches are A3, A2, A1,
A0 and B3, B2, B1, B0, sum is outputted into S3, S2, S1, S0

Слайд 20

Full adder

Full adder

Слайд 21

What does this scheme do?

What does this scheme do?

Слайд 22

Memory using logic gates

Flip-flops are used to save information, when S is

Memory using logic gates Flip-flops are used to save information, when S
1, Q is equal to R, when S

Слайд 23

Chips

Computer contains millions of chips
Chip- fingernail sized silicon
Chip can contain billions of

Chips Computer contains millions of chips Chip- fingernail sized silicon Chip can
transistors
Chips in plastic package with metal pins
CPU chips , memory chips, flash chips

Слайд 24

Whole picture

Transistors are switches
Logic gates are created from Transistors
Logical and arithmetical units

Whole picture Transistors are switches Logic gates are created from Transistors Logical
are created from Logic gates Chips consist of many logical and arithmetical units

Слайд 25

Moore’s law

Transistors get smaller about every 18-24 months
Can fit twice as many

Moore’s law Transistors get smaller about every 18-24 months Can fit twice
per chip
It is observation, not law
In effect, transistors/computers get cheaper (powerful)
Why computers are now in cars, thermostats
$50 MP3 player bigger every couple years: 2GB, 4GB, 8GB
Exponential - 10 doublings, about 1000 x
Moore's law ... computers cheap, everywhere

Слайд 26

Computer hardware

There are 3 major parts that make up a computer: CPU,

Computer hardware There are 3 major parts that make up a computer: CPU, RAM, Persistent Storage
RAM, Persistent Storage

Слайд 27

CPU

CPU- Central Processing Unit
CPU is big chip with many different logical and

CPU CPU- Central Processing Unit CPU is big chip with many different
arithmetical units
The brains of computer
Performs simple operations
e.g. Add two numbers, copies data from one memory to other
Run button… code “runs” on the CPU

Слайд 28

RAM - (Random Access Memory)

RAM- Memory, Random Access Memory
It is called Random

RAM - (Random Access Memory) RAM- Memory, Random Access Memory It is
Access, because any needed memory can be accessed immediately, whereas in magnetic hard disk, it takes time to rotate disc to specified place Temporary, working storage bytes
e.g. typing text in MS Word before saving document, text is stored in RAM
e.g. while playing game, the units location and life is stored in RAM RAM is “volatile”, not “persistent”,..gone when power goes out

Слайд 29

What does RAM do?

"In simple terms, RAM is to Disk Memory as

What does RAM do? "In simple terms, RAM is to Disk Memory
Pockets is to your bag. When you are going about your usual day(processing) you keep things needed frequently to you in your pocket and the remaining stuff in your bag. The reason you do this is you can access your pockets with less time compared to opening your bag and getting things out of it.
The computer does the same thing with memory. It has everything it needs in the Disk Space
but accessing that memory takes a lot of time. So it keeps the most frequently used data(currently and predictably) in the RAM which is constructed using a transistor and a capacitor connected in a matrix of word and bit lines, as it is faster to access compared to the drive which is a spinning physical disk."
Quora (Akshay Sharma)

Слайд 30

Persistent Storage: Hard Drive, Flash Drive

Hard Drive
Stores bytes as a magnetic pattern

Persistent Storage: Hard Drive, Flash Drive Hard Drive Stores bytes as a
on a spinning disk
Fragrant
Heavy

Flash Drive

Stores bytes as electrons in a chip
No moving parts
More expensive
Uses less power
e.g. usb key, SD card in camera, flash chips built into a phone or tablet

Слайд 31

Persistent Storage, Hard drive, Flash drive

Nowadays most laptops use hard drive, the

Persistent Storage, Hard drive, Flash drive Nowadays most laptops use hard drive,
only reason for using hard drive is they are cheap.
But flash drive’s cost is got cheap, from year to year, and it is expected in next 5 years that most laptop will contain flash drives instead of hard drives.

Слайд 32

Whole picture

Any program makes arithmetic and logical operations with some data. Data

Whole picture Any program makes arithmetic and logical operations with some data.
that needs to be saved for long time is stored in hard drive
Data that is operated by CPU and is used very frequently is stored RAM

Слайд 33

Measurements

Hertz - operations per second
Hz is abbreviation of Hertz
CPU’s performance is measured

Measurements Hertz - operations per second Hz is abbreviation of Hertz CPU’s
in hertzes
Bit - is measurement of memory. Bit’s value can be 1 or 0.
Byte consists of 8 bits
Hard drive’s, flash drive’s and RAM’s are measured by bits
Kilo - 10^3
Mega - 10^6
Giga - 10^9
Tera - 10^12
Peta - 10^15

Слайд 34

Ǫuestion???

You have written code for strategy game. Any warrior has 10 different

Ǫuestion??? You have written code for strategy game. Any warrior has 10
values presenting his skills, abilities, life and etc. All of them are saved in int typed variable. Each int variable takes 12 bytes in memory. If you have created an army of 100000 warriors.
What is the minimum size of necessary RAM memory?
You type some document of size 10000 symbols. Each symbol takes 1 byte of memory.
What is the minimum size of necessary hard drive’s memory?

Слайд 35

Arduino

Arduino is programmable microcontroller
You can program it
It receives input signals processes it

Arduino Arduino is programmable microcontroller You can program it It receives input
and output signals
You can design your own gadgets
Lots of compatible devices and sensors
Costs ~20$

Слайд 36

Arduino: what can we do?

http://www.makeuseof.com/tag/arduino-technology-explained/ :
it’s like a little computer you can

Arduino: what can we do? http://www.makeuseof.com/tag/arduino-technology-explained/ : it’s like a little computer
program to do things, and it interacts with the world through electronic sensors, lights, and motors. In essence, it makes some truly hardcore electronics projects accessible to anyone – so artists and creative types can concentrate on making their ideas a reality. It’s the ultimate tinkering tool

Слайд 37

Evolution of computers

1940 - 1945: computers used mostly for deciphering messages
Took place

Evolution of computers 1940 - 1945: computers used mostly for deciphering messages
of 100 square meters or more
1946 ENIAC computer has been completed
Speed: 5,000 operations per second (5 kHz)
Input/output: cards, lights, switches, plugs
Floor space: 1000 square feet (about 100 square meters)
1951 UNIVAC. First commercial computer
Speed: 1,905 operations per second (2 kHz)
Input/output: magnetic tape, unityper, printer
Memory: 1,000 12-digit words. (1.5 KB) (delay lines, magnetic tape)
Floor space: 26 cubic meters
Cost: F.O.B. factory $750,000 plus $185,000 for a high speed printer

Слайд 38

Evolution of computers (2)

1956 first computer build with transistors
1950s - 1970s beginning

Evolution of computers (2) 1956 first computer build with transistors 1950s -
of commercial computers’ era
computers were bought by companies, universities and army
They become small and more productive
1977 first personal computers were sold. Whose main characteristics were:
Price: 600$
4 kilobytes of memory
cassette storage
1984 apple’s Macintosh computer (http://www.youtube.com/watch?v=2B-XwPjn9YY)
Price: 2500$
Graphical interface
Mouse

Слайд 39

Evolution of computers (3)

1990s - 2000s: Era of personal computers
2000s - 2008s:Laptops,

Evolution of computers (3) 1990s - 2000s: Era of personal computers 2000s
get smaller and cheaper
2004 - now: Phones got smarter
2008 - now: Tablets get more popular
in 2012 tablets and smartphones were sold more than personal computers

Слайд 40

Evolution of input devices

switches
punched cards (перфокарты)
keyboard
mouse
screen

Evolution of input devices switches punched cards (перфокарты) keyboard mouse screen

Слайд 41

Punch card

https://www.youtube.com/watch?v=KG2M4ttzBnY

Punch card https://www.youtube.com/watch?v=KG2M4ttzBnY

Слайд 42

Evolution of output devices

Punched cards
Printer
Monitor

Evolution of output devices Punched cards Printer Monitor

Слайд 43

Evolution of storage devices

Magnetic tapes
Magnetic disks
1961 IBM’s magnetic disk
Capacity 28 million characters

Evolution of storage devices Magnetic tapes Magnetic disks 1961 IBM’s magnetic disk
(28 MB)
cost: $2100 per month, or purchased for $115000
1994: Floppy disks
size: 1.4 MB
Optical CD
Blu-ray disks
Flash storage

Слайд 44

The 350 Disk Storage Unit consisted of the magnetic disk memory unit

The 350 Disk Storage Unit consisted of the magnetic disk memory unit
with its access mechanism, the electronic and pneumatic controls for the access mechanism, and a small air compressor. Assembled with covers, the 350 was 60 inches long, 68 inches high and 29 inches deep. It was configured with 50 magnetic disks containing 50,000 sectors, each of which held 100 alphanumeric characters, for a capacity of 5 million characters.
Disks rotated at 1,200 rpm, tracks (20 to the inch) were recorded at up to 100 bits per inch, and typical head-to-disk spacing was 800 microinches. The execution of a "seek" instruction positioned a read-write head to the track that contained the desired sector and selected the sector for a later read or write operation. Seek time averaged about 600 milliseconds.
With storage capacities of 5 million and 10 million digits, and the capability to be installed either singly or in pairs, the 350 provided the 305 system with storage capacities of 5, 10, 15 or 20 million characters.
An IBM RAMAC 305 with a 350 disk storage unit leased for about $3,200 per month back in 1957. Over a thousand of the 305 systems (one of IBM's last vacuum tube units) were manufactured before production ended in 1961, and the 305 was withdrawn in 1969.

Слайд 45

Evolution of computer usage

First generation - science, army needs; Arithmetical calculations Second

Evolution of computer usage First generation - science, army needs; Arithmetical calculations
generation - government, big business needs; Storing data
Third generation - small and medium business needs; Useful Input and Output, smaller size Fourth generation - personal computers.

Слайд 46

Extra information

http://www.stanford.edu/class/cs101/hardware-1.html
http://www.youtube.com/watch?v=IcrBqCFLHIY

Extra information http://www.stanford.edu/class/cs101/hardware-1.html http://www.youtube.com/watch?v=IcrBqCFLHIY
Имя файла: Lecture-2-(1).pptx
Количество просмотров: 35
Количество скачиваний: 0