March 2005 1R. Smith - University of St Thomas - Minnesota ENGR 330: Today’s Class Class on Wednesday – “Lab time” in OSS 230Class on Wednesday – “Lab.

Slides:



Advertisements
Similar presentations
March R. Smith - University of St Thomas - Minnesota Today’s Class Quiz RecapQuiz Recap Exam ReviewExam Review C MaterialC Material Matlab MaterialMatlab.
Advertisements

March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class Lab Status?Lab Status? Stuff from the readingStuff from the reading.
March R. Smith - University of St Thomas - Minnesota ENGR 330: Today’s Class Exam Topic OverviewExam Topic Overview Technical Topic ReviewTechnical.
March R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class Tomorrow’s ExamTomorrow’s Exam Today’s LabToday’s Lab SortingSorting.
March R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class AdministrativeAdministrative –Project proposals –This week’s lab Notes.
March R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class Lab 16Lab 16 Filling in an arrayFilling in an array Searching for a.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class IF StatementIF Statement Revisiting assignment statementsRevisiting.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class Hard Drives – more laterHard Drives – more later MethodsMethods.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Exam TopicsExam Topics.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Functions and Array ArgumentsFunctions and Array Arguments ExamExam.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Today: covering through P. 83 of textToday: covering through P. 83 of.
March R. Smith - University of St Thomas - Minnesota Today’s Class Course StuffCourse Stuff –Classroom change TOMORROW –Assignment; Lab While LoopsWhile.
March R. Smith - University of St Thomas - Minnesota Today’s Class RecapRecap More course thingsMore course things Work on labs/projectsWork on labs/projects.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class GradingGrading The examThe exam Sorting arraysSorting arrays Pointers,
Spring R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Final Exam ReviewFinal Exam Review –Assessment –Exam Format –C –Matlab.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Exam StatusExam Status Recap of Lab 7 ExampleRecap of Lab 7 Example.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class I/O ObjectsI/O Objects Lab 12Lab 12.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Young Scholars GrantsYoung Scholars Grants Exam Next TuesdayExam Next.
March R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class Today’s LabToday’s Lab SortingSorting.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class End of Chapter 2: READ Section 2.15End of Chapter 2: READ Section.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class The ProjectThe Project PointersPointers.
March R. Smith - University of St Thomas - Minnesota CISC Class Today Return Homework; grading recapReturn Homework; grading recap “Enigma”
March /18R. Smith - University of St Thomas - Minnesota QMCS 230 – Today in Class Getting Homework BackGetting Homework Back DecimalFormat class.
6/22/2015 1R. Smith - University of St Thomas - Minnesota QMCS Class Today St. Lukes Case StudySt. Lukes Case Study.
March R. Smith - University of St Thomas - Minnesota QMCS Class Today Working the InternetWorking the Internet RoutingRouting Firewalling in.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class Exam ReviewExam Review Arithmetic - I think everyone gets thisArithmetic.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Upcoming Exam – April 8Upcoming Exam – April 8 Structures ReviewStructures.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class The examThe exam Hierarchy of FunctionsHierarchy of Functions Solving.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class MethodsMethods Problem solving by decompositionProblem solving by.
March R. Smith - University of St Thomas - Minnesota Today’s Class Lab 1 commentsLab 1 comments Data Types in Chapter 4Data Types in Chapter 4 Lab.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class Nested IFNested IF “Boolean” Logical Operations“Boolean” Logical.
March R. Smith - University of St Thomas - Minnesota ENGR 330: Today’s Class More “Clarifications” ?More “Clarifications” ? Interrupts – integrating.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Lab Status, Paper StatusLab Status, Paper Status Comments on Ints vs.
6/28/2015 1R. Smith - University of St Thomas - Minnesota CISC 130: Today’s Class History Paper recapHistory Paper recap Finish the movieFinish the movie.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Data IndependenceData Independence Matlab #3: Exercise 5.1Matlab #3:
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class StatusStatus –Survey –Returning homework ArraysArrays –What are they?
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Finish up Lab 13Finish up Lab 13 Lab 14 – DetailsLab 14 – Details.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class The examThe exam –Open book, no notes, like last time Exam TopicsExam.
March R. Smith - University of St Thomas - Minnesota ENGR 330: Today’s Class Administrative: do you want another lab?Administrative: do you want.
Data Representation in Computers
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Revised Lab 14/15Revised Lab 14/15 Counting WordsCounting Words Moving.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class About HomeworkAbout Homework Increment/DecrementIncrement/Decrement.
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Homework & GradesHomework & Grades Multiple DimensionsMultiple Dimensions.
March R. Smith - University of St Thomas - Minnesota Today’s Class Homework NotesHomework Notes –Always try to match the printed output if I give.
66 CHAPTER SYSTEM UNIT. © 2005 The McGraw-Hill Companies, Inc. All Rights Reserved. 1-2 Announcement: Major Exam 01 Thursday, 17th March, 2005 Building.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class Change in order of topicsChange in order of topics –Starting Chapter.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class The ExamThe Exam Homework NotesHomework Notes.
March R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class Peek at Lab 16Peek at Lab 16 Side effects and arraysSide effects and.
Lesson 2 0x Coding ASCII Code.
COMPUTER FUNDAMENTALS David Samuel Bhatti
COMT 222 Tools for a Digital World. Digital? What makes information Digital? If it helps:  When is information not analog? Answer:  A finite number.
Binary Arithmetic & Data representation
Spring R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Final Exam – rest of class scheduleFinal Exam – rest of class schedule.
5/27/2016 1R. Smith - University of St Thomas - Minnesota CISC 130: Today’s Class RecapRecap Drawing in 2 dimensionsDrawing in 2 dimensions Vertical HistogramVertical.
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
Data Representation, Number Systems and Base Conversions
March R. Smith - University of St Thomas - Minnesota QMCS 130: Today’s Class Grades & Lab 12Grades & Lab 12 Upcoming ExamUpcoming Exam StructuresStructures.
Chapter 7 C supports two fundamentally different kinds of numeric types: (a) integer types - whole numbers (1) signed (2) unsigned (b) floating types –
1/28/2016 1R. Smith - University of St Thomas - Minnesota CISC 130: Today’s Class Assignments 7 and 8Assignments 7 and 8 ExamExam History Paper AssignmentHistory.
1/31/2016 1R. Smith - University of St Thomas - Minnesota CISC Today’s Class RecapRecap Problem 11Problem 11 Problem 12Problem 12.
2/22/2016 1R. Smith - University of St Thomas - Minnesota CISC 130: Today’s Class History Paper scheduleHistory Paper schedule RecapRecap Plus PlusPlus.
March /18R. Smith - University of St Thomas - Minnesota QMCS 230: Today in Class What’s on the Exam Next Week?What’s on the Exam Next Week? Lab 8Lab.
7/6/2016 1R. Smith - University of St Thomas - Minnesota CISC 130: Today’s Class Collect PapersCollect Papers Review: Our ZeroesReview: Our Zeroes Review:
Binary Representation in Text
Binary Representation in Text
Introduction To Number Systems
ECE Application Programming
Number Systems.
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Presentation transcript:

