Lecture 1: Course Introduction Overview of Computers and their Applications in MAE B Burlingame 2 September, 2015 Heavily based on work by Dr. Buff Furman,

Slides:



Advertisements
Similar presentations
Assembly Language for Intel-Based Computers, 4 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify and.
Advertisements

Intro to CS – Honors I Representing Numbers GEORGIOS PORTOKALIDIS
Number Bases Informatics INFO I101 February 9, 2004 John C. Paolillo, Instructor.
Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
HEXADECIMAL NUMBERS Code
The Binary Numbering Systems
Chapter 2: Data Representation
COMP3221: Microprocessors and Embedded Systems--Lecture 1 1 COMP3221: Microprocessors and Embedded Systems Lecture 3: Number Systems (I)
CS 61C L02 Number Representation (1)Harvey / Wawrzynek Fall 2003 © UCB 8/27/2003  Brian Harvey ( John Wawrzynek  (Warznek) (
Data Representation Computer Organization &
Data Representation COE 205
Connecting with Computer Science, 2e
Introduction to Programming with Java, for Beginners
CHAPTER 2: Number Systems
Assembly Language for Intel-Based Computers, 4th Edition
Assembly Language for Intel-Based Computers, 5 th Edition Chapter 1: Basic Concepts (c) Pearson Education, All rights reserved. You may modify.
Number Representation (1) Fall 2005 Lecture 12: Number Representation Integers and Computer Arithmetic.
Professor Jennifer Rexford COS 217
Introduction to Computer Engineering ECE/CS 252, Fall 2010 Prof. Mikko Lipasti Department of Electrical and Computer Engineering University of Wisconsin.
Binary Arithmetic Math For Computers.
Chapter 2 Bits, Data Types, and Operations. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2-2 How do we.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
1 The Design of C: A Rational Reconstruction Jennifer Rexford.
Computers Organization & Assembly Language
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
Assembly Language for x86 Processors 7th Edition
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
Number Systems Spring Semester 2013Programming and Data Structure1.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
PART 2 Data Types 1. Integers 2. 2’s Complement 3. Conversion
Lecture 2: Operations Bryan Burlingame 9Sept2015.
Dr. Ahmed Telba EE208: Logic Design Lecture# 1 Introduction & Number Systems.
CSC 221 Computer Organization and Assembly Language
CHAPTER 3: Number Systems
The Hexadecimal Number System and Memory Addressing ISAT 121.
CHAPTER 3: Number Systems The Architecture of Computer Hardware and Systems Software & Networking: An Information Technology Approach 4th Edition, Irv.
1 COMS 161 Introduction to Computing Title: The Digital Domain Date: September 6, 2004 Lecture Number: 6.
AEEE2031 Data Representation and Numbering Systems.
Data Representation Bits, Bytes, Binary, Hexadecimal.
Number Representation (Part 1) Computer Architecture (Fall 2006)
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Monday, January 14 Homework #1 is posted on the website Homework #1 is posted on the website Due before class, Jan. 16 Due before class, Jan. 16.
Computer Science I Storing data. Binary numbers. Classwork/homework: Catch up. Do analysis of image types.
CDA 3100 Fall2009. Special Thanks Thanks to Dr. Xiuwen Liu for letting me use his class slides and other materials as a base for this course.
COP3502: Introduction to Computer Science Yashas Shankar Program Translation.
CHAPTER 3: Number Systems
Lecture 1: Course Introduction Overview of Computers and their Applications in MAE B Burlingame 3 February, 2016 Heavily based on work by Dr. Buff Furman,
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 8, 2004 Lecture Number: 7.
Lecture 2: Logic Bryan Burlingame 10 Feb Ref: xkcd:
Lecture 2: 8/29/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Data Representation COE 301 Computer Organization Dr. Muhamed Mudawar
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
Digital logic COMP214  Lecture 1 Dr. Sarah M.Eljack Chapter 1 1.
Dr. ClincyLecture 2 Slide 1 CS Chapter 2 (1 of 5) Dr. Clincy Professor of CS Note: Do not study chapter 2’s appendix (the topics will be covered.
Lecture 2: Logic Bryan Burlingame 31 Aug 2016.
Number Systems & Binary Arithmetic
Lecture 3: Logic Bryan Burlingame 06 Sept 2017.
Bits, Data Types, and Operations
Chapter 2 Bits, Data Types, and Operations
Lec 3: Data Representation
Dr. Clincy Professor of CS
Number Systems Lab session 1 Xuan Guo.
Fundamentals & Ethics of Information Systems IS 201
Lecture 1: Course Introduction
Data Structures Mohammed Thajeel To the second year students
Dr. Clincy Professor of CS
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Dr. Clincy Professor of CS
Presentation transcript:

Lecture 1: Course Introduction Overview of Computers and their Applications in MAE B Burlingame 2 September, 2015 Heavily based on work by Dr. Buff Furman, SJSU

The Plan for Today Welcome to ME 30 Learning objectives Highlights from the syllabus (aka, ‘greensheet’)   Overview of computers and their applications in MAE   Binary representations of phenomena Bit, Bytes, and numbering schemes Base conversion

My Background Industry experience  Microsoft Corporation - Hardware Engineering Consumer Electronics Development UltimateTV Xbox Xbox 360 Kinect Xbox One, Kinect II HoloLens California Native  Grew up in Manteca, CA (one of those places where they still grow food) Personal  Hobbies: build things, fix things, literature, cycling, scuba diving Why Engineering?  Engineering is the highest form of creation open to man. We get to harness the possibilities crafted by science to creatively enhance life’s experience Why am I in this class in the middle of a work day?  To help foster as many awesome engineers as possible  The more brains we have to create a more interesting world, the more interesting the world shall become

Syllabus Highlights and Where to Find Things Syllabus available at  (once I obtain access)  Eng 213, Wed 5:45 (starting next week) Course information  Course goals and learning objectives  Textbook Programming in C (4th Edition) by Stephen G Kochan  Lab Kit Availability Pending. Needed in Week 6  Policies and protocol  Grading  Resources  Course schedule Back

Announcements Homework 1 posted tonight, due in two weeks in class  Generally, two weeks per homework covering the lesson of the day and the following week’s lesson All homework and labs should be printed and a hardcopy turned in, a digital copy should be turned in to instructure If you have a laptop, bring it to lab next week

Focus of ME 30 Solving problems with computers  Learn the process for formulating a computational solution to a problem  Practice the process Gain familiarity with other software used by MEs and AEs for technical computing  Matlab  Excel Learn structured programming using the C language  Get prepared for learning about mechatronics

Where and How are Computers Used in MAE? 1 Technical and Personal Communication   Word processing (reports, procedures, etc.)  Presentations  Conferencing Computation and Analysis  Arithmetic  Equation solving  Data analysis and visualization  Multiphysics and numerical modeling sin(r)/r

Where and How are Computers Used in MAE? 2 Design  Solid modeling (ME 165)  Finite Element Analysis (FEA) (ME 160)  Dynamic modeling and simulation (ME 147, ME 187, ME 190)  Design tradeoffs and analytical modeling of mechanical components and systems (ME 154, ME 157) Gathering Information  Web searches  Patent searches  Databases  Vendor and other websites  Datasheets

Where and How are Computers Used in MAE? 3 Testing and Experimental Work  Data acquisition from sensors (ME 120) Laboratory and Factory Automation and Control  Dynamic systems (ME 187, ME 190) Instrumentation and Product Design  Embedded controllers (ME 106, ME 190) MRP, Inventory, and Document Control  Drawings  Procedures  Bill of Materials (BOM)  Specifications  Engineering change orders (ECOs) er/solutions_by_product/mechatronics_process_management.shtm l /smallImages/janusLabAuto.jpg

The Bottom Line Mechanical and aerospace engineers use computers widely You need to know how to use computers to be successful ME 30 will help you especially in the area of computation and analysis  Exposure to Matlab and Excel  Focus will be on the C language I hope it will also whet your appetite to learn about mechatronics Next -->

Networking Introduce yourself to someone you DO NOT know Find out one thing about them that they like to do in their spare time Two minutes! Back

Binary Representations Computers only contain two values  On/Off (High/Low, 0/1, etc.) Binary number only have two value 0/1  Base 2 numbering system  A bit: A number in base 2 (binary digit) How computers do what they do?  Humans are the translators  The machine just presents information Think, what is a letter?  Just a squiggle, humans give meaning

Binary Representations Everything in a PC is encoded in binary  Computers are finite, so are their representations  RGB for colors 24 bit color (8 bits for red, 8 for green, 8 for blue) TIFF  Music Midi – Instrument + note MP3 – Sound waves compressed  Cruise Control Voltage level going to an actuator

Binary to Decimal Binary number only have two value 0/1  Base 2 numbering system  A bit: A number in base 2 (binary digit) Decimal numbers have ten values 0 – 9  Base ten numbering system Think scientific notation  6.02E23 = 6 * * *  = = 1 * * * * * 2 0 Range?  Largest 8 bit value: =  Largest 16 bit value: =

Negative Values Recall:  The computer only deals in 0/1  Humans provide context Sign bit  The first bit represents sign  = -213, = 213 1’s Complement  Flip the bits (change 1’s into 0’s)  = - 213, = 213

Negative Values (Cont) 2’s Complement  Take 1’s complement, add one  Start (84 10 in this example)  Flip bits  Add one (notice the carries)

Binary to Hexadecimal Hexadecimal (base 16) is a convenient numbering system  0 – 9, A – F (A = 10 10, B = 11 10, etc Observe 2 4 = 16, allows four bits (a nyble) to be grouped = = 0xC 16

Binary to Hexadecimal Convert Binary to Hex b

Binary to Hexadecimal Convert Binary to Hex b (grouping 4 bits) d C 3 9 F h 12 * * * * 16 0 = 50,079

Representations Decimal (default)BinaryHexadecimal 1080’ x6C 108d b6Ch C dec bin6C hex Group by 3s with a comma Group by 4s with a space or an underbar Generally don’t group Spoken short form

Decimal to binary Many ways, this is how I do it 120  120 < 128, 0 in 7 th position  120 > 64, 1 in 6 th position 120 – 64 = 56  56 > 32, 1 in 5 th position 56 – 32 = 24  24 > 16, 1 in 4 th position 24 – 16 = 8  8 = 8, 1 in 3 rd position 8 – 8 = 0  Once we hit zero, all other values are zero  Why do I do it this way? It is quick when I don’t have a calculator. Your mileage may vary BinaryDecimal

Binary (Bitwise) And - & & Y X 194 & 225 = (194) & (225) (192) Binary And is commonly used with “bitmasks” A binary & used with a bitmask can ensure that a given bit is turned “off”

Binary (Bitwise) Or - | | Y X 194 | 225 = (194) | (225) (227) Binary OR, also, is commonly used with “bitmasks” A binary | used with a bitmask can ensure that a given bit is turned “on”

Binary (Bitwise) Xor - ⊕ ⊕ Y X 194 ^ 225 = (194) ⊕ (225) (35) Xors are commonly used to switch the values of selected bits or to test for inequivalence C uses ^ for Xor

Bitshifts ( > Right Shift) A bit shift shifts bits in a direction Left shift shifts bits to the left and simulates a multiply of 2 Right shift shifts bits to the right and simulates an integer division of 2 Bits outside the range are lost 23 << 3 = 184 (left shift by 3) shifted = >> 2 = 5 (right shift by 2) = 5 (note the last two bits are lost)

True and False Generally, false is zero and true is not- zero Usually, all comparisons which are true generate a 1 (23 > 4) = 1 This comes up a lot!

Modulo Division (%) Integer division which provides the “remainder” from an integer division Assuming integer operations  123 % 6 = 3  123 / 6 = 20 (note, the fractional portion will be dropped) Recall: False is 0, and True is not 0  What does X % 2 give for all odd numbers?

Order of operations – C & Matlab Operators * / %Multiplication, division, modulo (integer) division + -Addition, subtraction >Left bitshift, right bitshift &Bitwise and ^Bitwise xor |Bitwise or

References Nicholas, P. (1994). Digital Design. Minneapolis/St. Paul: West Publishing Company