A way of telling the computer what to do - commands. Computers can only do very basic things, but programs can put together basic commands to achieve complexity. (adders) Computers can execute sequences of basic commands quite fast.
A way of telling the computer what to do - commands. Computers can only do very basic things, but programs can put together basic commands to achieve complexity. (adders) Computers can execute sequences of basic commands quite fast.
Machine code: picture of punch cards Assembly language Higher-order language: gives programmer more abstract ways to express selves, take care of unnecessary details, common constructs How one turns into an other: compiler Diagram of all of them Where JavaScript fits in http://moss.csc.ncsu.edu/~mueller/codeopt/codeopt00/notes/intro.html http://en.wikipedia.org/wiki/Assembly_language#Example_listing_of_assembly_language_source_code Basically: storing data in memory, manipulating it, doing something with result http://www.play-hookey.com/computers/language_levels.html
Location |
Instruction Code |
Comments |
100 |
0010 0001 0000 0100 |
Load first operand into AC |
101 |
0001 0001 0000 0101 |
Add second operand to AC |
102 |
0011 0001 0000 0110 |
Store sum in location 106 |
103 |
0111 0000 0000 0001 |
Halt computer |
104 |
0000 0000 0101 0011 |
83 decimal |
105 |
1111 1111 1111 1110 |
-2 decimal |
106 |
0000 0000 0000 0000 |
Store sum here |
Location |
Instruction Code |
Comments |
|
ORG 100 |
/Origin of program is location 100 |
|
LDA A |
/Load operand from location A |
|
ADD B |
/Add operation form location B |
|
STA C |
/Store sum in location C |
|
HLT |
/Halt computer |
A, |
DEC 83 |
/Decimal operand |
B, |
DEC -2 |
/Decimal operand |
C, |
DEC 0 |
/Sum stored in location C |
|
END |
|
int a, b, c; a = 83; b = -2; c = a + b;
Java? http://en.wikipedia.org/wiki/Compiled_language http://en.wikipedia.org/wiki/Interpreted_language