number representation, data types and elementary programming shirley moore cs 1401 february 5-7,...
TRANSCRIPT
![Page 1: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/1.jpg)
Number Representation, Data Typesand Elementary Programming
Shirley MooreCS 1401
February 5-7, 2013
![Page 2: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/2.jpg)
AgendaFeb 5• Final syllabus• Answers to questions about the course• Followup on multicore• Followup on logic gates/circuits• Finite data representation• Discover/invent how to represent negative integers• Assignments for next classFeb 7• Announcements (BlackBoard, Feb 12 Seminar, today’s lab, Exam 1)• Binary Homework• Overflow• Data types• Dr. Java interactive window• Assignments for next class• Quiz 2
![Page 3: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/3.jpg)
Questions about the course from Qualtrics Survey
• Will this course help prepare me for future classes in Computer Science?
• Are we going to survey every detail of Java or are we going to have general knowledge of it?
• How in depth will the course get? By the end of the course, how proficient will I be at computer programming?
• Will we be exploring other programming languages or just Java?• Will there be a review for the test and what is the testing
format?• Can I get a work-study job in these courses helping Tas or the
professors?
![Page 4: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/4.jpg)
Understanding Multicore
• http://blog.dhananjaynene.com/2008/11/multicore-for-project-managers-and-junior-developers/
![Page 5: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/5.jpg)
Logic Gates and Circuits
• Six basic logic gates• Trace circuit operation
![Page 6: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/6.jpg)
Data Representation
• What can you represent using n bits?• How can we represent negative integers?• How does the processor know how to
interpret a given bit pattern?
![Page 7: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/7.jpg)
Assignments for Thursday
• Redo questions 7 and 8 on quiz 1 (if you didn’t already get full credit)
• Binary and circuits homework (come prepared to do problems on board)
• Read Chapter 2, sections 2.1-2.8.– Be sure you can answer check-up questions– Write down any questions you have
• Quiz 2 on Thursday– May include lecture/lab/reading material
![Page 8: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/8.jpg)
Overflow
• Overflow examples• How can you detect when overflow occurs?– When doing addition by hand?– By adding a single gate to your adder/subtractor?
• Ariane 5 explosion– http://www.youtube.com/watch?v=kYUrqdUyEpI
![Page 9: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/9.jpg)
Data Type
• The data type for a variable indicates – size of the data – how to interpret the bit pattern
• Basic data types in Java– byte (8-bit integer) – short (16-bit integer)– int (32-bit integer)– long (64-bit integer)– float (32-bit real)– double (64-bit real)– char (16-bit character)
![Page 10: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/10.jpg)
Dr. Java
• Example of an Integrated Development Environment (IDE)– Enables editing, compiling, running, and
debugging a program from a Graphical User Interface (GUI)
• Dr. Java has an Interactive Window that acts as a Java interpreter.– Can develop and test program statements and
then copy and paste to editor window
![Page 11: Number Representation, Data Types and Elementary Programming Shirley Moore CS 1401 February 5-7, 2013](https://reader036.vdocuments.mx/reader036/viewer/2022083005/56649f0e5503460f94c22291/html5/thumbnails/11.jpg)
Assignments for Tuesday Feb 12
• Reflective writing on Ariane 5 reading assignment• Read Section 2.9 – 2.15– Answer Checkpoint questions– Write down any questions you have– Try programming exercises 2.2, 2.4 on p. 75
• Read Lab 3 (posted by Friday) and try to write down an algorithm to solve the problem.
• Start preparing for Exam 1 which will be Feb 14