AP CSP: Encoding and Sending Formatted Text

Slides:



Advertisements
Similar presentations
The Binary Numbering Systems
Advertisements

 Caesar used to encrypt his messages using a very simple algorithm, which could be easily decrypted if you know the key.  He would take each letter.
Using Binary Coding Information Remember  Bit = 0 or 1, Binary Digit  Byte = the number of bits used to represent letters, numbers and special characters.
Is ASCII the only way? For computers to do anything (besides sit on a desk and collect dust) they need two things: 1. PROGRAMS 2. DATA A program is a.
Chapter 8_2 Bits and the "Why" of Bytes: Representing Information Digitally.
ASCII and Unicode. ASCII Inside a computer, EVERYTHING is a number – that includes music, sound, and text. In the early days of computers, every manufacturer.
CODING SYSTEMS CODING SYSTEMS CODING SYSTEMS. CHARACTERS CHARACTERS digits: 0 – 9 (numeric characters) letters: alphabetic characters punctuation marks:
Decisions in Python Comparing Strings – ASCII History.
Data vs. Information OUTPUTOUTPUT Information Data PROCESSPROCESS INPUTINPUT There are 10 types of people in this world those who read binary and those.
Binary Numbers and ASCII and EDCDIC Mrs. Cueni. Data Representation  Human speech is analog because it uses continuous signals (waves) that vary in strength.
Using Html Basics, Text and Links. Objectives  Develop a web page using HTML codes according to specifications and verify that it works prior to submitting.
STATISTIC & INFORMATION THEORY (CSNB134) MODULE 8 INTRODUCTION TO INFORMATION THEORY.
CS151 Introduction to Digital Design
Agenda Character representation Numerical Conversions ASCII EBCDIC
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Representing Characters in a Computer System Representation of Data in Computer Systems.
Information Coding Schemes Group Member : Yvonne Tiffany Jurifah bt Junaidi Clara Jane George.
Lesson 6 Binary Understand what Binary Code means and apply this knowledge Understand how data is represented using bit systems and be able to change decimal.
Understanding Computers
Understanding Binary Understanding Computers. Understanding Computers L3 – Understanding Binary Learning Objectives All will Understand why all data is.
1.4 Representation of data in computer systems Character.
Lecture Coding Schemes. Representing Data English language uses 26 symbols to represent an idea Different sets of bit patterns have been designed to represent.
Nat 4/5 Computing Science Data Representation Lesson 3: Storing Text
DATA REPRESENTATION - TEXT
Day 6 - Encoding and Sending Formatted Text
AP CSP: Sending Numbers
Binary Representation in Text
Binary Representation in Text
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
AP CSP: Creating Functions & Top-Down Design
AP CSP: The Need for Addressing
Understanding binary Understanding Computers.
Unit 2.6 Data Representation Lesson 2 ‒ Characters
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
NUMBER SYSTEMS.
Arithmetic Shifts and Character Representation
Lesson 1-10 AP Computer Science Principles
AP CSP: Sending Binary Messages with the Internet Simulator
ENCODING AND SENDING FORMATTED TEXT
Binary 1 Basic conversions.
HTTP AND ABSTRACTION ON THE INTERNET
Binary Numbers and ASCII and EDCDIC
AP CSP: Encode an Experience
Day 6 - Encoding and Sending Formatted Text
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Data Transfer ASCII FILES.
What are Computers? G Use this tutorial alongside the numbers coded in your workbook and answer the related questions in each section.
Information Support and Services
UNIT 1 – LESSON 6 SENDING NUMBERS.
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
Representing Information as bit patterns
Phnom Penh International University (PPIU)
Data Encoding Characters.
Sending Bits on the Internet
TOPICS Information Representation Characters and Images
Representing Characters
Ch2: Data Representation
Digital Representation
Presenting information as bit patterns
COMS 161 Introduction to Computing
INFO/CSE 100, Spring 2005 Fluency in Information Technology
Chapter 2 Data Representation.
COMS 161 Introduction to Computing
Encoding and Sending Formatted Text
Day 6 - Encoding and Sending Formatted Text
Learning Intention I will learn how computers store text.
C Programming Language
Presentation transcript:

AP CSP: Encoding and Sending Formatted Text September 7, 2016

Introduction: Last class we used binary data(bits) to send information to our partners indicating coordinates on a grid. We basically encoded numbers using binary. Today we are going to take it a step further and look how we can encode text with a binary representation. If we know how to encode text in binary then we can encode all types of information. We send text data through the internet all the time, which means text is represented as bits. If it were up to you, how would you encode text in binary? Write down your ideas in your journal? You don’t need to specify every detail of the scheme, you just need to outline the structure

Questions to Consider: How many bits does your encoding scheme require? For example, how many bits would you need to say “hello”? Did you account for anything besides the letters of alphabet (or whole words)?

ASCll Encoding Scheme: You just invented your own scheme for encoding text with numbers. There is also an extremely popular encoding scheme that is common place today. That encoding is called the American Standard Code for Information Interchange or ASCII (pronounced: “Ask-ee”). ASCll uses 8 bits to represent the various characters that we use to represent different types of information. ASCII codes were originally 7 bits long and so there are 128 possible values. 0-31 are “control characters” that are largely defunct and go unused; they were formerly used to control various aspects of machines and printers. 32-126 are printable characters and include the numbers 0-9, all 26 letters (both lowercase and uppercase), and many common punctuation symbols. 127 is the symbol for delete. Over time, 8 bits became a standard “chunk-size” for encoding information. ASCII made the transition to this 8-bit encoding by just adding an extra 0 to the front of the old 7-bit codes.

ASCll Pre-Activity: Using the ASCll table, translate your first name from letters to numbers. Write your name as: “Name!” (capital first letter, exclamation point at the end) Having a standardized protocol like ASCII to encode text enables us to send and receive textual information. This is very useful, but there are still instances when we will want even greater expressive power in our digital communications.

Creating your own Text Formatting Protocol: Sometimes we need to represent more then just characters when communicating information. Sometimes we need other things like: Today you will develop a protocol for sending formatted text using the internet simulator.

Guidelines and Rules: Both the text and formatting instructions must be derived from the printable ASCll character set(i.e. codes 32-126). Your protocol must encode at least: bold, italics, and underlining three different font sizes (large, medium, and small) three different font colors (red, black, blue) You will demonstrate that your protocol works by sending a message with the Internet Simulator You will send a message and the recipient must be able to faithfully draw (or produce in some fashion) the formatted text, based only on the data she received. Here’s a sample message:  Iteratively test your protocols to make sure you have not overlooked any gaps in your protocol.

Wrap-up Today all of you created a text-based code for sending formatted text. In a sense you created a coding language. HTML, Java, C++, Python, etc. all use ASCll text to encode other text or information. This is exactly the same thing you did when creating your protocol. Even though your protocol is something no one else will use, the process you went through gives a taste of inventing any kind of formal language or protocol that ultimately needs to be interpreted and processed by a computer. Most web browsers allow you to view the source code for a website. Looking at HTML we can see how they represent different texts formats and compare it with your system. If you’re interested in looking at some more HTML, go to the website below http://www.w3schools.com/html/html_intro.asp

Closing Question: Take a moment to think about the layers of encodings that allowed for formatted text to be transmitted over the Internet. Imagine someone pointed to piece of formatted text and asked: ‘Can you explain to me how this is encoded in binary?’ How would you explain it?”