# Week 06 Notes for CST8281 - Fall 2011

Fall 2011 - September to December 2011 - Updated 2011-10-19 06:32 EDT

# 1 Midterm Test #1 - 15%Index

• In class on Friday, October 14. Short answer and multiple choice.
• For full mark credit, read the Test Instructions for important directions on how to enter your answers on the mark-sense forms.
• Calculators are not permitted during the first midterm test. You will benefit from knowing the powers of two from 2^(-4) to 2^16 and the decimal and binary values of the hexadecimal digits from zero to fifteen. Of course you can work them out; however, having at least some of them memorized will make things go faster for you on the test. (Remember that hexadecimal “A” = decimal 10 = binary 1010.)

# 2 Lecture Notes for This WeekIndex

## 2.2 From Blackboard Course DocumentsIndex

These documents have restricted distribution and cannot be put on the Course Home Page.

• 02.ppt - Data Representation
• Character encoding: ASCII, Unicode, Line Endings
• 06.ppt - Memory
• only read memory speeds on slide 7 this week
• omit the rest of this slide set for this week

## 2.4 From the Classroom Whiteboard/ChalkboardIndex

• Your in-class notes go here.

### 2.4.1 Character EncodingIndex

• Character codes: ASCII, extended ASCII, EBCDIC, Unicode, UTF-8
• ASCII Control Characters (unprintable)
• line ends for text files on Unix/Mac/Windows
• compare ASCII & EBCDIC for sort order and common printable characters
• ASCII puts ‘A’ before ‘a’; EBCDIC does the reverse
• tabs vs. spaces
• know the Seven Famous ASCII Characters
• 0D 0A 20 30 41 61 7F
• do not memorize any EBCDIC
• how to print the decimal value of 00001111(2) on the screen in ASCII?
• decimal value is 15: send 31h and 35h (“1” and “5”)
• Problems with all the 8-bit extended-ASCII character sets
• can’t have Latin1 French and Latin2 Polish in the same text file: why?
• same as ASCII, no endian-ness, multi-byte, full Unicode, may require more bytes than Unicode
• Fonts vs. Character codes
• codes only say what letter, not what it looks like
• Why can’t French (Latin1) and Polish (Latin2) exist in the same text file?
• same problem for all the 8-bit extended-ASCII character sets
• Memory speeds (latencies) (06.ppt #7)
• 1ns-2ns - registers
• 3ns-10ns - Level 1 Cache
• 25ns-50ns - Level 2 Cache
• 30ns-90ns - main memory
• 5ms-20ms - fixed hard disk
• Source: 06.ppt slide 7 (under [Blackboard] Course Content - Slides)
``````Author:
| Ian! D. Allen  -  idallen@idallen.ca  -  Ottawa, Ontario, Canada