What is Computer?

concepcionsockSoftware and s/w Development

Aug 15, 2012 (5 years and 28 days ago)

291 views

CCLi

1

What is a Computer?

Hardware:

Software:

IBM PC, Printer, Network Card

Pentium 4, Monitor, Mouse,

Scanner, RJ45, Wireless router

Windows XP, MS Office: Word,

Excel, PowerPoint, Access, Outlook;


NetBeans, IE, Netscape,...


IBM/370

30 years ago, if you
knew this, you can
easily earn $$$,$$$ a
year

Today, if you don't know
these, you can hardly find
a no
-
sweat
-
job...


CCLi

2

Hardware

Input device

Output device

Central Processor Unit:


Internal
Storage

Control Unit

+

Arithmetic
-
Logic Unit

(ALU)

CCLi

3

Hardware

Software

Architecture

Language

What is Computer Science?

What are
we

studying?

Theory

CCLi

4

What are they, really?

Computer!

Computer!

Computer!

CCLi

5

Computer

--

What is machine?

A machine that can Compute!

What is Computation?

A computation is
a sequence of
procedures

that manipulate data.

A machine is a device that follows a
certain fixed
causal rules
.

CCLi

6

René Descartes

(1596
-
1650)


Brains are Machines!!

Image from

http://www
-
groups.dcs.st
-
and.ac.uk/~history/PictDisplay/Descartes.html

Mind

Body

Dualism:

Mind
-
Body

CCLi

7

Let’s Compute!!

“ Sir! Let’s sit down and
compute!! ”

Gottfried W.V


Leibniz

(1646
-
1716)

Image from

http://sunsite.informatik.rwth
-
aachen.de/phil/filosofer/leibniz.html

CCLi

8

Dispute that can't be resolved

Image from

http://turnbull.mcs.st
-
and.ac.uk/

Gottfried W.V Leibniz

(1646
-
1716)

Isaac Newton


(
1643
-
1727

)





f(x) dx

CCLi

9

Real Life

Are there any problems that can’t be
solved by
any

computation?

Ideal Life

There any tons of problems that can’t
be solved by computers?

a pure world of forms with infinite

computing power


CCLi

10

Alan Turing
(1912
-
1954)





The Enigma

The

man who
invented
the

computer.

Image from


http://ei.cs.vt.edu/~history/Turing.html


Turing Machine

CCLi

11

Turing Machine:

And, that is enough to beat any Super
-
Computer!!

1. A Tape (infinite)

2. A fixed finite set of symbols (0,1)

3. Four actions: (to do)


(1)

read and
(2)

write symbols from/onto the
tape, move the w/r head
(3)

back and
(4)

forth.

4. A finite transition table (what to do)

0

1

0

1

0

1

1) if ... move right..


and go to (4)

2) if ... move left..

3) if ... write 1....

4) if .. ......

......

......

1002) ....

0

CCLi

12

“Turing Machines are


human that compute”



In logic nothing is




accidental”


Image from

http://www.ags.uci.edu/~bcarver/wgallery.html

Ludwig Wittgenstein (1889
-
1951)


The

philosopher of the


20
th

century

CCLi

13

Monroe 920 Desktop Calculator

made in 1969

CCLi

14

From 8008 to Pentium 4

8008 (Intel 1972)

2500 Transistors

Pentium 4 (Intel 2000)

42,000,000 Transistors

8080 (Intel 1975)


4500 Transistors

CCLi

15

Moore's Law

Image from


http://www.hothardware.com

A computer is a vast collection of logical gates.

So, nothing is accidental in a computer.

CCLi

16

Logical Gates

1: true

0: false

AND operator

A

B

And

0

0

0

0

1

0

1

0

0

1

1

1

OR operator

A

B

OR

0

0

0

0

1

1

1

0

1

1

1

1

NOT operator

A

NOT

0

1

1

0

AND

A

B

NOT

OR

A

B

TTL gates

1: 3.5 volts

0: 0.2 volt

CCLi

17

TTL 7400 Gate

AND

NOT

AND

NOT

AND

NOT

AND

NOT

8

9

10

11

12

13

14

7

6

5

4

3

2

1

Vcc

GND

CCLi

18

Counting

1

2

3

4

5

6

7

8

9

10

11

12

13

.

.

.

.

19

20

21

22

23

.

.

.

.

29

90

91

92

93

.

.

.

.

99

0

100


0


1

10

11

100

101

110

111

1000

1001

1010

1011

1100

1101

1110

1111

10000

.

.

.


CCLi

19

Adder (half adder)

1

+)

1

1

0

1

+)

0

1

0

+)

1

1

0

+)

0

0

A

+)

B

