User Tools

Site Tools


computer_basics:programming_fundamentals

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
computer_basics:programming_fundamentals [2018/08/23 02:01] – [Kinds of translation] mithatcomputer_basics:programming_fundamentals [2019/01/12 02:32] (current) – [High-level languages] mithat
Line 7: Line 7:
 ===== What is programming? ===== ===== What is programming? =====
  
-  * **programming**: the discipline of creating computer software.+  * **programming**: the discipline of creating computer programs.
   * **computer program**:   * **computer program**:
     * a set of step-by-step instructions     * a set of step-by-step instructions
Line 27: Line 27:
      * a set of rules used to write computer programs.      * a set of rules used to write computer programs.
      * a way of telling the computer what operations to perform.      * a way of telling the computer what operations to perform.
-  * Computers are binary machines. +  * Computers are //binary// machines. 
-    * Use only ON/OFF switches to control internal states+    * Use only ON/OFF switches to control internal states.
     * Only understand instructions that are expressed in ON/OFF (or 1/0) terms.     * Only understand instructions that are expressed in ON/OFF (or 1/0) terms.
-  * To make it easier for humans to program computers, various programming languages have been invented.+  * Programming languages have been invented to make it easier for humans to write programs.
  
 ===== Levels of language ===== ===== Levels of language =====
Line 51: Line 51:
 </code> </code>
  
-  * The lowest level of language. +  * Lowest level of language. 
-  * Consists of 1’s and 0’s.\\ +  * Just 1’s and 0’s. 
 +  * Very hard not to make a mistake.
   * Each type of computer processor has its own machine language.   * Each type of computer processor has its own machine language.
  
Line 63: Line 64:
 </code> </code>
  
-  * Use alphanumeric abbreviations or mnemonic codes as substitutes for machine language+  * Alphanumeric abbreviations or mnemonic codes replace 1's and 0's.
     * ''ADD'' for Add, ''CMP'' for Compare, ''MOV'' for Move, etc.     * ''ADD'' for Add, ''CMP'' for Compare, ''MOV'' for Move, etc.
-  * An **assembler** program converts an assembly language program into machine language.+  * **Assembler** program converts assembly language programs into machine language.
  
 ===== High-level languages ===== ===== High-level languages =====
 <code> <code>
-if grade > 60: +if score > 60: 
-    print('You passed!');+    print('You passed!')
 else: else:
     print('Try harder!')     print('Try harder!')
 </code> </code>
  
-  * Use math-like or English-like notation systems+  * Uses math-like or English-like notation systems.
-  * Much more convenient to write and repair+
   * Allows programmer to think less about language details and more about solving problems.   * Allows programmer to think less about language details and more about solving problems.
-  * "Write once, run anywhere."+  * Portability
  
 ===== Very high-level languages ===== ===== Very high-level languages =====
Line 87: Line 87:
  
   * Tries to let people program using everyday language.   * Tries to let people program using everyday language.
- * "Show a list of names from the contact list," works just as well as "Display the names of everyone in the contact list."+ * "Show a list of names from the contact list," same as "Display the names of everyone in the contact list."
  
 ===== Kinds of translation ===== ===== Kinds of translation =====
  
   * High-level languages need to be **translated** into machine language.   * High-level languages need to be **translated** into machine language.
-  * Three approaches to translation:+  * Three approaches:
     * **interpreted**: translate one line of the program, run it, move to the next.     * **interpreted**: translate one line of the program, run it, move to the next.
     * **compiled**: translate the whole program at once. Produces a new file full of machine code.     * **compiled**: translate the whole program at once. Produces a new file full of machine code.
Line 134: Line 134:
  
   * **documentation**: a written detailed description of the programming cycle and specific facts about the program.   * **documentation**: a written detailed description of the programming cycle and specific facts about the program.
-  * Many languages let you include some documentation in the program code.+  * Most languages let you include some documentation in the program code.
   * Documentation is needed:   * Documentation is needed:
     * to help organize program planning     * to help organize program planning
computer_basics/programming_fundamentals.1534989673.txt.gz · Last modified: 2018/08/23 02:01 by mithat

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki