Anda di halaman 1dari 3

How Computers Work

Binary
A bit about Binary
125310^3+2X10^2+510^1+3X10^0 thats the decimal system
for computers, use binary system
1 bit = (a one or a zero) its a magnet polarized one way or another,
or high voltage low voltage, etc.
1 byte = 8 bits (can represent from 0-255)
1 kilobyte = 10^3 9Data Transfer/Disk Storage or 2^10 bytes
Random Access Memory
1 megabyte = 10^6 or 2^20 bytes
etc
237-we have 0 and 1 and powers of two =
0b111(1X2^5)0(0X2^4)1(1X2^3)1(1X2^2)0 (0X2^1)1(1 X2^0)
or even base 16, so =0XED (hexadecimal) A=10, B=11, C=12, D=13,
E=14, F=15
ASCII

Hard Drives
can see this online
hard drives (uses a magnetic disk, polarized as north or south0 or
1 and spins around like a record, interprets these)cost less,
carries more data v. Solid state drives (more complicated, have
transistors-devices kind of like amplifiers, one input and another
input, and decide how big you want the outputwant on or off,
voltage or not)much faster, more durable, less noise

Computer Overview
Start off with Hard Disk/Solid sTAte Drive gets sreamed in 1s
and 0s random access memory (much faster and when turn off,
data all gone, but on hard drive stores it all) goes into
central processing unitget ur fav internet meme

Processor can: There are machine-code instructions for: Data


handling/memory operations, arithmetic and logic, branching (
Matt Haberland
Compiling

History of C++
Calculating ToolsAbacus, Fullers Slide Rule, Calculating
Drum (based on Napiers Bones) Leonardo da Vinci, Thomas
de Colmars arithmometer, and Phillip Mattaus HahnPart of
Analytical Engine (1830s) (Charles Babbage) go beyond simple
add/sub/mult/div etc. it could now decidePunch cards, an
idea adopted from looms
Theoretical model for computeres: 1936 Turing Machine
computer capable of executing any algorithm, any operations
Data on a tape , a head that reads and writes data on
tape, a state register piece of info that controls how the
machine will work at a given instant, a table of instructions.
Given state and data read by the head, an instruction can:
rewrite datat
move the head
assume a new state
Depite its simplicity, it can do any algorithm
Effective for solving problems in theory of computation

First general-purpose electric computer: ENIAC (1946)


Electronic Numerical Integrator and Computer
1940s-early electronic general-purpose computers
Programmers get tired of programming in machine code (1s and 0s)
and invent assembly language/assemblers
And changes this language to computer code

1950s-higher level languages


maps to assembly language and then to machine code

Autocode used compiler program on computer ot convert the


language to machine code

1957- FORTRAN (Formula Translating System)-first optimizing


compiler (choose the fastest way to execute instruction)
1972- C
Developed by Dennis Ritchie at Bell Labs to overcome shortcomings
of B, BCPL, and other ancestor languages

1979-C with Classes


Designed by Bjarne Stousup to create a fast object-oriented
language
1983-Renamed to C++; additional features added
Mot recent version standard published in Dec. 2014

*code same, but compile it differently for diff


operating systemmac and pc diff.

Anda mungkin juga menyukai