14
Computing Fundamenatls Computing Fundamenatls CMSC 201 CMSC 201 Computer Science I Computer Science I Penny Rheingans Penny Rheingans University of Maryland Baltimore County University of Maryland Baltimore County (with inspiration from previous 201 (with inspiration from previous 201 instructors and the instructors and the creators of UMBC’s CMSC 101 and HMC’s creators of UMBC’s CMSC 101 and HMC’s CS5) CS5)

Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

Embed Size (px)

Citation preview

Page 1: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

Computing FundamenatlsComputing Fundamenatls

CMSC 201CMSC 201Computer Science IComputer Science I

Penny RheingansPenny RheingansUniversity of Maryland Baltimore CountyUniversity of Maryland Baltimore County(with inspiration from previous 201 instructors (with inspiration from previous 201 instructors and theand the creators of UMBC’s CMSC 101 and HMC’s CS5) creators of UMBC’s CMSC 101 and HMC’s CS5)

Page 2: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

Learning Learning ObjectivesObjectivesTo have a very basic overview of the

components of a computer systemTo understand how data is represented

and stored in memoryTo be aware of elements of the UMBC

computing environment

Page 3: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

Computing SystemsComputing SystemsHardware Components

◦ Central Processing Unit (CPU)◦ Auxiliary Processors (GPU, etc)◦ Memory◦ Bus◦ Secondary Storage (hard disk, flash drive, ...)◦ Network Connection◦ External Devices: keyboard, monitor, printer

Software Components◦ Operating System: Linux, MacOS, Windows,

etc◦ Applications

Page 4: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

Binary RepresentationBinary RepresentationAll information is store in a binary

representation (ie, it’s all 1s and 0s): code, text, images, sounds

For each type of item/object, there are specific formats that define who to represent that thing (character, digit, sound, image, etc) in binary

But why use binary?

Page 5: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors
Page 6: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

But why binary ?

Page 7: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

Place Value NotationPlace Value Notation

Page 8: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

Converting from BinaryConverting from BinaryWhat are the decimal equivalents of:

◦ 101◦ 1111◦ 10 0000◦ 10 1010

Page 9: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

Converting to BinaryConverting to BinaryWhat are the binary equivalents of

◦ 9◦ 27◦ 68◦ 1000

Page 10: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

UMBC Computing UMBC Computing EnvironmentEnvironmentWe will develop our programs using

UMBC’s GL system◦ GL is running the Linux Operating System

GUI interface – Graphical user interface Command-Line Interface – When you connect to

GL using SSH

Lab 1 will walk you through using the UMBC computing environment

Page 11: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

How do I connect to GL?How do I connect to GL?Assuming you have Internet access, use

SSH◦ Windows Download Putty (Lab has a video about this)

Hostname – gl.umbc.edu

Make sure you pick SSH

Put in username and password

◦ Mac SSH client already installed

Go to the Application folder and select Utilities

Open up a terminal Window

Type ssh -l username gl.umbc.edu

Put in your password

Page 12: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

Linux CommandsLinux CommandsSee:http://www.csee.umbc.edu/resources/computer-science-help-center/#Resources

For now, let’s just learn: ls – list

Display the files and directories in your current directory cd – change directory

Directory is another word for folder.. = parent directory . = current directory

mkdir- make directory

Note: Commands are case-sensitive

Page 13: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

DirectoriesDirectoriesCan contain files and other directories

(calledsubdirectories)

/afs/umbc.edu/users/first/second/username/home

201 myOtherClass

lab1

lab1.py

HW1 - When you log into Gl, you will be in your home directory

- use the cd command to go to subdirectories

Page 14: Computing Fundamenatls CMSC 201 Computer Science I Penny Rheingans University of Maryland Baltimore County (with inspiration from previous 201 instructors

emacsemacsReference:http://www.csee.umbc.edu/summary-of-basic-emacs-

commands/emacs – a text editor

◦ We will generally use emacs to write our python codeTo open a file that you want to call example.txt

(replace example.txt with your file name):◦ Type: emacs example.txt

To save a file:◦ CTRL X and CTRL C

To reopen the file:◦ Type: emacs example.txt

To remove the file◦ Type: rm example.txt