cs 1428 foundations of computer science i. two main components hardware physical media that uses...
TRANSCRIPT
CS 1428 Foundations of Computer Science I
Two Main Components
Hardware Physical media that uses electrical
current to process instructions. Software
Instructions written by humans that tell the computer what to do.
The Modern Computer
The Stored-Program Model Invented by John von Neumann Digital Information Memory Processor Input/Output
Secondary Storage We will revisit this model in much more
detail later in the semester.
Organization of a von Neumann Machine – (almost every modern computer)
Data Bus
Memory(RAM)
CentralProcessingUnit (CPU) Secondary
Storage
Input/OutputI/O
Information in the Real World Information that we gather through our
senses is primarily in waves and typically analog. Light Sound Temperature Etc.
Information can be quantified down to the atom That’s a lot of information!
CS 1308 – Computer Literacy and the Internet5
Information in the Computer WorldInformation in the computer world is
digital.On/OffFully Charged – Fully DischargedMagnetized – Demagnetized
Computer information is binary.0 – Off1 – On
Detecting Voltage LevelsWhy not 10 levels?
Would be unreliableNot enough difference between states
CS 1308 – Computer Literacy and the Internet6
Bits, Bytes, and so on
A bit is one 0 or 1Short for “binary digit”
A byte is a collection of 8 bitsThey named it “byte” instead of “bite” so you couldn’t
easily mess up the spelling and confuse it with “bit”.Anybody know what half a byte is called?
The number of bits we have will determine how much information we can store. (VERY IMPORTANT)1 bit, on or off (two states)2 bits, four different states (00, 01, 10, 11)3 bits, eight states In general, 2bits states
CS 1308 – Computer Literacy and the Internet7
What is Data?Any useful input or output from the
computer Documents that you are working on
.doc, .xls, .pdf Music
.mp3 Pictures
.jpg, .gif Text
The quick Brown Fox… Numbers
42, 3.14 Readings from sensors Others…?
All of these are encoded in a consistent binary format so they can be shared between computers and users.
What is an Instruction?
Computers rely on very simple instructions given to them by programmers to accomplish tasks.
Assembly Language (written by humans) LOAD R1, #42 JUMP R2 ADD R1, R2
These instructions are translated to Machine Language Computers only understand ones and zeros
101000100101001110001111010011111010010010100011
Programs consist of millions of these instructionsMachine language is different for each processor
That is why Mac programs won’t run on a PC
Random Access Memory (RAM)The programs (instructions) and data are stored in
the Random Access Memory (RAM) for use by the Central Processing Unit (CPU).
RAM loses it’s memory when the power goes off so we store information and programs more permanently on Secondary Storage Devices (hard drives, flash drives, etc.).
Data and instructions are Fetched from the RAM and used by the CPU to perform tasks.
RAM is finite.What implications does this have for real
numbers?
Central Processing Unit (CPU) The CPU uses instructions to move
data around in the computer and to produce output.
The CPU has a simple task. Follow the Execution Cycle over and over again, very quickly. Fetch an instruction Decode the instruction Execute the instruction
Input/Output (I/O)
Every useful computer creates some kind of output.
Most computers use input data of some kind to produce the output.
Garbage in = Garbage out Bad data leads to useless results.
Devices Input
KeyboardMouseOthers…?
OutputMonitorsSpeakersOthers…?
Secondary Storage
The memory in RAM goes away when the power is shut off.Volatile
Programs and data are stored more permanently on secondary storage devices.
Contain much more space than RAM.Hard DrivesUSB DrivesDVDCDOthers…?
Organization of a von Neumann Machine – (almost every modern computer)
Data Bus
Memory(RAM)
CentralProcessingUnit (CPU) Secondary
Storage
Input/OutputI/O
Quiz
Which of the following are a computer?
How can we tell? Does it have a processor? Does it have memory to store data
and/or a program? Does it use input or create output?