Presentation is loading. Please wait.

Presentation is loading. Please wait.

CS 1150 – Lab #3 – Representing Numbers TA – Sanjaya Wijeratne – Web Page -

Similar presentations


Presentation on theme: "CS 1150 – Lab #3 – Representing Numbers TA – Sanjaya Wijeratne – Web Page -"— Presentation transcript:

1 CS 1150 – Lab #3 – Representing Numbers TA – Sanjaya Wijeratne E-mail – wijeratne.2@wright.eduwijeratne.2@wright.edu Web Page - http://knoesis.org/researchers/sanjaya/http://knoesis.org/researchers/sanjaya/

2 TA Labs, Office Hours Laboratory Polices Lab Hours 2:30 PM - 4:20 PM, Monday and Friday at Room 320 - Oelman Hall TA Office Hours 4:40 PM - 5:40 PM, Monday and Friday at Room 316 - Russ Engineer Center By appointment – Please email to wijeratne.2@wright.eduwijeratne.2@wright.edu Refer to CS 1150 Course Syllabus for Class and Laboratory Policies Zero tolerance policy for Academic Misconduct – All parties will get 0% marks CS 1150 - Lab 2 - Exploring Number Systems2

3 Lab # 3 Overview Learn How Negative Numbers are Represented in Computers Sign-Magnitude and Two’s Complement Representations Learn How Colors and Text are Represented in Computers Complete Section 3A – Ex 1, Section 3B – Ex 1 and Ex 3 Extra Credit - Section 3A – Ex 2, Section 3B – Ex 2, Section 3C – Ex 1 Lab #3 Due Date - Sep 22, 2013 11:55 PM CS 1150 - Lab 2 - Exploring Number Systems3

4 How to Submit Lab # 3 Hard copy (Preferred) When you complete, hand it over to me Pilot Go to Pilot Course Page and Use Dropbox Submission Link to upload your files My Mailbox at CS Department Go to CS Department Front Desk and ask them to put your assignment into my mailbox – Please write my name in your assignment (TA – CS 1150 – Sanjaya Wijeratne) CS 1150 - Lab 2 - Exploring Number Systems4

5 Sign-Magnitude Representation CS 1150 - Lab 2 - Exploring Number Systems5 Sign-Magnitude Representation Sign – Ordering of the number (Positive or Negative) Value – Magnitude Source – CS 1150 Slides for Data Representation by Karen Mayer

6 Two’s Complement CS 1150 - Lab 2 - Exploring Number Systems6 MSB Represents the Sign Negative – MSB is 1 Convert numbers to Two’s Complement Invert the bits and add 1 Source – CS 1150 Slides for Data Representation by Karen Mayer

7 Lab #3 – Section 3A CS 1150 - Lab 2 - Exploring Number Systems7 Run Negative Binary Numbers Applet

8 Lab #3 – Section 3A Ex 1 Question 9 CS 1150 - Lab 2 - Exploring Number Systems8

9 Representing Text CS 1150 - Lab 2 - Exploring Number Systems9 ASCII Character Set 7 bits to represent a character + 1 check bit First 32 ASCII characters are special purposes – Eg Tab, Return Unicode Character Set 16 bits to represent a character Can represent every character in every language in the world 8 Bits = 1 Byte

10 Lab #3 – Section 3B Ex 1 Question 6 CS 1150 - Lab 2 - Exploring Number Systems10 Think about the relationship you found between upper case letters and lower case letters in question 5 Think you have to write an applet What is the input? What is the output? Now answer the question 6

11 Extra Credit – Section 3A – Ex 2 CS 1150 - Lab 2 - Exploring Number Systems11

12 Extra Credit –Section 3A Ex 2 Question 7 CS 1150 - Lab 2 - Exploring Number Systems12 Try to find a relationship among numbers in the table Eg – Whether one number is a multiplication of another Use the relationship you see to answer part III Please write the answer and relationship you identify both for part III

13 Additional Help CS 1150 - Lab 2 - Exploring Number Systems13 Chapter 3 Slides by Ms. Karen Meyer discussed in Class Chapter 3 of Course Text Book – Data Representation

14 Questions ? If you have questions, please raise your hand, Colin or myself will come to help you CS 1150 - Lab 2 - Exploring Number Systems14


Download ppt "CS 1150 – Lab #3 – Representing Numbers TA – Sanjaya Wijeratne – Web Page -"

Similar presentations


Ads by Google