March R. Smith - University of St Thomas - Minnesota ENGR 330: Today’s Class Class on Wednesday – “Lab time” in OSS 230Class on Wednesday – “Lab time” in OSS 230 ExamExam Data RepresentationData Representation C and Assignment 11C and Assignment 11

March R. Smith - University of St Thomas - Minnesota LAB Time – Assignment #11 Assignment #11 will be due Midnight, Wed.Assignment #11 will be due Midnight, Wed. I’ve borrowed OSS 230 for next WednesdayI’ve borrowed OSS 230 for next Wednesday Class will be a “Lab Session” in OSS 230Class will be a “Lab Session” in OSS 230 You can work on Assignment #11You can work on Assignment #11 You can ask for programming helpYou can ask for programming help

March R. Smith - University of St Thomas - Minnesota Exam Stats 80 points total Median score: -9 (89%)

March R. Smith - University of St Thomas - Minnesota Comments on Answers #1 – everyone got In/Out right#1 – everyone got In/Out right –For the instructions – top 3 rows match bottom 3 rows (why?) –Individual mistakes seemed random – lots of the #2 – formats without registers (so what?)#2 – formats without registers (so what?) –Register location only matters when registers are used #3 – using MOV as an example#3 – using MOV as an example –MOV is the Pentium Load/Store – should use arithmetic #4, 5 – everyone found the section in the book#4, 5 – everyone found the section in the book #6 – Most people got this#6 – Most people got this #7 – Omitting the 512 bits of data#7 – Omitting the 512 bits of data –Index and offset bits NOT included in references

