New User Special Price Expires in

Let's log you in.

Sign in with Facebook


Don't have a StudySoup account? Create one here!


Create a StudySoup account

Be part of our community, it's free to join!

Sign up with Facebook


Create your account
By creating an account you agree to StudySoup's terms and conditions and privacy policy

Already have a StudySoup account? Login here

Data Organization

by: Trent Dare

Data Organization CS 241L

Trent Dare
GPA 3.76

Joel Castellanos

Almost Ready


These notes were just uploaded, and will be ready to view shortly.

Purchase these notes here, or revisit this page.

Either way, we'll remind you when they're ready :)

Preview These Notes for FREE

Get a free preview of these Notes, just enter your email below.

Unlock Preview
Unlock Preview

Preview these materials now for free

Why put in your email? Get access to more of this material and other relevant free materials for your school

View Preview

About this Document

Joel Castellanos
Class Notes
25 ?




Popular in Course

Popular in ComputerScienence

This 17 page Class Notes was uploaded by Trent Dare on Wednesday September 23, 2015. The Class Notes belongs to CS 241L at University of New Mexico taught by Joel Castellanos in Fall. Since its upload, it has received 21 views. For similar materials see /class/212203/cs-241l-university-of-new-mexico in ComputerScienence at University of New Mexico.


Reviews for Data Organization


Report this Material


What is Karma?


Karma is the currency of StudySoup.

