Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string
Lecture 1 and 2:
● IDE = Integrated Development Environment
Lecture 3: Number Base Conversions
● Base to 10 : basen, basen-1, … , base1, base0
● 10 to base: number/base → remainder is rightmost digit → repeat
● Binary to hex < -- >: group by four and use 8421
○ A=10 → → → F=15
● Write numbers as: numberbase
Lecture 4: Hardware Basics
● Hardware: physical components
● Software: programs
● CPU = Central processing Unit
● Ram:
○ primary memory
○ Random Access Memory
○ extremely fast
● Secondary memory:
○ More permanent (non-volatile)
○ More storage
○ Hard drive
○ USB
● I/O devices: from perspective of computer:
○ Input = send data to computer (mouse)
○ Output = send data from computer (printer)
● Bit: binary digit, either 0 or 1
● Byte: “a sequence of 8 bits”
● Byte combinations available given k(bits) : 2k
● Kilobyte = 1000 or 210
● Megabyte = 1 million or 220
● Gigabyte = 1 billion or 230
● Terabyte = 1 trillion or 240
● How to represent data in binary
○ negative numbers:
■ 2’s complement
■ Flip binary digit and add 1
● -27
● Flip 11011→ 00100
● Add one 00100 + 1 = 00101
,Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string
○ Floating point:
■ Write in scientific notation → _.__ e k
■ Write number in binary and attach k in binary to the end
● *Not correct* 247.3721 → 2.373721e2
● 1101101110110110111 x 27
● 1101101110110110111 |7 represented in binary|
● 1101101110110110111 |0111|
○ Text:
■ Each character has a specific number attached to it
■ ASCII used to be original system
● Used one byte
● 256 possibilities
● 8 digits used
■ unicode
● Since we have more characters to use (diff languages)
● 2 bytes
● 16 digits used
Lecture 5: Operating Systems
● There is windows mac, android, iOS
● What do operating Systems do:
○ Process management
■ What is running right then
■ Could be virus protection or apps not open
■ Orders them in importance
○ Memory Management
■ What memory is being used or not
○ Primitive I/O
■ Handling devices like printers and mouse
○ GUI
■ Graphics, windows, dragging
○ Network control
■ Manages data packets
■ Sent or failed
○ Security
■ Accounts and encryptions
,Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string
Lecture 6: Programming Languages
● Machine language: language that CPU uses
● Assembly language: mnemonic representation of machine language, “readable”
● Languages:
○ Fortran
■ Late 50’s
■ One of the first programming languages
■ Used by scientists and engineers
■ Not designed for object oriented
○ Cobol:
■ Late 50’s
■ Used with big corporations, business
■ Not designed for object oriented
○ Lisp:
■ Hasn’t changed much
■ Used in AI
■ Still used
○ Pascal
■ Used in education
○ C
■ Very easy to learn
■ Not too different from assembly code
■ Procedurally oriented
○ C++
■ Changed for object oriented, abomination
○ Python
○ Java
■ Object oriented
○ Ruby
■ Language of least astonishment
○ Translating higher level code to machine code
■ Compiler is faster but platform dependent
■ Interpreter is the same for everyone
■ Java is both
■ Java compiles to universal java bytecode program and then invokes
interpreter
■ Portability: bytecode runs on all different platforms the same way for
everybody
Lecture 7: First Java Programs
, Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string
● Object: occupy memory and can do things
● Class: module that you write, type of object
● Method: chunk of code given a name
○ Main method: program starts
● Statements: sequential
○ End in “ ; ”
● Comments:
○ // to end of line
○ /* multiple lines */
● String literals: text with “”
● Console: shows running code
● Variables:
○ Variable declaration= making a variable
■ Must do first to be able to use
○ Memory diagram
■ Call stack with value
○ = is assignment operator
■ Name of variable = value
Lecture 8: Primitive Types
● Whole Number primitive types
○ Int = 4 bytes
■ int secondsPerYear = 31557600
○ Long = 8 bytes
■ long humansOnEarth = 7,625,913,792L
○ Short = 2 bytes
○ Byte = 1 bytes
■ byte age =19
● Floating Point primitive types
○ float = 4 bytes
■ float distance = 52.25F
○ double =8 bytes
■ More precision
■ Good for NASA
■ double velocity = 325.92732
● Remaining primitive types
○ char = store characters
■ char letterGrade = 'A';
○ Boolean
■ boolean result = true;
Lecture 1 and 2:
● IDE = Integrated Development Environment
Lecture 3: Number Base Conversions
● Base to 10 : basen, basen-1, … , base1, base0
● 10 to base: number/base → remainder is rightmost digit → repeat
● Binary to hex < -- >: group by four and use 8421
○ A=10 → → → F=15
● Write numbers as: numberbase
Lecture 4: Hardware Basics
● Hardware: physical components
● Software: programs
● CPU = Central processing Unit
● Ram:
○ primary memory
○ Random Access Memory
○ extremely fast
● Secondary memory:
○ More permanent (non-volatile)
○ More storage
○ Hard drive
○ USB
● I/O devices: from perspective of computer:
○ Input = send data to computer (mouse)
○ Output = send data from computer (printer)
● Bit: binary digit, either 0 or 1
● Byte: “a sequence of 8 bits”
● Byte combinations available given k(bits) : 2k
● Kilobyte = 1000 or 210
● Megabyte = 1 million or 220
● Gigabyte = 1 billion or 230
● Terabyte = 1 trillion or 240
● How to represent data in binary
○ negative numbers:
■ 2’s complement
■ Flip binary digit and add 1
● -27
● Flip 11011→ 00100
● Add one 00100 + 1 = 00101
,Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string
○ Floating point:
■ Write in scientific notation → _.__ e k
■ Write number in binary and attach k in binary to the end
● *Not correct* 247.3721 → 2.373721e2
● 1101101110110110111 x 27
● 1101101110110110111 |7 represented in binary|
● 1101101110110110111 |0111|
○ Text:
■ Each character has a specific number attached to it
■ ASCII used to be original system
● Used one byte
● 256 possibilities
● 8 digits used
■ unicode
● Since we have more characters to use (diff languages)
● 2 bytes
● 16 digits used
Lecture 5: Operating Systems
● There is windows mac, android, iOS
● What do operating Systems do:
○ Process management
■ What is running right then
■ Could be virus protection or apps not open
■ Orders them in importance
○ Memory Management
■ What memory is being used or not
○ Primitive I/O
■ Handling devices like printers and mouse
○ GUI
■ Graphics, windows, dragging
○ Network control
■ Manages data packets
■ Sent or failed
○ Security
■ Accounts and encryptions
,Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string
Lecture 6: Programming Languages
● Machine language: language that CPU uses
● Assembly language: mnemonic representation of machine language, “readable”
● Languages:
○ Fortran
■ Late 50’s
■ One of the first programming languages
■ Used by scientists and engineers
■ Not designed for object oriented
○ Cobol:
■ Late 50’s
■ Used with big corporations, business
■ Not designed for object oriented
○ Lisp:
■ Hasn’t changed much
■ Used in AI
■ Still used
○ Pascal
■ Used in education
○ C
■ Very easy to learn
■ Not too different from assembly code
■ Procedurally oriented
○ C++
■ Changed for object oriented, abomination
○ Python
○ Java
■ Object oriented
○ Ruby
■ Language of least astonishment
○ Translating higher level code to machine code
■ Compiler is faster but platform dependent
■ Interpreter is the same for everyone
■ Java is both
■ Java compiles to universal java bytecode program and then invokes
interpreter
■ Portability: bytecode runs on all different platforms the same way for
everybody
Lecture 7: First Java Programs
, Type name(declaring) next____ name(using) numbers textinquotes scanner/system/string
● Object: occupy memory and can do things
● Class: module that you write, type of object
● Method: chunk of code given a name
○ Main method: program starts
● Statements: sequential
○ End in “ ; ”
● Comments:
○ // to end of line
○ /* multiple lines */
● String literals: text with “”
● Console: shows running code
● Variables:
○ Variable declaration= making a variable
■ Must do first to be able to use
○ Memory diagram
■ Call stack with value
○ = is assignment operator
■ Name of variable = value
Lecture 8: Primitive Types
● Whole Number primitive types
○ Int = 4 bytes
■ int secondsPerYear = 31557600
○ Long = 8 bytes
■ long humansOnEarth = 7,625,913,792L
○ Short = 2 bytes
○ Byte = 1 bytes
■ byte age =19
● Floating Point primitive types
○ float = 4 bytes
■ float distance = 52.25F
○ double =8 bytes
■ More precision
■ Good for NASA
■ double velocity = 325.92732
● Remaining primitive types
○ char = store characters
■ char letterGrade = 'A';
○ Boolean
■ boolean result = true;