Working with text ASCII and UNICODE
From the CAS curriculum KEY STAGE 3 Representations of: Unsigned integers Text. [Key point: each character is represented by a bit pattern. Meaning is by convention only. Examples: Morse code, ASCII.] Sounds [both involving analogue to digital conversion, e.g. WAV, and free of such conversion, e.g. MIDI] Pictures [e.g. bitmap] and video. Many different things may share the same representation, or “the meaning of a bit pattern is in the eye of the beholder” *e.g. the same bits could be interpreted as a BMP file or a spreadsheet file; an 8-bit value could be interpreted as a character or as a number].
Today’s session 5:00 – 6:00 Computers and text 6.00 – 7.00 Programming in Scratch
Encoding and decoding See Boston University CS101 presentation – go to first lecture (whole series is good!) Boston University CS101 presentation An excellent introduction to Computer Science and what a bit pattern might mean
Text?
Sound?
Image?
Text Data Are sets of characters Characters could be letters, digits, symbols (£, &), Telephone numbers are text data (should be encoded as text)
Morse Code Morse code is one kind of coding system for text Try these activities: code.php Lki3jxNLVCI /keeping-secrets/codes-and-code- breaking.aspx
ASCII code – another coding system for text. Used by computers space A a ! B b " C c £ D d $ E e % F f & G g ' H h ( I i ) J j * : K k Note how the codes for A.. Z, a.. Z and are sequences
ASCII & Unicode ASCII uses 7 bits to encode characters Extended ASCII uses 8 bits Unicode uses 8, 16 or 32 bits and is usually shown in Hex. 16 bits is the most common system used.
ASCII codes are a subset of Unicode Unicode uses the same code for A
Explore the ASCII codes using the Insert Symbol option in MS Word What different alphabets are there? Note the character code can’t be represented in 1 byte
Now try… James Robinson’s Binary Messaging System James Robinson’s Binary Messaging System Can you create your name in ASCII? Good for binary practice as well as understanding ASCII coding