c

S

A

B

c

Sum

0

0

0

0

0

1

0

1

1

0

0

1

1

1

1

0

A

B

S

c

Half

Adder

CCLi

20

Logical Gates for an Adder
(half adder)

A

+)

B

c

S

A

B

c

S

0

0

0

0

0

1

0

1

1

0

0

1

1

1

1

0

AND

AND

NOT

B

A

S

c

1

1

1

1




1

1

1


1





1





1


0

Half
-
Adder


0


0

0






1

1 Ghz
:
1

10
9

5=200

10
6

OR

CCLi

21

Logical Gates and Clock

AND

AND

NOT

B

A

S

c

0

1

1




1

1

1





1

0





1

Half
-
Adder

0

1

400 MHz




4

10
8
/sec

0

OR

CCLi

22

Binary Addition

1

1

0

0

1

0

1

0

1

0

0

1

1

1

1

1

1

0

0

1

0

0

1

0

0

1

1

1

1

0

0

0

+)

carry

0

1

1

0

0

0

1

0

0

1

0

1

0

1

1

1

1

0

1

0

0

0

1

0

0

1

1

1

1

1

0

1

CCLi

23

Full Adder

C
i

A

+)

B

C
o

S

C
i

A

B

C
o

S

0

0

0

0

0

0

0

1

0

1

0

1

0

0

1

0

1

1

1

0

1

0

0

0

1

1

0

1

1

0

1

1

0

1

0

1

1

1

1

1

A

B

S

Co

Full

Adder

Ci

CCLi

24

Logical Gates for a Full
-
Adder

C
i

A

+)

B

C
o

S

C
i

A

B

C
o

S

0

0

0

0

0

0

0

1

0

1

0

1

0

0

1

0

1

1

1

0

1

0

0

0

1

1

0

1

1

0

1

1

0

1

0

1

1

1

1

1

A

B

S

Co

Ci


A full
-
adder can be constructed from half
-
adders.

half
-

adder

half
-

adder

0


1


1


0

1

S

1


0

c

S

c

0

1

0


1


1


1

1

0

A Full Adder

1

OR

CCLi

25

4 bits Adder

Full

Adder

Full

Adder

Full

Adder

Full

Adder

A

B

0

1

1

0

1

0

1

0

1

0

1

1

0

0

1

0

0

1

0

0

1

0

1

1

+)

0

0

1

0

1

1

0

1

CCLi

26

Full
-
Adder and Clock

A

B

S

Co

Ci

half
-

adder

half
-

adder

c

s

c

s

1

3 3 1
1

For a 16 bits adder:
16

7
+
2
㴱ㄴ

4


8


114


㌮㔠



6

OR

CCLi

27

Leopold Kronecker


(1823
-
1891)


God created the
integers, all else is the
work of man.



Image from
http://www
-
groups.dcs.st
-
and.ac.uk/




~history/Mathematicians/Kronecker.html

CCLi

28

Adder, that’s enough!

Full

Adder

Full

Adder

Full

Adder

Full

Adder

A

B

0

1

1

0

1

0

1

0

1

0

1

1

0

0

1

0

0

1

0

0

XXXXX

Created full
-
adders,



all else is the work of programmers

CCLi

29

Conversion between number systems

Base
10

Decimal

Our ordinal number system; a decimal number
provides us a more accurate perception about its
quantity.


Base 2

Binary

The way computers handle numbers
.



Base 8

Octal

An easy way for us to memorize or say a binary
string.



Base
16

Hexadecim
al

A much easier way for us to memorize or say a
binary string.



o
8
7651
7651
.
.
g
e
H
FA9
.
.
g
e
2
01
1111101010
.
.
g
e
CCLi

30

0
1
2
3
10
4
10
8
10
7
10
3
3784








Weight

3

7

8

4

3
10
2
10
1
10
0
10
Remainder

4

8

7


0

3



10
3784
8
10
7
10
3
1
2






10
378


10
37


10
3
3
7
10
3
1


Decimal Number: 3784

Least Significant

digit

Most Significant

digit

CCLi

31

weight

2
7

2
6

2
5

2
4

2
3

2
2

2
1

2
0

1

1

0

0

1

0

0

1

1100
1001
2

=
1

2
7
+
1

2
6

+
1

2
3

+
1

2
0
=
201

Remainder

201


㈠=

1

2
6
+
1

2
5

+
1

2
2

=
100

1

100


㈠=

1

2
5
+
1

2
4

+
1

2
1

=
50

0

50


㈠=

1

2
4
+
1

2
3

+
1

2
0

=
25

0

25


㈠=

1

2
3
+
1

2
2

=
12

1

12


㈠=

1

2
2
+
1

2
1

=
6

0

6


㈠=

1

2
1
+
1

2
0

=
3

0

3


㈠=

1

2
0

=
1

1

1


㈠=


0

1

Binary number :
1100
1001
2

Least Significant bit

Most Significant bit

CCLi

32

weight

3
7

3
6

3
5

3
4

3
3

3
2

3
1

3
0

1

1

0

0

1

0

0

1

1100
1001
3

=
1

3
7
+
1

3
6

+
1

3
3

+
1

3
0
=
2944

Remainder

2944


㌠3

1

3
6
+
1

3
5

+
1

3
2

=
981

1

981


㌠=

1

3
5
+
1

3
4

+
1

3
1

=
327

0

327


3=

1

3
4
+
1

3
3

+
1

3
0

=
109

0

109


㌠=

1

3
3
+
1

3
2

=
36

1

36


㌠3

1

3
2
+
1

3
1

=
12

0

12


㌠3

1

3
1
+
1

3
0

=
4

0

4


3‽



3
0

=
1

1

1


㌠3


0

1

Trinary number

:
1100
1001
3

CCLi

33

weight

16
2

16
1

16
0

F

A

9

F
A
9
H

=
15

16
2
+
10

16
1

+
9

16
0
=
4009

Remainder

4009


ㄶ1=

ㄵ1



1
+
10



0

=
250

9

250


ㄶ㴠

ㄵ1



0

=
15

10

15


ㄶ=

0



Hexadecimal number :

F
A
9
H

Hex

Dec

0

0

1

1

2

2

3

3

4

4

5

5

6

6

7

7

8

8

9

9

A

10

B

11

C

12

D

13

E

14

F

15

CCLi

34

Conversion between Hexadecimal, Octal, and Binary Numbers


Binary

Octal

000

0

001

1

010

2

011

3

100

4

101

5

110

6

111

7

Binary

Hex

0000

0

0001

1

0010

2

0011

3

0100

4

0101

5

0110

6

0111

7

1000

8

1001

9

1010

A

1011

B

1100

C

1101

D

1110

E

1111

F

CCLi

35

Binary


佣瑡O

weight

2
8

2
7

2
6

2
5

2
4

2
3

2
2

2
1

2
0

1

0

1

0

0

1

0

1

1

=
1

2
8
+
0

2
7

+
1

2
6
+
0

2
5

+
0

2
4
+
1

2
3

+
0

2
2

+
1

2
1

+
1

2
0

= (
1

2
2
+
0

2
1

+
1

2
0
)


2
6

+ (
0

2
2

+
0

2
1
+
1

2
0
)


2
3



+ (
0

2
2

+
1

2
1

+
1

2
0
)


1


㴠=
1

2
2
+
0

2
1

+
1

2
0
)


(
2
3
)
2
+ (
0

2
2

+
0

2
1
+
1

2
0
)

(
2
3
)
1


+ (
0

2
2

+
1

2
1

+
1

2
0
)


(
2
3
)
0


=
5



8
2
+
1



8
1

+
3


8
0


= 513
8

CCLi

36

Binary


佣瑡O

(shortcut)

1

1

1

1

1

0

1

0

1

0

0

1

7

6

5

1

Least Significant bit

10110010101001
2

=

26251
o


0

1

0

1

1

0

0

1

0

1

0

1

0

0

1

2

6

2

5

1

Least Significant bit

111110101001
2

=

7651
o


CCLi

37

Binary


䡥硡摥捩d慬

weight

2
11

2
10

2
9

2
8

2
7

2
6

2
5

2
4

2
3

2
2

2
1

2
0

0

0

0

1

0

1

0

0

1

0

1

1

=
0

2
11
+
0

2
10

+
0

2
9

+
1

2
8
+
0

2
7

+
1

2
6
+
0

2
5

+
0

2
4






+
1

2
3

+
0

2
2

+
1

2
1

+
1

2
0

=
1
4
B
H

= (
0

2
3
+
0

2
2

+
0

2
1

+
1

2
0
)


4
)
2
+ (
0

2
3

+
1

2
2


+
0

2
1

+
0

2
0
)

2
4
+ (
1

2
3

+
0

2
2

+
1

2
1

+
1

2
0
)


1

=
1



⠱㘩
2
+
4




+
11




0

CCLi

38

Binary


䡥硡摥捩浡

(shortcut)

1

1

1

1

1

0

1

0

1

0

0

1

F

A

9

Least Significant bit

10110010101001
2
=

2CA9
H

0

0

1

0

1

1

0

0

1

0

1

0

1

0

0

1

2

C

A

9

Least Significant bit

111110101001
2
=

FA9
H