Physics 2660: Fundamentals of Scientific Computing. Lecture 14 Instructor: Prof. Chris Neu

Size: px
Start display at page:

Download "Physics 2660: Fundamentals of Scientific Computing. Lecture 14 Instructor: Prof. Chris Neu"

Transcription

1 Physics 2660: Fundamentals of Scientific Computing Lecture 14 Instructor: Prof. Chris Neu

2 Notes Last lecture! Upcoming homeworks: HW13 due Wednesday 2 May at 11:59pm HW14 due Wednesday 2 May at 11:59pm a course evaluation alt3zq Tuma, Andrew ces2fa Stephens, Catherine ecj4wb Jones, Ethan jls6gw Selby, Jonathan raj9qv Jennings, Robert rm3xw Mora, Raymundo sam3bf Murri, Samuel vh2[ Huang, Vicki Why have you not completed this? Solutions to all labs and hw s are in the process of being posted sorry for recent delays 2

3 Reminder Grading of HWs almost caught up! Register for piazza! Only 50 out of 60 so far All questions about final exam will only be answered via piazza Office hours: all held in our computer lab, room 022-C of this bldg Me: After lecture 3:30-4:30 every Tuesday TAs: Mondays: 3-5pm and 6-8pm Wednesdays: 5-9pm 3

4 Notes Final exam is coming: Take-home projects 3 problems Like a more involved, longer multipart homework assignment Assigned last week of semester on Tuesday 2 May will be posted by 3:30pm today Due Thursday May 10: electronic copies by 9:00am hard-copies must be submiied Thursday 10 May between 08:00-10:00 in room 022-C, our computer lab.or earlier by personal arrangement with me. 4

5 Final exam is coming: Take-home projects 3 problems Notes Like a more involved, longer multipart homework assignment Assigned last week of semester on Tuesday 1 May Due Thursday May 10: electronic copies by 9:00am hard-copies must be submiied Thursday 10 May between 08:00-10:00 in room 022-C, our computer lab.or earlier by personal arrangement with me. Due Thursday May 10, electronically by 9:00am and hard copies between 08:00 and 10:00 in 022-C 5

6 Last time: Comparing data to a prediction Review and Outline Today: Tuning a model to best represent the data More tests of compatibility 6

7 Summary so far Compare some data to a model, account for uncertainties Calculate reduced χ 2 If good agreement should see different points sometimes high/low if k large, reduced χ 2 ~ 1.0 7

8 Tuning a Model to Best Match Some Data 8

9 Tuning a Model 9

10 Tuning a Model Can we figure out which model which values of a and b the data most favors? 10

11 Probability of Some Observation 11

12 Probability of Multiple Observations The probability of the collection of data 3 observations is just the product of the three individual probabilities 12

13 Probability of Multiple Observations The probability of the collection of data k observations is just the product of the k individual probabilities 13

14 P: The χ 2 Likelihood Function 14

15 Minimizing the χ 2 15

16 Minimizing the χ 2 16

17 Minimizing the χ 2 17

18 Minimizing the χ 2 18

19 More Powerful Application: An Arbitrary Theory 19

20 FiPing with Gnuplot P(x;a, b,c) = 1 2πc 2 e (ax b) 2 2c 2 20

21 Assessing the Quality of a Fit 21

22 Assessing the Quality of a Fit Trivial case Consequence: If the number of fit parameters is greater than or equal to the number of data points the χ 2 is undefined. 22

23 Assessing the Quality of a Fit P(x;a, b,c) = 1 2πc 2 e (ax b) 2 2c 2 23

24 Assessing the Quality of a Fit So there is a 90% probability that, if the data were consistent with the model (here a Gaussian-like thing with 3 params), the data would have a higher chi2 value. Too good to be true? Why are the points so close to the model? Did the fit procedure cheat in some way? Are the uncertainties over-estimated? 24

25 FiPing is Done EVERYWHERE 25

26 Aside: Gravitational Waves hips:// 26

27 Curve FiPing 27

28 Deviations from the Model 28

29 The Pull Distribution 29

30 Bias Is the Prediction In Accord with the Data? 30

31 Clusters of Data Above/Below 31

32 Clusters of Data Above/Below 32

33 What Have We Learned 33

34 What Have We Learned We learned a whole lot this semester! Computers Programming Language C For many of you this was your first entrypoint into the use of a computer as a tool for data analysis Many of you started from very liile experience Generated a set of tools you can rely on in the future for a whole host of problems in your chosen field, science or otherwise Data Presentation Data Analysis and Assessment Some Statistics some very important statistical concepts 34

35 C vs. C++ 35

36 C vs. C++ 0 C is much simpler for beginners than C++ but far less powerful 1 C++ can run most C code but not the other way round! 2 Functions are the building blocks of C whereas objects are the building blocks of C++ 3 In C, the program is formulated step-by-step but in C++ the base elements are formulated first and then linked together in larger systems 4 In C++, functions can be overloaded, but not in C 5 C++ has a much larger library than C 6 C++ allows user to create classes (similar to structures) to which methods and functions can be assigned and within which they can operate 7 In C++ you can add your own types and objects inheriting properties and routines from other classes. This allows you to add more features to your own classes and the standard library as well 8 C++ uses Namespace, which is very useful in avoiding multiple declarations 9 C++ has built in exception support 36

37 What is next? What more could you learn? 37

38 What Could You Try Next? You now have a firm foundation in C. What could be next? Another powerful language used in scientific seiings, such as python Some scripting language: Bash scripts, perl, etc., to automate many types of text and data manipulation, etc. Object Oriented features of C++, Java, C#, etc: Powerful (and sometimes dangerous) design tools! A physics/math library, like ROOT, R, CERNLIB, CLHEP, LINPACK, GSL, etc Overview of analytical techniques in classes like PHYS 5630/40(Computational Physics 1/2) Get a job w/ a research group, apply your skills, and learn more! 38

39 What Could You Try Next? Worldwide distributed computing grids hip:// UVa s High-Performance Computing cluster: hip://arcs.virginia.edu/rivanna Massively Parallel Processing Real time controls automation robotics eg. autonomous vehicles,... Quantum Computing hip:// 39

40 Grid Computing We have operated this semester in the following fashion: sit down at some personal or lab computer use this as a portal to a cluster of computers, galileo, featuring large amounts of storage many nodes allowing multiple users to exploit the same resource simultaneously Some drawbacks: galileo can get slow bogged down by other users. What do we do in these cases? Other clusters available to us and where? /home is a shared resource and has goien full a few times, preventing work not an infinite space resource interactive jobs are tempermental: what if you needed to run 1000s of jobs need 1000s of terminal sessions? what if I needed lots of data to be stored but only needed it very occasionally? 40

41 TIER-0 CERN AT LHC, need to store, analyze and distribute 15 Petabytes of data per year (1% of digital information produced in the world) All data is processed at CERN and backed up on tape But CERN provides only ~20% total compute capacity

42 Distributed Computing Tier-1 sites Sufficient storage capacity for large fraction of the data Only store data specific to given task Large scale reprocessing Distribution to Tier-2 sites 11 sites for all LHC experiments Distributes data to ~30 Tier-3 sites

43 Worldwide LHC Computing Grid LHC Grid gives access to more than 7000 scientists in more than 30 countries World s largest computer grid connecting more than 200,000 CPUs at universities and research institutes Runs over 1,000,000 tasks every day

44 TIER-0/1s CMS Data Processing on the Grid CMS observes more than 400 unique users submitting jobs per week Capacity run up to 200,000 jobs per day on the Grid TIER-2s TIER-3s

45 CERN Computing hips:// 45

46 The Final Exam 46

47 Final exam: Take-home projects Notes Like a more involved, longer multipart homework assignment Due Thursday May 10: electronic copies by 9:00am hard-copies must be submiied Thursday 10 May between 08:00-10:00 in room 022-C, our computer lab or earlier by personal arrangement with me Due Thursday May 10, electronically by 9:00am and hard copies between 08:00 and 10:00 in 022-C 47

48 Some Guidelines for Final All students must work individually, no collaboration. You can ask questions via or chat or on Piazza but the insight will be limited to conceptual assistance or clarifications. TA hours will be held on Thursday 3 May xxxxx and Friday 4 May yyyyyyy. These will not be standard lab-ta hours: students can come individually to ask questions to the TA but then you will go and work on the questions on your own. Conceptual and clarifications on content only, no assistance in determining the solutions. No examination of code will be allowed. Pose all questions before Monday 8 May 8pm. Allowed resources: class texts, class notes, class web page (including solutions), and web links provided directly from the class web pages. You can use functions available in the standard C libraries we have used in class/lab/homeworks. /chat/Piazza any requests for problem clarifications by Monday, May 7, 8pm. This may be followed by a single FAQ covering appropriate questions. Watch for this . After this, there will be no more discussion during the exam. 48

49 Some Guidelines for Final All students must work individually, no collaboration. You can ask questions via or chat or on Piazza but the insight will be limited to conceptual assistance or clarifications. Start your work early! TA hours will be held on Thursday 3 May xxxxx and Friday 4 May yyyyyyy. These will not be standard lab-ta hours: students can come individually to ask questions to the TA but then you will go and work on the questions on your own. Conceptual and There is an early deadline on clarifications on content only, no assistance in determining the solutions. No examination of code will be allowed. questions to encourage you to start working on it at least thinking about it right away. Pose all questions before Monday 8 May 8pm. Allowed resources: class texts, class notes, class web page (including solutions), and web links provided directly from the class web pages. You can use functions available in the standard C libraries we have used in class/lab/homeworks. /chat/Piazza any requests for problem clarifications by Monday, May 7, 8pm. This may be followed by a single FAQ covering appropriate questions. Watch for this . After this, there will be no more discussion during the exam. 49

50 The End! 50

51 More Testing of Compatibility 51

52 Cumulative Distribution Function 52

53 Cumulative Distribution Function 53

54 Example: PDF and CDF 54

55 Empirical Distribution Function 55

56 Empirical Distribution Function The ECDF is made from unbinned data not from a binned histogram use raw measured values Do this by: 1. say you have N values, x i 2. sort the N values in order of increasing value 3. plot each of the N values with x i on the x-axis and i/ N on the y-axis Now, compare model s CDF and the data s ECDF 56

57 Testing Compatibility 57

58 Testing Compatibility 58

59 Manipulating Binary Data 59

60 Bits and Bytes 60

61 Flipping Bits 61

62 Bitwise Operators 62

63 Bitwise AND 63

64 Bitwise OR 64

65 Bitwise Left Shift 65

66 Bitwise Right Shift 66

67 Bitwise Inverse 67

68 Bitwise Shift on Constants 68

69 Testing and SePing Bits ( ) 69

70 Testing and SePing Bits: Masks Mask ( ) 70

71 Testing and SePing Bits: Masks ( ) 71

72 Clearing a Bit 72

73 Manipulating Binary Data: Example 73

74 Hexadecimal Representation 74

75 Hexadecimal Representation 75

76 Hexadecimal Representation 76

77 Data Storage 77

78 Example 78

79 Example 79

80 Example 80

81 The Exclusive Or (XOR) Operation 81

82 The Exclusive Or (XOR) Operation 82

83 XOR Application 83

84 XOR Application Say you want to send this plain-text message : You and the recipient have a copy of some predetermined key ^ ^ ^ ^ ^ ^ ^ ^ key ^ message = encrypted message: And you send this encrypted message to your intended recipient. 84

85 XOR Application Your recipient receives your encrypted message: and applies the key: ^ ^ ^ ^ ^ ^ ^ ^ and gets a copy of the plain-text message. Successful secret communication! 85

86 XOR Application One flaw: if someone intercepts both the coded and plain message: ^ ^ ^ ^ ^ ^ ^ ^ They can derive the key! This a problem if the sender/recipient ever re-use a key. 86

87 Review: Bitwise Operators 87

88 Review: Testing and SePing Bits 88

89 Storage of Binary Data 89

90 The fputc Function 90

91 The fputc Function 1 byte 4 bytes 1 byte 4 bytes = 4 chars 91

92 Comparison of ASCII and Binary Storage 10 bytes = 10 chars 4 bytes = 4 chars 92

93 More on Characters 93

94 Signed v. Unsigned Vars 94

95 Example: Say Signed vs. Unsigned Vars a = 1 d = b and b = -1 d = b 95

96 Example: Say Signed vs. Unsigned Vars a = 1 d = b and b = -1 d = b Then a+b = 1 d + (-1 d ) =? 96

97 Example: Say Signed vs. Unsigned Vars a = 1 d = b and b = -1 d = b Then a+b = 1 d + (-1 d ) = b b 97

98 Example: Say Signed vs. Unsigned Vars a = 1 d = b and b = -1 d = b Then a+b = 1 d + (-1 d ) = b b = b 98

99 Example: Say Signed vs. Unsigned Vars a = 1 d = b and b = -1 d = b Then a+b = 1 d + (-1 d ) = b b = b = -2 d 99

100 Example: Say Signed vs. Unsigned Vars a = 1 d = b and b = -1 d = b Then a+b = 1 d + (-1 d ) = b b = b = -2 d That looks wrong to me. 100

101 Trick: Two s Complement Notation 101

102 Trick: Two s Complement Notation To form the two s complement of any negative number: 1. Convert number to N-bit representation 2. Subtract number from 2 N 3. Add one to the number Examples, 8-bit negative numbers: If a = -1 then -1 in 8-bit representation is a 2c = ( ) = If a = -5 then a 2c = =

103 Example: Say Signed vs. Unsigned Vars a = 1 d = b and b = -1 d = b Then (using 2 s complement) a+b = 1 d + (-1 d ) = b b = b = 0 d That s beier! 103

104 More On Binary Data Output 104

105 More On Binary Data Output 105

106 More On Binary Data Output 106

107 More On Binary Data Input 107

108 More On Binary Data Output 108

109 More On Binary Data Output 109

110 More On Binary Data Input 110

111 More On Binary Data Input 111

112 fopen: File I/O Modes 112

113 fopen, fwrite and fread 113

114 rewind 114

115 fseek 115

116 fseek 116

117 ftell 117

118 feof 118

119 Writing Binary for Arbitrary Structs 119

120 Filesize Comparison of Binary v. ASCII Formats 120

121 Solving Differential Equations 121

122 A Trajectory 122

123 A Trajectory We don t know v(t) but we know v(t0) and the time derivative. We seek v(t). 123

124 A Trajectory All we know is the derivative of v! Here v=y and t=x. result: not very accurate!!! one step: 124

125 A BePer Method 125

126 A BePer Method All we know is the derivative! 126

127 A BePer Method All we know is the derivative! 127

128 A BePer Method 128

129 A BePer Method 129

130 Passing Pointers to Structures 130

131 Unintended Consequences 131

132 Unintended Consequences Warning tells you to rewrite this! 132

133 Optional Function Arguments 133

134 Default Argument Values in Functions: C++ 134

135 Default Argument Values in Functions: C++ 135

136 Default Argument Values in Functions: C++ Example: 136

137 Searching in Arrays 137

138 Searching for a Particular Item 138

139 Method: Linear Search 139

140 Method: Binary Search 140

141 Method: Binary Search 141

142 Method: Binary Search 142

143 Method: Binary Search 143

144 Method: Binary Search 144

145 Search Speed: Linear Method 145

146 Search Speed: Binary Method 146

147 Sorting 147

148 Sorting Methods 148

149 Method: Selection Sort 149

150 Method: Selection Sort 150

151 Method: Selection Sort 151

152 Method: Quicksort 152

153 Method: Quicksort 153

154 Method: Quicksort 154

155 Method: Quicksort 155

156 Method: Quicksort 156

157 Method: Quicksort 157

158 Linked Lists 158

159 Reminder About Arrays 159

160 Linked Lists: A Special Data Structure 160

161 Linked Lists: A Special Data Structure mallc calloc realloc 161

162 Linked Lists: A Special Data Structure 162

163 Linked Lists: A Special Data Structure 163

164 Linked Lists: A Special Data Structure If these were stored in an array, this could be a huge job. 164

165 Linked Lists: A Special Data Structure If these were stored in an array, this could be a huge job. 165

166 Linked Lists: A Special Data Structure 166

167 Linked Lists: A Special Data Structure 167

168 Linked Lists: A Special Data Structure 168

169 Linked Lists: A Special Data Structure 169

170 Linked Lists: A Special Data Structure 170

171 So What? These things can actually be very useful! 171

172 Linked Lists Example: FIFOs 172

173 Linked Lists: Summary 173

174 Dynamic Memory Allocation: Memory is typically allocated by the compiler but what if we need to change the requirements on the fly while executing a program? (We did not go through this unit in lecture.) 174

175 The Stack 175

176 The Stack Each running program has its own stack As functions are called, the variables local to that function are loaded to the top of the stack. When the function is complete that memory is freed for other uses One can use up all the available memory in a stack: stack overflow error 176

177 The Heap 177

178 The malloc function 178

179 The calloc function 179

180 The free function 180

181 The realloc function 181

182 Memory Allocation Failure 182

183 Dynamic Memory Allocation: Example I 183

184 Dynamic Memory Allocation: Example II 184

185 Dynamic Memory Allocation: Example II 185

186 Optional Function Arguments 186

187 Default Argument Values in Functions: C++ 187

188 Default Argument Values in Functions: C++ 188

189 Default Argument Values in Functions: C++ Example: 189

Physics 2660: Fundamentals of Scientific Computing. Lecture 7 Instructor: Prof. Chris Neu

Physics 2660: Fundamentals of Scientific Computing. Lecture 7 Instructor: Prof. Chris Neu Physics 2660: Fundamentals of Scientific Computing Lecture 7 Instructor: Prof. Chris Neu (chris.neu@virginia.edu) Reminder HW06 due Thursday 15 March electronically by noon HW grades are starting to appear!

More information

Physics 2660: Fundamentals of Scientific Computing. Lecture 3 Instructor: Prof. Chris Neu

Physics 2660: Fundamentals of Scientific Computing. Lecture 3 Instructor: Prof. Chris Neu Physics 2660: Fundamentals of Scientific Computing Lecture 3 Instructor: Prof. Chris Neu (chris.neu@virginia.edu) Announcements Weekly readings will be assigned and available through the class wiki home

More information

Data III & Integers I

Data III & Integers I Data III & Integers I CSE 351 Autumn 2018 Instructor: Justin Hsia Teaching Assistants: Akshat Aggarwal An Wang Andrew Hu Brian Dai Britt Henderson James Shin Kevin Bi Kory Watson Riley Germundson Sophie

More information

Physics 2660: Fundamentals of Scientific Computing. Lecture 5 Instructor: Prof. Chris Neu

Physics 2660: Fundamentals of Scientific Computing. Lecture 5 Instructor: Prof. Chris Neu Physics 2660: Fundamentals of Scientific Computing Lecture 5 Instructor: Prof. Chris Neu (chris.neu@virginia.edu) Reminder I am back! HW04 due Thursday 22 Feb electronically by noon HW grades are coming.

More information

MPATE-GE 2618: C Programming for Music Technology. Syllabus

MPATE-GE 2618: C Programming for Music Technology. Syllabus MPATE-GE 2618: C Programming for Music Technology Instructor Dr. Schuyler Quackenbush schuyler.quackenbush@nyu.edu Lab Teaching Assistant TBD Description Syllabus MPATE-GE 2618: C Programming for Music

More information

Fundamentals of Computer Science CSCI 136 Syllabus Fall 2018

Fundamentals of Computer Science CSCI 136 Syllabus Fall 2018 Fundamentals of Computer Science CSCI 136 Syllabus Fall 2018 CSCI 136 Section 00 Instructor: Michael Cassens Office: SS 411 Office Hours: MWF 11:00-11:50 am or by appt Phone: (415) 787-0577 E-mail: michael.cassens@mso.umt.edu

More information

Data III & Integers I

Data III & Integers I Data III & Integers I CSE 351 Spring 2017 Instructor: Ruth Anderson Teaching Assistants: Dylan Johnson Kevin Bi Linxing Preston Jiang Cody Ohlsen Yufang Sun Joshua Curtis Administrivia Everyone has VM

More information

CS 241 Data Organization. August 21, 2018

CS 241 Data Organization. August 21, 2018 CS 241 Data Organization August 21, 2018 Contact Info Instructor: Dr. Marie Vasek Contact: Private message me on the course Piazza page. Office: Room 2120 of Farris Web site: www.cs.unm.edu/~vasek/cs241/

More information

Data III & Integers I

Data III & Integers I Data III & Integers I CSE 351 Autumn 2016 Instructor: Justin Hsia Teaching Assistants: Chris Ma Hunter Zahn John Kaltenbach Kevin Bi Sachin Mehta Suraj Bhat Thomas Neuman Waylon Huang Xi Liu Yufang Sun

More information

Inf2C - Computer Systems Lecture 2 Data Representation

Inf2C - Computer Systems Lecture 2 Data Representation Inf2C - Computer Systems Lecture 2 Data Representation Boris Grot School of Informatics University of Edinburgh Last lecture Moore s law Types of computer systems Computer components Computer system stack

More information

CS 241 Data Organization using C

CS 241 Data Organization using C CS 241 Data Organization using C Fall 2018 Instructor Name: Dr. Marie Vasek Contact: Private message me on the course Piazza page. Office: Farris 2120 Office Hours: Tuesday 2-4pm and Thursday 9:30-11am

More information

Integers II. CSE 351 Autumn Instructor: Justin Hsia

Integers II. CSE 351 Autumn Instructor: Justin Hsia Integers II CSE 351 Autumn 2016 Instructor: Justin Hsia Teaching Assistants: Chris Ma Hunter Zahn John Kaltenbach Kevin Bi Sachin Mehta Suraj Bhat Thomas Neuman Waylon Huang Xi Liu Yufang Sun http://xkcd.com/571/

More information

ECE 250 / CS 250 Computer Architecture. C to Binary: Memory & Data Representations. Benjamin Lee

ECE 250 / CS 250 Computer Architecture. C to Binary: Memory & Data Representations. Benjamin Lee ECE 250 / CS 250 Computer Architecture C to Binary: Memory & Data Representations Benjamin Lee Slides based on those from Alvin Lebeck, Daniel Sorin, Andrew Hilton, Amir Roth, Gershon Kedem Administrivia

More information

LING 388: Computers and Language. Lecture 5

LING 388: Computers and Language. Lecture 5 LING 388: Computers and Language Lecture 5 Administrivia Homework 3 graded Quick Homework 4 out today I'll be away next two weeks (my apologies) Colton Flowers, a HLT student, will take you through Python

More information

Integer Representation

Integer Representation Integer Representation Announcements assign0 due tonight assign1 out tomorrow Labs start this week SCPD Note on ofce hours on Piazza Will get an email tonight about labs Goals for Today Introduction to

More information

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O

ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O ECE2049-E17 Lecture 4 1 ECE2049 E17 Lecture 4 MSP430 Architecture & Intro to Digital I/O Administrivia Homework 1: Due today by 7pm o Either place in box in ECE office or give to me o Office hours tonight!

More information

CS 61C: Great Ideas in Computer Architecture C Pointers. Instructors: Vladimir Stojanovic & Nicholas Weaver

CS 61C: Great Ideas in Computer Architecture C Pointers. Instructors: Vladimir Stojanovic & Nicholas Weaver CS 61C: Great Ideas in Computer Architecture C Pointers Instructors: Vladimir Stojanovic & Nicholas Weaver http://inst.eecs.berkeley.edu/~cs61c/sp16 1 Agenda Pointers Arrays in C 2 Address vs. Value Consider

More information

Under the Hood: Data Representation. Computer Science 104 Lecture 2

Under the Hood: Data Representation. Computer Science 104 Lecture 2 Under the Hood: Data Representation Computer Science 104 Lecture 2 Admin Piazza, Sakai Up Everyone should have access Homework 1 Posted Due Feb 6 PDF or Plain Text Only: No Word or RTF Recommended: Learn

More information

CSE 12 Spring 2016 Week One, Lecture Two

CSE 12 Spring 2016 Week One, Lecture Two CSE 12 Spring 2016 Week One, Lecture Two Homework One and Two: hw2: Discuss in section today - Introduction to C - Review of basic programming principles - Building from fgetc and fputc - Input and output

More information

Numerical Methods in Physics. Lecture 1 Intro & IEEE Variable Types and Arithmetic

Numerical Methods in Physics. Lecture 1 Intro & IEEE Variable Types and Arithmetic Variable types Numerical Methods in Physics Lecture 1 Intro & IEEE Variable Types and Arithmetic Pat Scott Department of Physics, Imperial College November 1, 2016 Slides available from http://astro.ic.ac.uk/pscott/

More information

Review: C Strings. A string in C is just an array of characters. Lecture #4 C Strings, Arrays, & Malloc

Review: C Strings. A string in C is just an array of characters. Lecture #4 C Strings, Arrays, & Malloc CS61C L4 C Pointers (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #4 C Strings, Arrays, & Malloc Albert Chae Instructor 2008-06-26 Review: C Strings A string in C is just an array

More information

Arithmetic and Bitwise Operations on Binary Data

Arithmetic and Bitwise Operations on Binary Data Arithmetic and Bitwise Operations on Binary Data CSCI 2400: Computer Architecture ECE 3217: Computer Architecture and Organization Instructor: David Ferry Slides adapted from Bryant & O Hallaron s slides

More information

Unit 10: Data Structures CS 101, Fall 2018

Unit 10: Data Structures CS 101, Fall 2018 Unit 10: Data Structures CS 101, Fall 2018 Learning Objectives After completing this unit, you should be able to: Define and give everyday examples of arrays, stacks, queues, and trees. Explain what a

More information

61A LECTURE 1 FUNCTIONS, VALUES. Steven Tang and Eric Tzeng June 24, 2013

61A LECTURE 1 FUNCTIONS, VALUES. Steven Tang and Eric Tzeng June 24, 2013 61A LECTURE 1 FUNCTIONS, VALUES Steven Tang and Eric Tzeng June 24, 2013 Welcome to CS61A! The Course Staff - Lecturers Steven Tang Graduated L&S CS from Cal Back for a PhD in Education Eric Tzeng Graduated

More information

VE281 Data Structures and Algorithms. Introduction and Asymptotic Algorithm Analysis

VE281 Data Structures and Algorithms. Introduction and Asymptotic Algorithm Analysis VE281 Data Structures and Algorithms Introduction and Asymptotic Algorithm Analysis Time and Location Time: Tuesday 10:00-11:40 am, Thursday 10:00-11:40 am. Location: Dong Xia Yuan 200 2 Instructor Weikang

More information

Practical Numerical Methods in Physics and Astronomy. Lecture 1 Intro & IEEE Variable Types and Arithmetic

Practical Numerical Methods in Physics and Astronomy. Lecture 1 Intro & IEEE Variable Types and Arithmetic Practical Numerical Methods in Physics and Astronomy Lecture 1 Intro & IEEE Variable Types and Arithmetic Pat Scott Department of Physics, McGill University January 16, 2013 Slides available from http://www.physics.mcgill.ca/

More information

Advanced Programming Concepts. CIS 15 : Spring 2007

Advanced Programming Concepts. CIS 15 : Spring 2007 Advanced Programming Concepts CIS 15 : Spring 2007 Mondays and Thursdays 12:15 pm to 1:30 pm 232 Ingersoll Extension Instructor: Chipp Jansen (not Tennenbaum as listed) E-mail: chipp@sci.brooklyn.cuny.edu

More information

Representation of Information

Representation of Information Representation of Information CS61, Lecture 2 Prof. Stephen Chong September 6, 2011 Announcements Assignment 1 released Posted on http://cs61.seas.harvard.edu/ Due one week from today, Tuesday 13 Sept

More information

Introduction to C. Zhiyuan Teo. Cornell CS 4411, August 26, Geared toward programmers

Introduction to C. Zhiyuan Teo. Cornell CS 4411, August 26, Geared toward programmers Introduction to C Geared toward programmers Zhiyuan Teo Slide heritage: Alin Dobra Niranjan Nagarajan Owen Arden Robert Escriva Cornell CS 4411, August 26, 2011 1 Administrative Information 2 Why C? 3

More information

Lecture 27: Review. Reading: All chapters in ISLR. STATS 202: Data mining and analysis. December 6, 2017

Lecture 27: Review. Reading: All chapters in ISLR. STATS 202: Data mining and analysis. December 6, 2017 Lecture 27: Review Reading: All chapters in ISLR. STATS 202: Data mining and analysis December 6, 2017 1 / 16 Final exam: Announcements Tuesday, December 12, 8:30-11:30 am, in the following rooms: Last

More information

College Algebra. Cartesian Coordinates and Graphs. Dr. Nguyen August 22, Department of Mathematics UK

College Algebra. Cartesian Coordinates and Graphs. Dr. Nguyen August 22, Department of Mathematics UK College Algebra Cartesian Coordinates and Graphs Dr. Nguyen nicholas.nguyen@uky.edu Department of Mathematics UK August 22, 2018 Agenda Welcome x and y-coordinates in the Cartesian plane Graphs and solutions

More information

COMP322 - Introduction to C++ Lecture 01 - Introduction

COMP322 - Introduction to C++ Lecture 01 - Introduction COMP322 - Introduction to C++ Lecture 01 - Introduction Robert D. Vincent School of Computer Science 6 January 2010 What this course is Crash course in C++ Only 14 lectures Single-credit course What this

More information

Unit 2: Data Storage CS 101, Fall 2018

Unit 2: Data Storage CS 101, Fall 2018 Unit 2: Data Storage CS 101, Fall 2018 Learning Objectives After completing this unit, you should be able to: Evaluate digital circuits that use AND, OR, XOR, and NOT. Convert binary integers to/from decimal,

More information

Number Systems for Computers. Outline of Introduction. Binary, Octal and Hexadecimal numbers. Issues for Binary Representation of Numbers

Number Systems for Computers. Outline of Introduction. Binary, Octal and Hexadecimal numbers. Issues for Binary Representation of Numbers Outline of Introduction Administrivia What is computer architecture? What do computers do? Representing high level things in binary Data objects: integers, decimals, characters, etc. Memory locations (We

More information

Computers and programming languages introduction

Computers and programming languages introduction Computers and programming languages introduction Eugeniy E. Mikhailov The College of William & Mary Lecture 01 Eugeniy Mikhailov (W&M) Practical Computing Lecture 01 1 / 19 Class goals and structure Primary

More information

CISC 3130 Data Structures Spring 2018

CISC 3130 Data Structures Spring 2018 CISC 3130 Data Structures Spring 2018 Instructor: Ari Mermelstein Email address for questions: mermelstein AT sci DOT brooklyn DOT cuny DOT edu Email address for homework submissions: mermelstein DOT homework

More information

Announcements. 1. Forms to return today after class:

Announcements. 1. Forms to return today after class: Announcements Handouts (3) to pick up 1. Forms to return today after class: Pretest (take during class later) Laptop information form (fill out during class later) Academic honesty form (must sign) 2.

More information

Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2

Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2 Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2 Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements Website is up

More information

Number Review. Lecture #3 More C intro, C Strings, Arrays, & Malloc Variables. Clarification about counting down

Number Review. Lecture #3 More C intro, C Strings, Arrays, & Malloc Variables. Clarification about counting down CS61C L3 C Pointers (1) inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture #3 More C intro, C Strings, Arrays, & Malloc Albert Chae Instructor 2008-06-25 Number Review Sign and magnitude

More information

CS 3030 Scripting Languages Syllabus

CS 3030 Scripting Languages Syllabus General Information CS 3030 Scripting Languages Semester: Fall 2017 Textbook: Location: Instructor Info: None. We will use freely available resources from the Internet. Online Ted Cowan tedcowan@weber.edu

More information

Online Algorithm Comparison points

Online Algorithm Comparison points CS446: Machine Learning Spring 2017 Problem Set 3 Handed Out: February 15 th, 2017 Due: February 27 th, 2017 Feel free to talk to other members of the class in doing the homework. I am more concerned that

More information

Lecture 1. Course Overview, Python Basics

Lecture 1. Course Overview, Python Basics Lecture 1 Course Overview, Python Basics We Are Very Full! Lectures and Labs are at fire-code capacity We cannot add sections or seats to lectures You may have to wait until someone drops No auditors are

More information

Computer Science 210: Data Structures

Computer Science 210: Data Structures Computer Science 210: Data Structures Welcome to Data Structures! Data structures are fundamental building blocks of algorithms and programs Csci 210 is a study of data structures design efficiency implementation

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2016 Lecture 12

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2016 Lecture 12 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2016 Lecture 12 CS24 MIDTERM Midterm format: 6 hour overall time limit, multiple sittings (If you are focused on midterm, clock should be running.) Open book

More information

LAB A Translating Data to Binary

LAB A Translating Data to Binary LAB A Translating Data to Binary Create a directory for this lab and perform in it the following groups of tasks: LabA1.java 1. Write the Java app LabA1 that takes an int via a command-line argument args[0]

More information

Binary Arithmetic CS 64: Computer Organization and Design Logic Lecture #2 Fall 2018

Binary Arithmetic CS 64: Computer Organization and Design Logic Lecture #2 Fall 2018 Binary Arithmetic CS 64: Computer Organization and Design Logic Lecture #2 Fall 2018 Ziad Matni, Ph.D. Dept. of Computer Science, UCSB Administrative Stuff The class is full I will not be adding more ppl

More information

Introduction to Information Technology ITP 101x (4 Units)

Introduction to Information Technology ITP 101x (4 Units) Objective Concepts Introduction to Information Technology ITP 101x (4 Units) Upon completing this course, students will: - Understand the fundamentals of information technology - Learn core concepts of

More information

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018

San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018 San José State University Department of Computer Science CS-144, Advanced C++ Programming, Section 1, Spring 2018 Course and Contact Information Instructor: Office Location: Telephone: Email: Office Hours:

More information

Introduction to Computer Systems

Introduction to Computer Systems Introduction to Computer Systems Web Page http://pdinda.org/ics Syllabus See the web page for more information. Class discussions are on Piazza We will make only minimal use of Canvas (grade reports, perhaps

More information

You must pass the final exam to pass the course.

You must pass the final exam to pass the course. Computer Science Technology Department Houston Community College System Department Website: http://csci.hccs.cc.tx.us CRN: 46876 978-1-4239-0146-4 1-4239-0146-0 Semester: Fall 2010 Campus and Room: Stafford

More information

Assignment 3: Binary numbers, data types and C Programs Due 11:59pm Monday 26th March 2018

Assignment 3: Binary numbers, data types and C Programs Due 11:59pm Monday 26th March 2018 Assignment 3: Binary numbers, data types and C Programs Due 11:59pm Monday 26th March 2018 Objectives: Using binary numbers variable declarations variable types writing simple C programs Marks for the

More information

Few reminders and demos

Few reminders and demos 15-123 Effective Programming in C and Unix Learning Objectives At the end of this lecture, you should be able to Understand how data is represented Understand how integers are represented Understand how

More information

Outline. Logistics. Logistics. Principles of Software (CSCI 2600) Spring Logistics csci2600/

Outline. Logistics. Logistics. Principles of Software (CSCI 2600) Spring Logistics  csci2600/ Outline Principles of Software (CSCI 600) Spring 018 http://www.cs.rpi.edu/academics/courses/spring18/csci600/ Konstantin Kuzmin, kuzmik@cs.rpi.edu Office hours: Monday and Thursday 4:00 pm - 5:30 pm Mailing

More information

Computer Science Department

Computer Science Department California State University, Dominguez Hills Computer Science Department Syllabus CS255 Dynamic Web Programming Dr. Jason Isaac Halasa Office Hours: MW 12:45-2:30 and 3:45-5:30 and by Appointment Office

More information

COMP 122/L Lecture 2. Kyle Dewey

COMP 122/L Lecture 2. Kyle Dewey COMP 122/L Lecture 2 Kyle Dewey Outline Operations on binary values AND, OR, XOR, NOT Bit shifting (left, two forms of right) Addition Subtraction Twos complement Bitwise Operations Bitwise AND Similar

More information

Introduction to Data Structures

Introduction to Data Structures 15-121 Introduction to Data Structures Lecture #1 Introduction 28 August 2019 Margaret Reid-Miller Today Course Administration Overview of Course A (very basic) Java introduction Course website: www.cs.cmu.edu/~mrmiller/15-121

More information

CSE 12 Spring 2018 Week One, Lecture Two

CSE 12 Spring 2018 Week One, Lecture Two CSE 12 Spring 2018 Week One, Lecture Two Homework One and Two: - Introduction to C - Review of basic programming principles - Building from fgetc and fputc - Input and output strings and numbers - Introduction

More information

Integers II. CSE 351 Autumn 2018

Integers II. CSE 351 Autumn 2018 Integers II CSE 351 Autumn 2018 Instructor: Teaching Assistants: Justin Hsia Akshat Aggarwal An Wang Andrew Hu Brian Dai Britt Henderson James Shin Kevin Bi Kory Watson Riley Germundson Sophie Tian Teagan

More information

Intro to C: Pointers and Arrays

Intro to C: Pointers and Arrays Lecture 4 Computer Science 61C Spring 2017 January 25th, 2017 Intro to C: Pointers and Arrays 1 Administrivia Teaching Assistants: Let s try that again. Lectures are recorded. Waitlist/Concurrent Enrollment

More information

Where are we? Compiler. translating source code (C or Java) Programs to assembly language And linking your code to Library code

Where are we? Compiler. translating source code (C or Java) Programs to assembly language And linking your code to Library code Where are we? Compiler Instruction set architecture (e.g., MIPS) translating source code (C or Java) Programs to assembly language And linking your code to Library code How the software talks To the hardware

More information

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 CS 64 Lecture 2 Data Representation Reading: FLD 1.2-1.4 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 ) + (1x10 0 ) 1010 10?= 1010 2?= 1

More information

Advanced Client-Side Web Programming CSCI 491/595 Syllabus Fall 2018

Advanced Client-Side Web Programming CSCI 491/595 Syllabus Fall 2018 Advanced Client-Side Web Programming CSCI 491/595 Syllabus Fall 2018 CSCI 491/595 Section 00 Instructor: Michael Cassens Office: SS 411 Office Hours: MWF 11:00-11:50 am or by appt Phone: (415) 787-0577

More information

More on Arrays CS 16: Solving Problems with Computers I Lecture #13

More on Arrays CS 16: Solving Problems with Computers I Lecture #13 More on Arrays CS 16: Solving Problems with Computers I Lecture #13 Ziad Matni Dept. of Computer Science, UCSB Announcements Homework #12 due today No homework assigned today!! Lab #7 is due on Monday,

More information

Recap from Last Time. CSE 2021: Computer Organization. It s All about Numbers! 5/12/2011. Text Pictures Video clips Audio

Recap from Last Time. CSE 2021: Computer Organization. It s All about Numbers! 5/12/2011. Text Pictures Video clips Audio CSE 2021: Computer Organization Recap from Last Time load from disk High-Level Program Lecture-2(a) Data Translation Binary patterns, signed and unsigned integers Today s topic Data Translation Code Translation

More information

CMPE012 Computer Engineering 12 (and Lab) Computing Systems and Assembly Language Programming. Summer 2009

CMPE012 Computer Engineering 12 (and Lab) Computing Systems and Assembly Language Programming. Summer 2009 CMPE012 Computer Engineering 12 (and Lab) Computing Systems and Assembly Language Programming Summer 2009 About these notes Originally by Cyrus Bazeghi Overhauled by Andrea Di Blas Modified by me (Alexandra

More information

CS120 Computer Science I. Instructor: Jia Song

CS120 Computer Science I. Instructor: Jia Song CS120 Computer Science I Instructor: Jia Song Instructor Contact Information Instructor: Dr. Jia Song Email: jsong@uidaho.edu (Preferred) Phone: (208) 885-1710 Office: JEB 240 (CSDS Security Lab) JEB 340

More information

CSCI-1200 Data Structures Spring 2017 Lecture 5 Pointers, Arrays, Pointer Arithmetic

CSCI-1200 Data Structures Spring 2017 Lecture 5 Pointers, Arrays, Pointer Arithmetic CSCI-1200 Data Structures Spring 2017 Lecture 5 Pointers, Arrays, Pointer Arithmetic Announcements Submitty iclicker registration is still open. Even if you already registered on the iclicker website,

More information

Programming for Engineers in Python

Programming for Engineers in Python Programming for Engineers in Python Lecture 13: Shit Happens Autumn 2011-12 1 Lecture 12: Highlights Dynamic programming Overlapping subproblems Optimal structure Memoization Fibonacci Evaluating trader

More information

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2017 Lecture 12

CS24: INTRODUCTION TO COMPUTING SYSTEMS. Spring 2017 Lecture 12 CS24: INTRODUCTION TO COMPUTING SYSTEMS Spring 2017 Lecture 12 CS24 MIDTERM Midterm format: 6 hour overall time limit, multiple sittings (If you are focused on midterm, clock should be running.) Open book

More information

CSC C69: OPERATING SYSTEMS

CSC C69: OPERATING SYSTEMS CSC C69: OPERATING SYSTEMS Tutorial 1 Thursday, Jan 17, 2013 TA: Ioan Stefanovici (ioan@cs.toronto.edu) HOW DO YOU SUCCEED IN THIS COURSE? Show up to lectures & tutorials (way too much material) Work on

More information

CS 0449 Intro to Systems Software Fall Term: 2181

CS 0449 Intro to Systems Software Fall Term: 2181 CS 0449 Intro to Systems Software Fall Term: 2181 Class Recitation Recitation Recitation Time: 11:00am 12:15pm 03:00pm 03:50pm 10:00am 10:50am 09:00am 09:50am Days: TH T W F Number 19730 20024 19731 27127

More information

EECE.2160: ECE Application Programming Spring 2017

EECE.2160: ECE Application Programming Spring 2017 Course Meetings Section 201: MWF 8-8:50, Ball 314 Section 202: MWF 12-12:50, Kitson 305 Course Website Main page: http://mjgeiger.github.io/eece2160/sp17/ Schedule: http://mjgeiger.github.io/eece2160/sp17/schedule.htm

More information

Overview of the Class

Overview of the Class Overview of the Class Copyright 2015, Pedro C. Diniz, all rights reserved. Students enrolled in the Compilers class at the University of Southern California (USC) have explicit permission to make copies

More information

Introduction to C. Sean Ogden. Cornell CS 4411, August 30, Geared toward programmers

Introduction to C. Sean Ogden. Cornell CS 4411, August 30, Geared toward programmers Introduction to C Geared toward programmers Sean Ogden Slide heritage: Alin Dobra Niranjan Nagarajan Owen Arden Robert Escriva Zhiyuan Teo Ayush Dubey Cornell CS 4411, August 30, 2013 Administrative Information

More information

CS503 Advanced Programming I CS305 Computer Algorithms I

CS503 Advanced Programming I CS305 Computer Algorithms I Syllabus: CS503 Advanced Programming I CS305 Computer Algorithms I Course Number: CS503-50/CS305-50 Course Title: Advanced Programming I/Computer Algorithms I Instructor: Richard Scherl Office: Howard

More information

CMPSCI 187 / Spring 2015 Sorting Kata

CMPSCI 187 / Spring 2015 Sorting Kata Due on Thursday, April 30, 8:30 a.m Marc Liberatore and John Ridgway Morrill I N375 Section 01 @ 10:00 Section 02 @ 08:30 1 Contents Overview 3 Learning Goals.................................................

More information

Course: Honors AP Computer Science Instructor: Mr. Jason A. Townsend

Course: Honors AP Computer Science Instructor: Mr. Jason A. Townsend Course: Honors AP Computer Science Instructor: Mr. Jason A. Townsend Email: jtownsend@pkwy.k12.mo.us Course Description: The material for this course is the equivalent of one to two semesters of an entry

More information

DRAM uses a single capacitor to store and a transistor to select. SRAM typically uses 6 transistors.

DRAM uses a single capacitor to store and a transistor to select. SRAM typically uses 6 transistors. Data Representation Data Representation Goal: Store numbers, characters, sets, database records in the computer. What we got: Circuit that stores 2 voltages, one for logic 0 (0 volts) and one for logic

More information

COMP 3500 Introduction to Operating Systems Project 5 Virtual Memory Manager

COMP 3500 Introduction to Operating Systems Project 5 Virtual Memory Manager COMP 3500 Introduction to Operating Systems Project 5 Virtual Memory Manager Points Possible: 100 Submission via Canvas No collaboration among groups. Students in one group should NOT share any project

More information

Introduction to Programming System Design CSCI 455x (4 Units)

Introduction to Programming System Design CSCI 455x (4 Units) Introduction to Programming System Design CSCI 455x (4 Units) Description This course covers programming in Java and C++. Topics include review of basic programming concepts such as control structures,

More information

CSCI2467: Systems Programming Concepts

CSCI2467: Systems Programming Concepts CSCI2467: Systems Programming Concepts Slideset 2: Information as Data (CS:APP Chap. 2) Instructor: M. Toups Spring 2018 Course updates datalab out today! - due after Mardi gras... - do not wait until

More information

Module 3: Representing Values in a Computer

Module 3: Representing Values in a Computer Module 3: Representing Values in a Computer Due Dates Assignment #1 is due Thursday January 19th at 4pm Pre-class quiz #4 is due Thursday January 19th at 7pm. Assigned reading for the quiz: Epp, 4th edition:

More information

CNG 140 C Programming. Syllabus. Course Info Fall Semester. Catalog Description

CNG 140 C Programming. Syllabus. Course Info Fall Semester. Catalog Description CNG 140 C Programming 2012-2013 Fall Semester Syllabus Course Info Catalog Description Advanced programming with C: Storage and control structures, recursion and programming with dynamic data structures.

More information

Welcome to Solving Problems with Computers I

Welcome to Solving Problems with Computers I Welcome to Solving Problems with Computers I CS 16: Solving Problems with Computers I Lecture #1 Ziad Matni Dept. of Computer Science, UCSB Image from agorolabs on slideshare.com A Word About Registration

More information

Today. Dynamic Memory Allocation: Basic Concepts. Dynamic Memory Allocation. Dynamic Memory Allocation. malloc Example. The malloc Package

Today. Dynamic Memory Allocation: Basic Concepts. Dynamic Memory Allocation. Dynamic Memory Allocation. malloc Example. The malloc Package Today Dynamic Memory Allocation: Basic Concepts Basic concepts Performance concerns Approach 1: implicit free lists CSci 01: Machine Architecture and Organization Lecture #9, April th, 016 Your instructor:

More information

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso

Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Design and development of embedded systems for the Internet of Things (IoT) Fabio Angeletti Fabrizio Gattuso Why C? Test on 21 Android Devices with 32-bits and 64-bits processors and different versions

More information

Review: Classes and Object Instances. Review: Creating an Object. Using Multiple Objects. DrawingGizmo pencil; pencil = new DrawingGizmo();

Review: Classes and Object Instances. Review: Creating an Object. Using Multiple Objects. DrawingGizmo pencil; pencil = new DrawingGizmo(); Review: Classes and Object Instances ; = new (); Class #05: Objects, Memory, & Program Traces Software Engineering I (CS 120): M. Allen, 12/13 Sept. 17 We are working with both a class () and an object

More information

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example

Number Systems. Binary Numbers. Appendix. Decimal notation represents numbers as powers of 10, for example Appendix F Number Systems Binary Numbers Decimal notation represents numbers as powers of 10, for example 1729 1 103 7 102 2 101 9 100 decimal = + + + There is no particular reason for the choice of 10,

More information

Lecture 1. Course Overview, Python Basics

Lecture 1. Course Overview, Python Basics Lecture 1 Course Overview, Python Basics We Are Very Full! Lectures are at fire-code capacity. We cannot add sections or seats to lectures You may have to wait until someone drops No auditors are allowed

More information

Integers II. CSE 351 Autumn Instructor: Justin Hsia

Integers II. CSE 351 Autumn Instructor: Justin Hsia Integers II CSE 351 Autumn 2017 Instructor: Justin Hsia Teaching Assistants: Lucas Wotton Michael Zhang Parker DeWilde Ryan Wong Sam Gehman Sam Wolfson Savanna Yee Vinny Palaniappan http://xkcd.com/557/

More information

211: Computer Architecture Summer 2016

211: Computer Architecture Summer 2016 211: Computer Architecture Summer 2016 Liu Liu Topic: C Programming Data Representation I/O: - (example) cprintf.c Memory: - memory address - stack / heap / constant space - basic data layout Pointer:

More information

CISC 3130 Data Structures Fall 2018

CISC 3130 Data Structures Fall 2018 CISC 3130 Data Structures Fall 2018 Instructor: Ari Mermelstein Email address for questions: mermelstein AT sci DOT brooklyn DOT cuny DOT edu Email address for homework submissions: mermelstein DOT homework

More information

THE C STANDARD LIBRARY & MAKING YOUR OWN LIBRARY. ISA 563: Fundamentals of Systems Programming

THE C STANDARD LIBRARY & MAKING YOUR OWN LIBRARY. ISA 563: Fundamentals of Systems Programming THE C STANDARD LIBRARY & MAKING YOUR OWN LIBRARY ISA 563: Fundamentals of Systems Programming Announcements Homework 2 posted Homework 1 due in two weeks Typo on HW1 (definition of Fib. Sequence incorrect)

More information

Variables and Data Representation

Variables and Data Representation You will recall that a computer program is a set of instructions that tell a computer how to transform a given set of input into a specific output. Any program, procedural, event driven or object oriented

More information

Lecture 6. COMP1006/1406 (the OOP course) Summer M. Jason Hinek Carleton University

Lecture 6. COMP1006/1406 (the OOP course) Summer M. Jason Hinek Carleton University Lecture 6 COMP1006/1406 (the OOP course) Summer 2014 M. Jason Hinek Carleton University today s agenda assignments A1,A2,A3 are all marked A4 marking just started A5 is due Friday, A6 is due Monday a quick

More information

Memory Allocation II. CSE 351 Autumn Instructor: Justin Hsia

Memory Allocation II. CSE 351 Autumn Instructor: Justin Hsia Memory Allocation II CSE 351 Autumn 2016 Instructor: Justin Hsia Teaching Assistants: Chris Ma Hunter Zahn John Kaltenbach Kevin Bi Sachin Mehta Suraj Bhat Thomas Neuman Waylon Huang Xi Liu Yufang Sun

More information

Slide Set 2. for ENCM 335 in Fall Steve Norman, PhD, PEng

Slide Set 2. for ENCM 335 in Fall Steve Norman, PhD, PEng Slide Set 2 for ENCM 335 in Fall 2018 Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary September 2018 ENCM 335 Fall 2018 Slide Set 2 slide

More information

Math 2280: Introduction to Differential Equations- Syllabus

Math 2280: Introduction to Differential Equations- Syllabus Math 2280: Introduction to Differential Equations- Syllabus University of Utah Spring 2013 1 Basic Information Instructor - Patrick Dylan Zwick Email - zwick@math.utah.edu Phone - 801-651-8768 Office Hour

More information

Carnegie Mellon. Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition

Carnegie Mellon. Bryant and O Hallaron, Computer Systems: A Programmer s Perspective, Third Edition Carnegie Mellon 1 Bits, Bytes and Integers Part 1 15-213/18-213/15-513: Introduction to Computer Systems 2 nd Lecture, Aug. 31, 2017 Today s Instructor: Randy Bryant 2 Announcements Recitations are on

More information

22c:111 Programming Language Concepts. Fall Types I

22c:111 Programming Language Concepts. Fall Types I 22c:111 Programming Language Concepts Fall 2008 Types I Copyright 2007-08, The McGraw-Hill Company and Cesare Tinelli. These notes were originally developed by Allen Tucker, Robert Noonan and modified

More information