|
1
|
|
|
2
|
- Computer Science is the study of algorithms, including their
- Formal and mathematical properties
- We’re mostly done with this part
- Hardware realizations
- Linguistic realizations
- Applications
|
|
3
|
- Binary numbers are used to encode all forms of data, such as numbers and
letters
- Electric circuits process and store binary data
- Simple gates can be combined to build circuits for any computation
- Boolean logic is a useful abstraction of electric circuits
|
|
4
|
- Detecting Voltage Levels
- Why not 10 levels?
- Would be unreliable
- Not enough difference between states
- On/Off
- Fully Charged - Fully Discharged
- Magnetized - Demagnetized
|
|
5
|
- Base 2 - digits 0 and 1
- ___ ___ ___ ___ ___ ___
- 25 24 23 22 21 20
|
|
6
|
- The position of each digit determines its value
- for example, the binary number 101011 equals:
- 1x25 + 0x24
+ 1x23 + 0x22 + 1x21 + 1x20 =
- 32 +
0 + 8
+ 0 +
2 + 1
= 4310
- note the similarity with decimal numbers:
- 57210 = 5x102
+ 7x101 + 2x100
|
|
7
|
- First practice counting to 2010 in binary
- Practice adding: 10112
+ 1012
- Try subtracting: 10112 - 1012
|
|
8
|
- Octal (Base 8) digits 0-7
- Hexadecimal (Base 16) digits 0-F
- ___ ___ ___ ___ ___ ___
- 85 84 83 82 81 80
- ___ ___ ___ ___ ___ ___
- 165 164 163 162 161 160
|
|
9
|
- negative integers: reserve the
leading bit for sign (0=positive; 1=negative)
- letters: ASCII codes (using 8 bits=1 byte)
- A = 01000001, B=01000010,
C=01000011, and so on…
- Why do they call it a byte? What is 4 bits called?
- Other digital data: MP3, DVD, JPEG, etc.
|
|
10
|
- A relay is a switch built with an electromagnet
|
|
11
|
- With switches we can implement AND, OR, and NOT gates
- With just those types of gates, we can design circuits to perform any
computation
|
|
12
|
|
|
13
|
|
|
14
|
|
|
15
|
- bi-stable, solid state device
- switching is done electronically, not mechanically
- no moving parts; therefore, fast,
small, reliable
- can switch states in about one 10 billionth of a second
- about 5 million transistors can fit on a chip 1 centimeter square. Density is increasing rapidly with new
technology.
|
|
16
|
- Computers use binary numbers for storage and computation because
- all types of data can be stored this way
- 2-state devices are highly reliable
- A switch is a 2-state device that can be toggled
- Switches can implement AND, OR, and NOT gates
- With these gates, we can perform any computation, as we’ll see next
time!
|