Advertisement
Ramaraunt1

Programming Lesson One Notes

Jan 10th, 2017
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. ============================
  2. Hardware
  3. ============================
  4.  
  5. hardware - all physical devices of a computer.
  6. component - one of these devices
  7.  
  8. - The Central Processing Unit (CPU)
  9. CPU
  10. - Main Memory (RAM = Random Access Memory)
  11. Short term memory
  12. - Secondary Storage (Hard Disk/Solid State Drive)
  13. Long term memory
  14. - Input Devices:
  15. mouse, keyboard, microphone, touchpad, touchscreen
  16. - Output Devices:
  17. monitor, printer, fax machine, game controller vibrates
  18.  
  19. ============================
  20. Software
  21. ============================
  22.  
  23. Software is the nonphysical parts of a computer. Another word for software is computer programs.
  24.  
  25. System Software
  26. ---------------
  27. -Operating Systems:
  28. The most fundemental program that runs all other hardware and software.
  29. -Utility Programs
  30. Specialized task programs. (antivirus programs, cleaner programs, compression programs, data backup programs)
  31. -Software Development Tools
  32. Programs to make and modify other programs. IDE - Integrated Development Enviornment
  33.  
  34. Application Software
  35. --------------------
  36. Programs that make computers useful to humans.
  37. (microsoft word, excel, OBS, google chrome, team fortress 2)
  38.  
  39. =================================================
  40. Data Storage - How a computer stores information
  41. =================================================
  42.  
  43. 1s and 0s
  44. on and off switches
  45. ups or downs
  46.  
  47. 1 switch = 1 bit
  48. 8 bits = 1 byte
  49. nanosized mb, kb, gb, tb
  50.  
  51. 1 byte is enough information to store one number or character(symbol)
  52.  
  53.  
  54. 10000000 = 1
  55. 01000000 = 2
  56. 11000000 = 3
  57.  
  58. How numbers are stored:
  59. 1st bit = 2^0 = 1
  60. 2nd bit = 2^1 = 2
  61. 3rd bit = 2^2 = 4
  62. 4th bit = 2^3 = 8
  63. 5th bit = 2^4 = 16
  64. 6th bit = 2^5 = 32
  65. 7th bit = 2^6 = 64
  66. 8th bit = 2^7 = 128
  67.  
  68. 10100000 = 5
  69. 10000100 = 33
  70.  
  71. How letters/symbols are stored:
  72. ASCII - American Standard Code for Information Interchange
  73. 10000100 = 33 = !
  74. 00100010 = 34 = "
  75.  
  76. Special number cases
  77. What if I want a number that is bigger than 1 + 2 + 4 + 8 + 16 + 32 + 64 + 128
  78. Then, you add another byte
  79.  
  80. first byte
  81. 1st bit = 2^0 = 1
  82. 2nd bit = 2^1 = 2
  83. 3rd bit = 2^2 = 4
  84. 4th bit = 2^3 = 8
  85. 5th bit = 2^4 = 16
  86. 6th bit = 2^5 = 32
  87. 7th bit = 2^6 = 64
  88. 8th bit = 2^7 = 128
  89.  
  90. second byte
  91. 9th bit = 2^8 = 256
  92. 10th bit = 2^9 = 512
  93. 11th bit = 2^10 = 1024
  94. 12th bit = 2^11 = 2048
  95. 13th bit = 2^12 = 4096
  96. 14th bit = 2^13 = 8192'
  97. 15th bit = 2^14 = 16384
  98. 16th bit = 2^15 = 32768
  99. 17th bit = 2^16 = 65536
  100. 18th bit = 2^17 = 131072
  101.  
  102. third byte
  103. ...
  104.  
  105. fourth byte
  106. etc etc
  107.  
  108. Another special case:
  109. What if I want to store decimals?
  110. floating point notation - numbers that use this are called floats
  111.  
  112. What if I want to store negative numbers?
  113. Two's Compliment Notation - Usually done automatically
  114.  
  115. What if I want to store an image in memory?
  116. different formats:
  117. png, jpeg, dds, vtf, etc etc
  118. convert pixel information into bytes
  119. 1 unit of info = 1 pixel
  120.  
  121. What if I want to store sound data in memory?
  122. frequency and pitch are stored in binary.
  123. 1 unit of a sound file = 1 sample
  124.  
  125. ==============================
  126. The Fetch Decode Execute Cycle
  127. ==============================
  128.  
  129. BEFORE fde, info about proccesses is moved to RAM, or main memory.
  130.  
  131. Fetch - The CPU fetches the information it needs from the ram.
  132. Decode - The CPU decodes what the information means.
  133. Execute - The CPU sends out commands to other components to execute the data.
  134.  
  135. =====================
  136. Programming Languages
  137. =====================
  138.  
  139. - SINCE Machine Language is impossible to read by human standards, programming languages were developed.
  140.  
  141. - The first programming languages were known as Assembly Languages. Assembly languages are made up of
  142. nmenoics, small words short for commonly used commands
  143.  
  144. - Assembly languages are converted into Machine Language in a process known as Assembling.
  145.  
  146. - Eventually, Languages evolved and became Higher-Level Languages, which are used today and covered in these videos.
  147.  
  148. - These languages include:
  149. Python
  150. BASIC
  151. Visiual Basic
  152. C
  153. C#
  154. C++
  155. Java
  156. Ruby
  157. JavaScript
  158.  
  159. - Higher leveled languages all have Key Words/Reserved Words
  160. -Key Words: words that are reserved for a certain function, and cannot be used for ANYTHING else.
  161.  
  162. - Higher leveled languages all have operators
  163. -Examples in Python
  164. + (addition)
  165. - (subtraction)
  166. / (division)
  167. * (multiplication)
  168. % (modulus/remainder of division)
  169.  
  170. ALSO INCLUDE:
  171. ++, --, -=, +=, *=, /=, %=, etc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement