Slide design: Dr. Mark L. Hornick

Slides:



Advertisements
Similar presentations
CPSC 441: Checksum1 Instructor: Carey Williamson Office: ICT Class Location: MFH 164 Lectures:
Advertisements

CIS 234: Character Codes Dr. Ralph D. Westfall April, 2011.
Homework Reading –Finish K&R Chapter 1 (if not done yet) –Start K&R Chapter 2 for next time. Programming Assignments –DON’T USE and string library functions,
Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert.
Data Representation Prepared by Dr P Marais (Modified by D Burford)
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
1 Introduction Chapter 1 n What is Assembly Language? n Data Representation.
AP: Discuss with a shoulder partner these questions. EQ Question: 1. What does the computer understand? 2. How is information converted to machine language?
CS2910 Week 1, Class 3 Today Lab 1 – Additional Assignment Working Ahead Primitives in Java SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder.
SE1011 Week 2, Class 3 Today Compiling and running Another example using Scanner Compile-time and Run-time errors Review for exam SE-1011 Slide design:
SE-1021 Software Engineering II Week 8, Class 1 Return Exam Producing UML diagrams automatically in EA Poll Everywhere Files Tomorrow Week 6 HW due (if.
CS2910 Week 1, Class 2 Today Announce Prof. Michael Vieau’s S-341 6p Thurs Wk 2 Assignment for tomorrow Data Encoding, Part 1 Parsing Data Muddiest Point.
CS2910 Week 1, Class 1 Today Introductions Class/Lab Layout Safety Review - Note about Lab Safety Review Announce Prof. Michael Vieau’s S-341 6p Thurs.
Checksum Calculations
Binary Number Output To display a number in binary format, a program looks at each bit in the number and sends the ASCII equivalent of a ‘1’ (31h) or a.
CS2910 Week 2, Class 1 Today Data Encoding, Part 1 Parsing Data Python Muddiest Point Lab 2 – Bring text In Class, Thursday: Quiz Week 6, Monday: Midterm.
CS 111 – Sept. 1 Intro to data representation Binary numbers –Convert binary  decimal –Convert decimal  binary Text –ASCII and Unicode Commitment: –For.
CS2910 Week 5, Class 2 Today DNS Muddy Points More HTTP Headers Review for Midterm Exam This coming Monday: Midterm Exam SE-2811 Slide design: Dr. Mark.
CS2910 Week 2, Class 1 Today Return Lab 1 Muddiest Points Quiz Parsing Data in Python SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors:
SE1011 Week 3, Class 2 Today Sit down by someone you don't know Learn their name Find out who came farther to get to MSOE at the start of the quarter Designing.
CS2852 Week 7, Class 1 Today Binary Search Tree Implementing add Implementing find Return Quiz 4 (second attempt) Both sections are graded SE-2811 Slide.
CS2852 Week 6, Class 2 Today Class exercise: Implementing a recursive method Binary Search Trees Tomorrow: Quiz at start of lab Implementing a recursive.
CS2910 Week 4, Class 1 Today Encoding in Python – Review Quiz – Encoding in Python Introduction to HTTP SE-2811 Slide design: Dr. Mark L. Hornick Content:
CS2910 Week 7, Class 2 Today Quiz on encodings IMAP Encoding "Internet Messages" Tomorrow Office hour cancelled Monday Quiz on IMAP SE-2811 Slide design:
Week 7, Class 1: The Command Pattern (cont.) Get Ready for Poll Everywhere Labs 2 & 3 returned Lab 7 due this evening at 11pm Quiz tomorrow at start of.
CS2910 Week 4, Class 2 Today Sit by someone you have not yet worked with this quarter. Learn his/her name if unknown. Turn on your laptop and start Wireshark.
Chapter 1 Representing Data in a Computer. 1.1 Binary and Hexadecimal Numbers.
CS2910 Week 3, Class 1 Today What is a protocol? Using TCP in Python Defining methods in Python Long procedure design SE-2811 Slide design: Dr. Mark L.
CS2910 Week 8, Class 2 Today Return Quiz Look at Schedule TCP implementation! Week 8, Monday Quiz on SMTP May include some questions requiring you to interpret.
CS2910 Week 7, Class 1 Today Capturing SMTP with Thunderbird Tomorrow Extra office hour at 11 am (right after lab) Friday Office hour cancelled SE-2811.
CS2910 Week 5, Class 1 Today Sit by someone you have not yet worked with Turn on your laptop and start Wireshark. DNS Next week Monday: Midterm Exam SE-2811.
CS 125 Lecture 3 Martin van Bommel. Overflow In 16-bit two’s complement, what happens if we add =
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
Week 6, Class 3: Composite Swing composites File composites Computer composites SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors:
Base 16 (hexadecimal) Uses the decimal digits and the first letters of the alphabet to encode 4 binary bits (16=2 4 ) abcdef or ABCDEF.
CS2910 Week 6, Lab Today Dictionaries in Python SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
Number Systems Decimal Can you write 12,045 in expanded form? Base? Allowable digits for each place?
CS2911 Week 3, Class 2 Today Return Lab 3 Afternoon section: Hand out Lab 4 Checklist Review Muddiest Point Questions on Lab 4? What is a protocol? The.
CS2911 Week 4, Class 3 Today Next Class: DNS – Domain Name Service
Lec 3: Data Representation
Slide design: Dr. Mark L. Hornick
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
ENEL 111 Digital Electronics
SE-1021 Software Engineering II
CS2911 Week 6, Class 1 Today This week, Lab: Quiz at start of lab
Slide design: Dr. Mark L. Hornick
…to GCSE Level with Python Sue Sentance
Slide design: Dr. Mark L. Hornick
Net 323 D: Networks Protocols
Checksum Calculations
Help! Tell me about Computer Data!
Net 323 D: Networks Protocols
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Day 6 - Encoding and Sending Formatted Text
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
Homework Reading Programming Assignments Finish K&R Chapter 1
CS2911 Week 5, Class 3 Today Week 6, Lab: Quiz at start of lab
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
SE-1021 Software Engineering II
CISC101 Reminders Labs start this week. Meet your TA! Get help with:
Slide design: Dr. Mark L. Hornick
CS2911 Week 2, Class 3 Today Return Lab 2 and Quiz 1
CS2911 Week 3, Class 3 (And wk4-c1)
CS2911 Week 3, Lab Today Thursday Friday Review Muddiest Point Lab 3
Slide design: Dr. Mark L. Hornick
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
SE-1011 Slide design: Dr. Mark L. Hornick Instructor: Dr. Yoder
Slide design: Dr. Mark L. Hornick
CS2911 Week 5, Class 3 Today Next Class: DNS – Domain Name Service
X-Plane Commands and Datarefs TCP vs. UDP
Presentation transcript:

Slide design: Dr. Mark L. Hornick CS2911 20 November 2018 CS2911 Week 1, Lab Today Safety Review Binary encodings Muddiest Point Lab 1 starts! Wednesday Introductions Syllabus print 1,12,13,16-19,22-26 SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder Dr. Josiah Yoder

Safety Review Take notes CS2911 20 November 2018 Dr. Josiah Yoder SE-2811 Dr.Yoder Dr. Josiah Yoder

Binary Encodings You can store anything as 1's and 0's CS2911 20 November 2018 Binary Encodings You can store anything as 1's and 0's Exercise: Brainstorm the types of things that you might want to send over the internet SE-2811 Dr.Yoder Dr. Josiah Yoder

How do we send these things over the internet? CS2911 20 November 2018 How do we send these things over the internet? You may need a few sheets of paper to hold your notes on this First page may be best in landscape SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 What's a byte? A byte is 8 bits. So 100010 can be written with two bytes: 0000 0011 1110 1000 How do you write this in hexadecimal? SE-2811 Dr.Yoder Dr. Josiah Yoder

Representing characters with bytes CS2911 20 November 2018 Representing characters with bytes ‘A’ ASCII characters: 0100 0001 ‘A’ 0100 0010 ‘B’ 0110 0001 ‘a’ 0011 0000 ‘0’ 0011 0001 ‘1’ 0000 1101 ‘\r’ CR (Carriage return) 0000 1010 ‘\n’ LF (Line feed, New line) 0010 0000 ‘ ’ (Space) 0100 0001 Byte nibble Dr. Josiah Yoder

Required ASCII characters CS2910 11/20/2018 Required ASCII characters Hex code Char 0d '\r' CR 30 '0' 41 'A' 61 'a' 31 '1' 42 'B' 62 'b' 0a '\n' LF … 43 'C' 63 'c' 38 '8' 44 'D' 64 'd' 20 ' ' SP 39 '9' 45 'E' 65 'e' 17q1 added after class, "Hex code" added day of Lab 3 SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 Exercise: Suppose the ASCII characters ‘A’, CR, and LF are stored in a bytes object. Write the hexadecimal shorthand for the contents of the bytes object. Exercise: How do you write the ASCII string "Cab" in hexadecimal shorthand? SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 UDP Header Byte 1 2 3 Bit  0  1  2  3  4  5  6  7  8  9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Source port Destination port 4 32 Length Checksum Wikipedia: User Datagram Protocol SE-2811 Dr.Yoder Dr. Josiah Yoder

You are now ready to finish Lab 2! CS2911 20 November 2018 You are now ready to finish Lab 2! Overview Lab 2 – see website SE-2811 Dr.Yoder Dr. Josiah Yoder

Questions about Lab 2? What we've discussed today CS2911 20 November 2018 Questions about Lab 2? What we've discussed today Python code in lab assignment Role of UDP in network stack … SE-2811 Dr.Yoder Dr. Josiah Yoder

Slide design: Dr. Mark L. Hornick CS2911 20 November 2018 CS2911 Week 1, Class 1 Today Syllabus Introductions Lab Safety Review Binary encodings Lab 1 starts! print 1,12,13,16-19,22-26 SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder Dr. Josiah Yoder

Syllabus and Class Layout CS2911 20 November 2018 Syllabus and Class Layout http://faculty-web.msoe.edu/yoder/cs2911 Syllabus Free resources for students Lab schedule Teams of two Python Coding Standard Instructional Vocabulary for ESL students SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 Mental Health More than 25% of college students have been diagnosed or treated by a professional for a mental health condition within the past year Suicide is the 3rd leading cause of death on college campuses. 64% of young adults who are no longer in college are not attending college because of a MH related reason. Source: MSOE’s wellness center. Dr. Josiah Yoder

Introductions Find someone you don’t know and learn CS2911 20 November 2018 Introductions Find someone you don’t know and learn Their name One interesting thing they did this summer Be prepared to tell this to the rest of the class Just 2 minutes… make sure you all get a turn! SE-2811 Dr.Yoder Dr. Josiah Yoder

Questions? SE-2811 Dr.Yoder

CS2911 20 November 2018 Symbols SE-2811 Dr.Yoder Dr. Josiah Yoder

Exercise: Complete the hexadecimal column CS2911 20 November 2018 Exercise: Complete the hexadecimal column Binary Hexadecimal 0000 0001 1 0010 2 0011 0100 0101 0110 0111 Binary Hexadecimal 1000 1001 1010 1011 1100 1101 1110 1111 f Dr. Josiah Yoder

CS2911 20 November 2018 Binary Octal 000 001 1 010 2 011 3 100 4 101 5 110 6 111 7 Binary Octal Decimal 1000 10 8 1001 11 9 1010 12 1011 13 1100 14 1101 15 1110 16 1111 17 SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 What's a byte? A byte is 8 bits. Exercise: Consider the hexadecimal byte-dump e8 02 1a ff Circle the first byte in this dump Write this byte in binary SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 Exercise Exercise: What does the byte 0x62 mean if interpreted as an ASCII character? Exercise: What does the byte 0x62 mean if interpreted as a binary number? SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 Exercise Exercise: What does the byte 0x44 mean if interpreted as an ASCII character? Exercise: What does the byte 0x44 mean if interpreted as a binary number? SE-2811 Dr.Yoder Dr. Josiah Yoder

Big endian / little endian CS2911 20 November 2018 Big endian / little endian 100010 can be written with the bytes big endian: most significant byte first 0000 0011 1110 1000 (03 e8) little endian: least significant byte first 1110 1000 0000 0011 (e8 03) Network order is BIG ENDIAN (whew!) Intel machines are LITTLE ENDIAN SE-2811 Dr.Yoder Dr. Josiah Yoder

Exercise Convert the number 700 to binary CS2911 20 November 2018 Exercise Convert the number 700 to binary Write 700 in big-endian format (in binary) Convert the binary to hexadecimal shorthand Write 700 in little-endian (hexadecimal shorthand) Repeat for 443, 587 (these are ports we will use later in the quarter) SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 Exercise 1: How many values can you represent with 1 bit? 2? 3? 4? 5? 6? 7? 8? 9? 10? n bits? Exercise 2: How many bits can you represent with a single decimal digit (0-9)? SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 https://www.polleverywhere.com/free_text_polls/zIp2tH2IVWjXv4H SE-2811 Dr. Josiah Yoder Dr. Josiah Yoder

CS2911 20 November 2018 Exercise Exercise: What does the byte 0x44 mean if interpreted as an ASCII character? Exercise: What does the byte 0x44 mean if interpreted as a binary number? SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 Binary Octal 000 001 1 010 2 011 3 100 4 101 5 110 6 111 7 Binary Octal unused 8 9 Dr. Josiah Yoder

Big endian / little endian CS2911 20 November 2018 Big endian / little endian 100010 can be written with the bytes big endian: most significant byte first 0000 0011 1110 1000 little endian: least significant byte first 1110 1000 0000 0011 Ex: What do these look like in hexadecimal? Network order is BIG ENDIAN (whew!) Intel machines are LITTLE ENDIAN SE-2811 Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 Exercise 1: How many values can you represent with 1 bit? 2? 3? 4? 5? 6? 7? 8? 9? 10? n bits? Exercise 2: How many bits can you represent with a single decimal digit (0-9)? SE-2811 Dr.Yoder Dr. Josiah Yoder

Wireshark Demo See Wireshark CS2911 20 November 2018 Dr. Josiah Yoder Dr.Yoder Dr. Josiah Yoder

CS2911 20 November 2018 Acknowledgement This course is based on the text Computer Networking: A Top Down Approach 7th edition Jim Kurose, Keith Ross Addison-Wesley Book image added later SE-2811 Dr. Josiah Yoder Dr. Josiah Yoder