You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 09/23/15
Welcome to CS 241 Data Organization using C Instructor Joel Castellanos email 39oelunmedu Web ht tQcsunmedu39oe Office Farris Engineering Center FEC room 32 Lab Instructor Dongye Meng email dymengcsunmedu 282009 Course Resources SECON D EDITION V PROGRAMMIN LANGUAGE BRIAN W KERNIGHAN DENNIS M RITCHIE Class website httpcs unm ed u39oelc5241 Syllabus Projects Lecture Notes Supplemental readings WebCT Assignment Dropbox Assignment discussions blogs Grades Course Description An introduction to the C Programming language for students who already have solid skills in applying basic programming techniques Loops Conditional Control Flow Variable Arrays Memory organization of data storage and its relation to computation and efficiency Fundamental data structures such as stacks linked lists and trees Linux command line tools Make les Course Grading 50 Programming Projects approximately 12 20 Exams midterm and final 15 laboratory programming assignments attendance required 15 Lecture quizzes approximately 30 iclicker attendance required Late projectsassignments Will receive a 5 per da y penalty Working Together but do not Cheat Working together and helping one another on all projects is highly encouraged This includes discussion of project speci cation algorithms data structures and test cases Do not share code It is considered cheating to leave your code paper or electronic copies where others can find it You responsible for the security of your intellectual property Computer Access Need to work on a Linux machine Use Putty or some other SSH to inuxunmedu or osunmedu Putty is free an runs from a single executable If you are planning on becoming a CS major you can apply for a CS computer account With a CS computer account you can use the CS Linux lab on the third floor of FEC httpwwwcsunmedu UNM Computer 5 m Moz laF efox e Edit yiew History geakmarks Inuls Help GBnukmarks 39 C m in im ijWcsunmedu JNM COMPUTER snug sue Seam a SCIENCE Search News amp Events Peavle Academics Research Jobs Commie Slims Computer Facllmes James Horey Fifth in a Row as Convocation Speaker Cnang ngVourPasswam PhD Student l Fugate James Horeywiii speak at the SOE convocation to be hem 10 an a m mms39m mn December 20 2on3 This marks the Mn time in a row a computer science student has been seieeteu to be a speakerilhe others were Dennis Sunny 9am Ham Demim A a Cunen y WOTKWE oiComnmerfau mies the areas oivisua rv Gem SIarIedWthourCS Reialed iinks James Hurev 50E Convocation mtotmatmn m E g Account Melanie Moses Co Author on Science Paper quotWM 9 Making lour ome page NM cs Professor Meianie Moses was a coauthor on a paper in the OSXVPN prestigious Science magazine caiied quotEnetgy Uptake and Aiiocalion During ontogenyquot subscription required The ameie was teatuteu on UNM Today The paper shows malme 1mm young use to grow aiways stays propomonai to how rast they are growing consecutive years me Msuat am it Co he a Navy research ta Reialed iinks Meiame Moses saeace Amcie UNM Today ai ticie Semnglmsuhversimt system status anmenl orEnetgy program ubiish r Course Objectives Prepare you for CS 341 and CS351 Gain C programming experience Put together stuff from CS 251 and CS241 and you can program in C Get you programming closerto the machine See how hardware can affect how we write programs Learn to debug efficiently 1 Learn to use command line Linux Why use C CC is used widely in industry Compact language does not change unlike Java and C Used in many higher level courses like Networking Operating Systems Compilers Machine Language Often no need involve graphics usually slows things down Data Types Java primitive types C corresponding types 1 boolean 1 int 2 char 2 char 3 byte 3 char 4 short 4 shortint 5 int 5 int 6 long 6 long int 7 float 7 float 8 double 8 double 9 String 9 char Hello World include ltstdiohgt void mainvoid printfquotHello Worldnquot gcc helloWorldc aout Coding Standards include ltstdiohgt int main int i for i0 ilt100 i Since xIntDiv and xFloatDiv are only used within the for loop they are declared inside the loop float xIntDiv i2 float xFloatDiv floati20 if xIntDiv xFloatDiv printfquotd is evennquoti else printfquotd is oddnquoti return 0 Binary and Bit Operators CS 241 Data Organization using C Instructor Joel Castellanos email 39oelunmedu Web httpcsunmedul39oell Of ce Farris Engineering Center FEC room 321 Lab Instructor Dongye Meng email dymengcsunmedu ZtBZEIEIB Note Taker Needed Earn I Accessibility Resource Center andor Deaf and Hard of Hearing Services are looking for a student in this class to volunteer to provide notes I The student will be paid a stipend to take notes I The interested student should come by Accessibility Resource Center office at 2021 Mesa Vista Hall to complete the required hiring paperwork I Please bring your Lobo Card with you Powers of 2 l212 lBinarywith3bitshas 23 I 22 2x24 8 Permutations 232x2x28 0 000 02010D 24z2x2x2x2z16 I1 001 02012D 2532 l201002210 2564 l301102212E39 27128 l41002201039 28256 5 101 22012D 29512 l611022210 2m1024 l7111 22212D SanDisk 8Gigabit Flash Memory Chip How many bytes of memory does this chip tore ASCII Byte I With ASCII Character Codes one character takes 1 byte to encode I One byte 8 bits with 28 256 Permutations 00000000 00000001 00000010 47 I 65 A 232 43 o 66 B 233 49 1 67 C 234 50 2 97 a 235 51 3 98 b 241 60 lt 99 c 252 ii 61 100 d XTK oTn gt 0quot o gt Art r39 quotgt u II II j Font Monospaced typeface 39 gt Y i Line Spacing Single spacing quot Zero points after a paragraph and Zero points before each paragraph v 39 lt quotquotquot 393939 v 3939 M quot Hquotquotllllll 3939 3939 3939 39 39 Ill 39quot I 3939 l 39 l v v v 39 v v v I u y y quot Bitwise Operators I amp bitwise AND I bitwise inclusive OR I I ltlt left shift I gtgt right shift 1010 amp 0011 1010 00000100 ltlt 3 00000100 gtgt 2 0011 bitwise exclusive OR 1010 A 0011 0010 1011 1001 00100000 00000001 Shift Operator Example int main int i for i0 ilt8 i 1 ltlt i printfquotndnquot n Output 1 2 3 4 unsigned char n 5 6 7 n1 n2 n4 n8 n16 n32 n64 n128 ltlt and amp Example 1 wooqmmthII H 0 int main unsigned char a17 int i for i7 igt0 i unsigned char n 1 ltlt i if a amp n printf 1 else printfquot0quot printfquotnquot ltlt and amp Example 2 oooqmmthII H 0 int main unsigned char a22 int i for i7 igt0 i unsigned char n 1 ltlt i if a amp n printf 1 else printf 0 printfquotn Quiz 28 ltlt and amp 1 int main 2 unsigned char a37 3 int i 4 5 for i7 igt0 i 6 unsigned char n 1 ltlt i 7 if a amp n printf 1 8 else printfquot0quot 9 10 printfunu a 00110101 b 00100101 c 00101101 d 00100111 e 00110101 Quiz 29 ltlt and amp int main unsigned char a37 int i for i7 igt0 i unsigned char n 1 ltlt i if a amp n printf d quot n printfquotn oooqmmthII a 64 32 16 4 1 b 64 16 8 4 2 1 c 64 16 8 4 1 d 128 64 16 8 1 e 128 64 16 8 2 Two39s Complement Two39s Comp Decimal Two39s Comp Decimal 00000111 7 11111111 1 00000110 6 11111110 2 00000101 5 11111101 3 00000100 4 11111100 4 00000011 3 11111011 5 00000010 2 11111010 6 00000001 1 11111001 7 00000000 0 11111000 8 5 o o o o 1 o 1 Two39s Complement Flip Bits 1 1 1 1 0 1 0 Add 1 0 o o o o o 1 13 5 1 1 1 1 o 1 1 lclicker email and WebCT CS 241 Data Organization using C Instructor Joel Castellanos email ioelunmedu Web httpcsunmedu39oe Office Farris Engineering Center FEC room 321 Lab Instructor Dongye Meng email dymengcsunmedu 282009 irelicker Web Registration I httpwwwiclickercomreqistration First Name U N M kink 7 Netl D fast Name Student ID Clicker iD tttt n Pieaee tyEtein the veri cation word in the image Enter I e mail Importance of Good Subject Line I Last week I received emails with the following subjects I Which are from students in 08150 and which are spam 1 Hi 1 Hi student 2 Important Problem 2 Important Problem spam 3 Please Help 3 Please Help spam 4 Please Help 4 Please Help student 5 CS 150 Lab 2 5 CS 150 Lab 2 student 6 08150 Web CT issue 6 08150 Web CT issue student 7 Question 7 Question student 8 081 50L Registration 8 081 50L Registration student 9 Need help 9 Need help student 10 Grade 10 Grade spam 11 ltblankgt 11 ltblankgt student 12 ltblankgt 12 ltblankgt spam e mail body Give Context I quotProfessor I registered forthe class on Jan 22 Why am not registered forWebCT Please help with this problem Thanksquot I What class and what section I During spring 2009 I teach 9 sections of CS 150 2 sections 08351 and a section of CS 241 All use WebCT I In LoboWeb only the roster for a single section can be viewed at a time email body Necessity of Context I Subject English Credit I Body Joel I was wondering if it was possible to ll the English core requirement with English 221 Creative Writing in place of English 219 or 220 I39ve had some scheduling issues with those classes Thanks Scott I Reply Sorry Scott but I think you have the wrong Joel I teach computer science email Necessity of Context part2 I The reply to the reply Joel Sorry for the confusion I talked to Lynne about it and she said you39re on the CS Undergrad Curriculum Committee and might knowthe answer Do you know who I might talkto about that Thanks Scott Notes on email Subjects Enghsn Cvemt was 3 Emma sumac m seem Tu mm m swnat me message 5 mm Emma sumem s nu uvme sendev sme eamn The sumee needsm be meamngmHume vempem perms me message 157956 mne eemem 5 nm sumemmg me vempwem 5 expected m vead an un mmemamy and nexe ewen me same a su needs e am we vempwem m nnmngme mess g Mme vevevenee 1 1m Ask yemsen Duestms emau eemams busmess eemem ma may need m be avcmved and Me vewewed byme vempwem s sueeessm UNM Webmail e 10 Ci amp m cnmnnucnmm 52mm 0 g MamboxeslAanNexd En cum n unmso Qmaoxmmc 55 0 E De e n From


Buy Material

Are you sure you want to buy this material for

25 Karma

Buy Material

BOOM! Enjoy Your Free Notes!

We've added these Notes to your profile, click here to view them now.


You're already Subscribed!

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

Why people love StudySoup

Jim McGreen Ohio University

"Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Allison Fischer University of Alabama

"I signed up to be an Elite Notetaker with 2 of my sorority sisters this semester. We just posted our notes weekly and were each making over $600 per month. I LOVE StudySoup!"

Bentley McCaw University of Florida

"I was shooting for a perfect 4.0 GPA this semester. Having StudySoup as a study aid was critical to helping me achieve my goal...and I nailed it!"


"Their 'Elite Notetakers' are making over $1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!

Refund Policy


All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email


StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here:

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to

Satisfaction Guarantee: If you’re not satisfied with your subscription, you can contact us for further help. Contact must be made within 3 business days of your subscription purchase and your refund request will be subject for review.

Please Note: Refunds can never be provided more than 30 days after the initial purchase date regardless of your activity on the site.