Lecture_1 - bridges to computing

Download Report

Transcript Lecture_1 - bridges to computing

Bridges To Computing
General Information:
• This document was created for use in the "Bridges to Computing" project of Brooklyn College.
• You are invited and encouraged to use this presentation to promote computer science education in the U.S.
and around the world.
• For more information about the Bridges Program, please visit our website at:
http://bridges.brooklyn.cuny.edu/
Disclaimers:
• All images in this presentation were created by our Bridges to Computing staff or were found online through
open access media sites and are used under the Creative Commons Attribution-Share Alike 3.0 License.
• If you believe an image in this presentation is in fact copyrighted material, never intended for creative
commons use, please contact us at http://bridges.brooklyn.cuny.edu/ so that we can remove it from this
presentation.
• This document may include links to sites and documents outside of the "Bridges to Computing" domain.
The Bridges Program cannot be held responsible for the content of 3rd party sources and sites.
Electricity & Binary
Basic Concepts of Computing
M. Meyer
Bridges To Computing
2010
Content
1. Computer (basic definition)
2. Non-Electrical Computers
3. Electricity
1. What is it?
2. How do we make it?
3. Why do we want it?
4. Basic Computer Concepts
1.
2.
3.
4.
5.
Relays & Boolean Logic
Transistors
Capacitors
Binary Numbers and Binary Storage
Marble Adder
(1) So what is a computer?
•
•
Complex machines have been
around for a long time, but
usually only did 1 or 2 fixed
jobs. (Calculator)
A computer is a "universal
machine" (Turing). A machine
that can be "programmed" to
do many different jobs.
(2) Non-Electrical Computers
• Babbage Engine: A mechanical
computer proposed 1849 and
finally built in 2002.
• Used gears and mechanical
power. -->
(2) Non-Electrical Computers
• Water Computer (MIT) Uses
the flow of water, rather than
electrons, to power its
circuitry.
• The military and spaceflight
industries need computing
systems able to resist extreme
radiation environments.
(3.1) Electricity (What is it?)
Protons and Neutrons: Want to stick together (getting
them apart can be dangerous).
Electrons: Can skip from atom to atom.
Electricity: Flow of electrons from one atom (location) to
another.
(3.1) Electricity Terms
• Voltage (Volts): The
potential for electron
flow (water behind the
dam).
• Amperage (Amps):
Actual flow.
• Resistance (ohms):
How easily does a
material take-on
and/or give-up
electrons.
(3.2) Making Electricity - Magnets
• We can use magnets. Moving a
conductor (copper wire)
through a magnetic field will
generate an electrical current.
• Electricity and Magnetism are
bound together. If you have
one you can make the other.
(3.2) Making Electricity - Chemicals
• We can use chemicals.
• In the picture to the right, as
the zinc plate dissolves in the
acid it gains extra electrons.
• The copper plate as it dissolves
loses electrons.
• The extra electrons flow from
the zinc plate, to the copper
plate through the wires.
(3.2) Making Electricity - Imbalance
• We can create an imbalance.
• It might help to think of it like
this: Electrons HATE each
other, and want to get as far
away from each other as
possible.
• If I can get a whole bunch of
electrons in one place, and give
them a path to somewhere less
crowded, they will take it.
(3.3) Why Electricity – Heat and Light
• Resistance to electric flow
creates heat.
• Heat is a side-effect of electric
flow. This can be good or bad.
• Enough resistance and enough
heat will eventually produce
light.
(3.3) Why Electricity – Motors
• Electricity can power a
(magnetic) motor.
• Remember electricity and
magnetism are bound together.
• Moving magnets can make
electricity flow, and electric
flow can move a magnet.
(3.3) Why Electricity – Switches
•
•
•
•
It can flip a switch.
This is the most interesting
and important ability for
computer scientists.
To the left is a simple
electro-magnetic relay.
Closing the Green Switch,
will close the blue switch as
well.
Battery A
Battery B
(4.1) Basic Computer Concepts –
Boolean Logic (AND)
Battery A
ON
Battery B
ON
Light-Bulb
ON
Yes
Yes
Yes
Yes
No
No
No
Yes
No
No
No
No
(4.2) Basic Computer Concepts Transistors
• Transistors are tiny devices
(billions can fit on a CPU).
• They use special properties of
some materials (called semiconductors) like impure
silicon, to implement the same
functionality as an
electromagnetic relay (boolean
logic).
(4.3) Basic Computer Concepts Capacitors
• A capacitor is a special type of
battery.
• The difference between a
capacitor and a regular
(chemical) battery is that a
capacitor can dump its entire
charge instantly, where a
normal battery takes much
longer to completely discharge.
• It's very easy to make a type of
capacitor called a Leydan Jar.
(4.4) Binary numbers
• In the decimal number system,
each position in a number can
hold 1 of 10 different symbols
(0-9).
• In binary each position can
only hold 0 or 1. But we can
still represent any number.
• Binary numbers are sometimes
referred to as "Base 2".
(4.4) Storing Binary numbers
• A capacitor can either have a or
not have a charge (0/1).
• We can arrange capacitors in a
row, and use them to store
binary numbers.
• What number is represented
here?
(5) Binary Adder (accumulator)
• If I can flip a switch remotely, I
have a Boolean AND logic.
• If I have Boolean AND logic, I
can ADD.
• The device to the right, uses
wooden gears (instead of
capacitors and transistors) and
marbles (instead of electrons),
but the essential logic is the
same.
• CLICK HERE for the video.
If you can add and store numbers...
• You can do anything related to mathematics:
▫ Subtraction is addition where one number is negative
(see "Two's Complement" )
▫ Multiplication is repeated addition.
▫ Division is repeated subtraction (with a remainder).
▫ Algebra is basic math with the addition of variables.
▫ Trigonometry and Calculus are composed of algebra
along with numerous additional predefined equations.
• If you have Calculus, you can represent any physical
object that exists in the real world, as well as the
forces that act upon that object.
• At the core, computers are powerful,
reprogrammable calculators.
The End