March R. Smith - University of St Thomas - Minnesota More Answer Comments #8 – Full credit if #7 was multiplied by 4#8 – Full credit if #7 was multiplied by 4 –Should have 4 index values and 4 ‘valid’ bits #9-11 – Most people got this right#9-11 – Most people got this right #12 – Not in the book; in the lectures#12 – Not in the book; in the lectures –Page table size <> page table offset, but I accepted either

March R. Smith - University of St Thomas - Minnesota Data Representation Implicit in a lot we’ve doneImplicit in a lot we’ve done How do we choose a representationHow do we choose a representation –Range of numbers to solve the problem –Types of data used in solving the problem –Amounts of data Numerical size/format is a classic problemNumerical size/format is a classic problem –Fixed vs floating –Number of bits of precision

March R. Smith - University of St Thomas - Minnesota Other Representations Text representation: solved by traditionText representation: solved by tradition –There used to be lots of text formats EBCDIC, BCD, TTY codes, ASCIIEBCDIC, BCD, TTY codes, ASCII –ASCII is now the least common denominator The one dispute: how to mark the end of a lineThe one dispute: how to mark the end of a line –Unicode is a growing contender (what IS Unicode?) Text-to-Binary: hex, octal, decimal, bits?Text-to-Binary: hex, octal, decimal, bits?

March R. Smith - University of St Thomas - Minnesota Choosing a representation What does the application work with?What does the application work with? –Numbers? What rangesWhat ranges Role of fractions and fractional precisionRole of fractions and fractional precision External representation: decimal, hex, octal, binary..?External representation: decimal, hex, octal, binary..? –Text? What languages?What languages? –Unicode vs ASCII Form of text?Form of text? –Straight strings? –Blocks of text? –How to handle newlines? –Symbolic values? – it’s up to you, then

March R. Smith - University of St Thomas - Minnesota I/O makes a program ‘interesting’ #include #include getchar() returns the next charactergetchar() returns the next character –Greater than zero is a character –Treat 0 as end of file –Look for ‘\n’ to find the end of a line putchar(ch) writes the character ‘ch’ to outputputchar(ch) writes the character ‘ch’ to output –Again, ‘\n’ starts a new line printf(“Text string\n”)printf(“Text string\n”) –Prints text strings –Can also do outbound number conversion

March R. Smith - University of St Thomas - Minnesota Inbound Number Conversion A good exerciseA good exercise –Gets us thinking about the difference between numbers and their representations –We can generalize this to all bases Num = (Num * Base) + (NextChar – ‘0’)Num = (Num * Base) + (NextChar – ‘0’) Just loop till NextChar isn’t a digit.Just loop till NextChar isn’t a digit.

March R. Smith - University of St Thomas - Minnesota Parts of the problem Distinguish digits and non-digitsDistinguish digits and non-digits Convert digits to binary representationConvert digits to binary representation Where does the typed number end?Where does the typed number end? What variables do we need?What variables do we need? What kind of loop do we use?What kind of loop do we use? How do we prove it worked?How do we prove it worked? –printf(“Converted value: %d \n”);

March R. Smith - University of St Thomas - Minnesota Embellishments Variable base conversion (base 2 thru 9)Variable base conversion (base 2 thru 9) How do we do hex and beyond?How do we do hex and beyond?

March R. Smith - University of St Thomas - Minnesota That’s it. Questions?Questions? Creative Commons License This work is licensed under the Creative Commons Attribution-Share Alike 3.0 United States License. To view a copy of this license, visit or send a letter to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.