class: middle
.eight[CSET-105]
.eight[Intro to Web Applications]
# Programming Concepts --- # Contents: - [New Terms](#terms) - [Number Systems](#number-systems) - [Levels of Programming Languages](#levels) --- name: terms # New Terms - Bits, Bytes, Transistors - Numeral Systems: Unary, Binary, Decimal - Encodings: ASCII, Unicode - Algorithm - Pseudocode - Variables, Loops, Boolean Expressions, Functions - Abstraction --- # Bit --- count: false # Bit # .eight[Binary digit. It represents 1 or 0, true or false.] --- # Byte --- count: false # Byte # .eight[A collection of eight bits, big enough to hold a single character.] --- # Transistor --- count: false # Transistor # .eight[Physical switch that can hold a Bit of information.] --- # Number System --- count: false # Number System # .eight[A convention to represent numbers with written symbols, like Binary and Decimal.] - Binary has 2 symbols: 0 and 1 - Decimal has 10 symbols: 0 through 9 - You'll see others like Octal and Hexadecimal --- # Encoding --- count: false # Encoding # .eight[A convention to store text as binary data, like ASCII and Unicode.] - A computer reads binary in memory and translates it into text symbols according to an encoding. - Unicode replaced ASCII. --- # Algorithm --- count: false # Algorithm # .eight[Step by step instructions to solve a problem.] --- # Pseudocode --- count: false # Pseudocode # .eight[Informal notation in regular English that resembles a programming language.] --- # Abstraction --- count: false # Abstraction # .eight[Hiding unnecessary details to focus on higher level ideas.] --- name: number-systems # Number Systems Why are they important? - It's important to realize that "meaning" and "symbols" are different. - If computers only understand electricity and not electricity, we have to translate our meaning appropriately. --- # Counting in Decimal - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 - crap. we ran out of symbols... - let's remember that we made it to .eight[ten] once - .eight[1]0, .eight[1]1, .eight[1]2, etc. --- count: false # Counting in Decimal - 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 - crap. we ran out of symbols... - let's remember that we made it to .eight[ten] once - .eight[1]0, .eight[1]1, .eight[1]2, etc. - let's remember that we made it to .eleven[hundred] once - .eleven[1]00, .eleven[1]01, .eleven[1]02, etc. --- # Counting in Binary - 0, 1 - crap. we ran out of symbols... - let's remember that we made it to .eight[two] once - .eight[1]0, .eight[1]1 - we made it to .eleven[four] once - .eleven[1]00, .eleven[1]01, .eleven[1]10, etc. --- # .fourteen[Practice] Try To Convert These To Binary: - 4 - 7 - 12 - 25 - 44 - 255 --- # .fourteen[Practice] Try To Convert These To Decimal: - 0011 - 0101 - 1100 - 0010 0001 - 0101 1101 --- name: levels # Levels of Programming Languages - Binary is the lowest level - Languages like C or JavaScript are on a higher level - This is .eight[abstraction], hiding away details [Wikipedia: Low-Level Programming Language](https://en.wikipedia.org/wiki/Low-level_programming_language) [Wikipedia: High-Level Programming Language](https://en.wikipedia.org/wiki/High-level_programming_language) --- # Levels of Programming Languages Really, there are a lot of levels: - JavaScript - C - Assembly - Machine Code - Hardware Each higher level is translated, or .eight[compiled] into a language below until the machine can use it. --- # Levels of Programming Languages We'll start with a higher level language: - It's closer to natural languages like English - We can hide the difficult details at first