100% tevredenheidsgarantie Direct beschikbaar na je betaling Lees online óf als PDF Geen vaste maandelijkse kosten
logo-home
CMSC131 Class Notes $3.49
In winkelwagen

College aantekeningen

CMSC131 Class Notes

 0 keer verkocht

Notes for the CMSC131 course taken at the University of Maryland, College Park

Voorbeeld 4 van de 32  pagina's

  • 28 februari 2025
  • 32
  • 2021/2022
  • College aantekeningen
  • Fawzi
  • Alle colleges
Alle documenten voor dit vak (1)
avatar-seller
martinsokorie
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;

Dit zijn jouw voordelen als je samenvattingen koopt bij Stuvia:

Bewezen kwaliteit door reviews

Bewezen kwaliteit door reviews

Studenten hebben al meer dan 850.000 samenvattingen beoordeeld. Zo weet jij zeker dat je de beste keuze maakt!

In een paar klikken geregeld

In een paar klikken geregeld

Geen gedoe — betaal gewoon eenmalig met iDeal, Bancontact of creditcard en je bent klaar. Geen abonnement nodig.

Focus op de essentie

Focus op de essentie

Studenten maken samenvattingen voor studenten. Dat betekent: actuele inhoud waar jij écht wat aan hebt. Geen overbodige details!

Veelgestelde vragen

Wat krijg ik als ik dit document koop?

Je krijgt een PDF, die direct beschikbaar is na je aankoop. Het gekochte document is altijd, overal en oneindig toegankelijk via je profiel.

Tevredenheidsgarantie: hoe werkt dat?

Onze tevredenheidsgarantie zorgt ervoor dat je altijd een studiedocument vindt dat goed bij je past. Je vult een formulier in en onze klantenservice regelt de rest.

Van wie koop ik deze samenvatting?

Stuvia is een marktplaats, je koop dit document dus niet van ons, maar van verkoper martinsokorie. Stuvia faciliteert de betaling aan de verkoper.

Zit ik meteen vast aan een abonnement?

Nee, je koopt alleen deze samenvatting voor $3.49. Je zit daarna nergens aan vast.

Is Stuvia te vertrouwen?

4,6 sterren op Google & Trustpilot (+1000 reviews)

Afgelopen 30 dagen zijn er 70001 samenvattingen verkocht

Opgericht in 2010, al 15 jaar dé plek om samenvattingen te kopen

Start met verkopen
$3.49
  • (0)
In winkelwagen
Toegevoegd