Algoritmos . Conceptos Básicos

Post on 25-Dec-2015

59 views 1 download

Tags:

description

Algoritmos y programacionIntroduccionConceptos basicos

Transcript of Algoritmos . Conceptos Básicos

WEEK 1WHY COMPUTERS?

Algorithms

0. What is a Computer?Is a programmable machine

designed to sequentially and automatically carry out a secuence of aritmetic or logical aperations. The particular secuence of operations can be changed readily, allowing the computer to solve than one kind problem.

In the Beginning

ENIAC Electronic Numerical Integrator And Computer.

The first electronic digital computer developed for the U.S.

Started 1943 Programed by plugging in

cords and setting thousands of swiches.

18.000 vacuum tubes Weight 30 tons 1800 square feet 5000 additions per second It cost a fortune in

electricity to run. It was dismantled in 1955

Most people’s computer...Most people would be lost if all the computers in the world

went down at the same time.

CRT Display

Keyboard

Mouse

“The Box”CD-ROM Drive

FloppyDiskDrive

Inside “The Box”

Motherboard

CPU(Central Processing Unit)

SIMM(Single Inline Memory Module)

HDD(Hard Disk Drive)

Power Supply

Schematic Diagram of a Personal Computer...

Ports

CPU

RAM

Diskcontroller

Graphicscard

Soundcard

Networkcard

Printer

Mouse

Keyboard

Modem Monitor

Speakers

bus

Computer

Other Examples

Computing is Much, Much More...

Mobile Computing

Output Devices

Input Devices

Other Input

OCR – optical character recognitionBar code readersVoice/audio inputPunched cardsImages / objectsPointing devices

OCR

El OCR (Optical character recognition) es un software de reconocimiento de texto que saca de una imagen el texto que contiene y lo transforma en cadenas de caracteres para guardarlos en un formato que se pueda utilizar en programas de edición de texto.

Si necesitamos extraer ese texto para poder editarlo, necesitamos un programa de OCR que reconozca dicho texto y lo transforme en una cadena de caracteres (ya sea ASCII o Unicode) y posteriormente copiar esta cadena a un programa de edición para ya poder trabajar con ella, con el consiguiente ahorro de tiempo al no tener que teclear este texto.

OCR

Hello, world

Page of text

Optical scan 10110110…

Computer file

Other Input

OCR – optical character recognitionBar code readersVoice/audio inputPunched cardsImages / objectsPointing devices

Bar Codes

An automatic identification (Auto ID) technology that streamlines identification and data collection

See http://www.digital.net/barcoder/barcode.html

Código de barras

El código de barras consiste en un sistema de codificación creado a través de series de líneas y espacios paralelos de distinto grosor. Generalmente se utiliza como sistema de control ya que facilita la actividad comercial del fabricante y del distribuidor, por lo que no ofrece información al consumidor, si no datos de operaciones aplicados a identificar productos, llevar control de inventarios, carga y descarga de mercancías, disminuir tiempos de atención en ventas.

Una de las principales ventajas es que los datos almacenados en un código de barras puede ser leído de manera precisa y rápida.

Other Input

OCR – optical character recognitionBar code readersVoice/audio inputPunched cardsImages / objectsPointing devices

Voice/audio Input

Input device: microphoneAudio input is “digitized” and storedProcessed in two ways

As is (no recognition) Recognized and converted to alphanumeric data

(ASCII)

Digitize

10110010…

Other Input

OCR – optical character recognitionBar code readersVoice/audio inputPunched cardsImages / objectsPointing devices

Punched Cards

Invented by Herman Hollerith (founder of IBM)

Each card holds 80 characters

Other Input

OCR – optical character recognitionBar code readersVoice/audio inputPunched cardsImages / objectsPointing devices

Images

Typically images are pictures that are optically scanned and saved as a “bit map” or in some other format

Many formats gif, jpeg, …

Typical “Save As” Dialog

Objects

Images made of geometrically definable shapes

Offer efficiency, flexibility, small size, etc.

Other Input

OCR – optical character recognitionBar code readersVoice/audio inputPunched cardsImages / objectsPointing devices

Pointing Devices

Originally used for specifying coordinates (x, y) for graphical input

Today used as general purpose device for “graphical user interfaces” (GUIs)

“Other” Computing

Roles

Busines: Computer can tabulate bills, calculate profit and loss, and predict the future of bussines. Things can be sold and bought on line, and computer are a major part of the stock marked.

Comunication: E-mail allow instant comunication all over the world. Computers save time and give you information at your fingertips. The Internet provides a fast and easy way to research any topic.

Daily life: we operate washing machines, microwave oven and many others products using software.

We can store all information about our work, appointments schedules and list of contacts.

we need to have the knowledge about all fields of the computers

Media

There is sofware for every kind of editing audio visual composition. Special efects rely heavily on computers.

Popular special effects seen in movies include fire, explosions, rain, snow and smoke. A number of movies also showcase effects that change the look of characters like those that make a person look older, younger or monstrous or transform into another person, creature or object.

Other roles

Medical science: Computers can help with

diagnosis, and there is special software wich assists doctors during surgery.

Travel and ticketing: Computers do all the

work of plane and train reservation. It shows the data for vacant and reserved seats and also saves the record for reservation

Sports: Computers can help

referees and umpire make decisions. Also, simulation software can help and atletic improve his or her skills.

Weather: Super computers take

data from observations and give meteorologist “models” to help them predict weather.

1. Number Systems

Common Number Systems

System Base SymbolsUsed by humans?

Used in computers?

Decimal 10 0, 1, … 9 Yes No

Binary 2 0, 1 No Yes

Octal 8 0, 1, … 7 No No

Hexa-decimal

16 0, 1, … 9,A, B, … F

No No

Quantities/Counting (1 of 3)

Decimal Binary OctalHexa-

decimal

0 0 0 0

1 1 1 1

2 10 2 2

3 11 3 3

4 100 4 4

5 101 5 5

6 110 6 6

7 111 7 7

Quantities/Counting (2 of 3)

Decimal Binary OctalHexa-

decimal

8 1000 10 8

9 1001 11 9

10 1010 12 A

11 1011 13 B

12 1100 14 C

13 1101 15 D

14 1110 16 E

15 1111 17 F

Quantities/Counting (3 of 3)

Decimal Binary OctalHexa-

decimal

16 10000 20 10

17 10001 21 11

18 10010 22 12

19 10011 23 13

20 10100 24 14

21 10101 25 15

22 10110 26 16

23 10111 27 17 Etc.

Conversion Among Bases

The possibilities:

Hexadecimal

Decimal Octal

Binary

Quick Example

2510 = 110012 = 318 = 1916

Base

Decimal to Decimal (just for fun)

Hexadecimal

Decimal Octal

Binary

Next slide…

12510 => 5 x 100 = 52 x 101 = 201 x 102 = 100

125

Base

Weight

Binary to Decimal

Hexadecimal

Decimal Octal

Binary

Binary to Decimal

Technique Multiply each bit by 2n, where n is the “weight” of the

bit The weight is the position of the bit, starting from 0

on the right Add the results

Example

1010112 => 1 x 20 = 11 x 21 =

20 x 22 =

01 x 23 =

80 x 24 =

01 x 25 =

32

4310

Bit “0”

Octal to Decimal

Hexadecimal

Decimal Octal

Binary

Octal to Decimal

Technique Multiply each bit by 8n, where n is the “weight” of the

bit The weight is the position of the bit, starting from 0

on the right Add the results

Example

7248 => 4 x 80 = 42 x 81 = 167 x 82 = 448

46810

Hexadecimal to Decimal

Hexadecimal

Decimal Octal

Binary

Hexadecimal to Decimal

Technique Multiply each bit by 16n, where n is the “weight” of

the bit The weight is the position of the bit, starting from 0

on the right Add the results

Example

ABC16 => C x 160 = 12 x 1 = 12 B x 161 = 11 x 16 = 176 A x 162 = 10 x 256 = 2560

274810

Decimal to Binary

Hexadecimal

Decimal Octal

Binary

Decimal to Binary

Technique Divide by two, keep track of the remainder First remainder is bit 0 (LSB, least-significant bit) Second remainder is bit 1 Etc.

Example

12510 = ?22 125 62 12 31 02 15 12 7 12 3 12 1 12 0 1

12510 = 11111012

Octal to Binary

Hexadecimal

Decimal Octal

Binary

Octal to Binary

Technique Convert each octal digit to a 3-bit equivalent binary

representation

Example

7058 = ?2

7 0 5

111 000 101

7058 = 1110001012

Hexadecimal to Binary

Hexadecimal

Decimal Octal

Binary

Hexadecimal to Binary

Technique Convert each hexadecimal digit to a 4-bit equivalent

binary representation

Example

10AF16 = ?2

1 0 A F

0001 0000 1010 1111

10AF16 = 00010000101011112

Decimal to Octal

Hexadecimal

Decimal Octal

Binary

Decimal to Octal

Technique Divide by 8 Keep track of the remainder

Example

123410 = ?8

8 1234 154 28 19 28 2 38 0 2

123410 = 23228

Decimal to Hexadecimal

Hexadecimal

Decimal Octal

Binary

Decimal to Hexadecimal

Technique Divide by 16 Keep track of the remainder

Example

123410 = ?16

123410 = 4D216

16 1234 77 216 4 13 = D16 0 4

Binary to Octal

Hexadecimal

Decimal Octal

Binary

Binary to Octal

Technique Group bits in threes, starting on right Convert to octal digits

Example

10110101112 = ?8

1 011 010 111

1 3 2 7

10110101112 = 13278

Binary to Hexadecimal

Hexadecimal

Decimal Octal

Binary

Binary to Hexadecimal

Technique Group bits in fours, starting on right Convert to hexadecimal digits

Example

10101110112 = ?16

10 1011 1011

2 B B

10101110112 = 2BB16

Octal to Hexadecimal

Hexadecimal

Decimal Octal

Binary

Octal to Hexadecimal

Technique Use binary as an intermediary

Example

10768 = ?16

1 0 7 6

001 000 111 110

2 3 E

10768 = 23E16

Hexadecimal to Octal

Hexadecimal

Decimal Octal

Binary

Hexadecimal to Octal

Technique Use binary as an intermediary

Example

1F0C16 = ?8

1 F 0 C

0001 1111 0000 1100

1 7 4 1 4

1F0C16 = 174148

Exercise – Convert ...

Don’t use a calculator!

Decimal Binary OctalHexa-

decimal

33

1110101

703

1AF

Skip answer Answer

Exercise – Convert …

Decimal Binary OctalHexa-

decimal

33 100001 41 21

117 1110101 165 75

451 111000011 703 1C3

431 110101111 657 1AF

Answer

Common Powers (1 of 2)

Base 10Power Preface Symbol

10-12 pico p

10-9 nano n

10-6 micro

10-3 milli m

103 kilo k

106 mega M

109 giga G

1012 tera T

Value

.000000000001

.000000001

.000001

.001

1000

1000000

1000000000

1000000000000

Common Powers (2 of 2)

Base 2Power Preface Symbol

210 kilo k

220 mega M

230 Giga G

Value

1.024

1.048.576

1.073.741.824

• What is the value of “k”, “M”, and “G”?• In computing, particularly w.r.t. memory, the base-2 interpretation generally applies

Example

/ 230 =

In the lab…1. Double click on My Computer2. Right click on C:3. Click on Properties

Exercise – Free Space

Determine the “free space” on all drives on your computer

DriveFree space

Bytes GB

A:

C:

D:

E:

etc.

Review – multiplying powers

For common bases, add powers

26 210 = 216 = 65,536

or…

26 210 = 64 210 = 64k

ab ac = ab+c

Binary Addition (1 of 2)

Two 1-bit values

A B A + B0 0 00 1 11 0 11 1 10

“two”

Binary Addition (2 of 2)

Two n-bit values Add individual bits Propagate carries E.g.,

10101 21+ 11001 + 25 101110 46

11

Multiplication (1 of 3)

Decimal (just for fun)

35x 105 175 000 35 3675

Multiplication (2 of 3)

Binary, two 1-bit values

A B A B0 0 00 1 01 0 01 1 1

Multiplication (3 of 3)

Binary, two n-bit values As with decimal values E.g.,

1110 x 1011 1110 1110 0000 111010011010

Fractions

Decimal to decimal (just for fun)

3.14 => 4 x 10-2 = 0.041 x 10-1 = 0.1

3 x 100 = 3 3.14

Fractions

Binary to decimal

10.1011 => 1 x 2-4 = 0.06251 x 2-3 = 0.1250 x 2-2 = 0.251 x 2-1 = 0.50 x 20 = 0.01 x 21 = 2.0 2.6875

Fractions

Decimal to binary3.14579

.14579x 20.29158x 20.58316x 21.16632x 20.33264x 20.66528x 21.33056

etc.11.001001...

Exercise – Convert ...

Don’t use a calculator!

Decimal Binary OctalHexa-

decimal

29.8

101.1101

3.07

C.82

Skip answer Answer

Exercise – Convert …

Decimal Binary OctalHexa-

decimal

29.8 11101.110011… 35.63… 1D.CC…

5.8125 101.1101 5.64 5.D

3.109375 11.000111 3.07 3.1C

12.5078125 1100.10000010 14.404 C.82

Answer

2. Data Formats

Introduction

ExamplesReal World

Data

Computer

DataInput device

Dear Mom: Keyboard 10110010…

Digitalcamera

10110010…

Format must be appropriate

The internal representation must be appropriate for the type of processing to take place (e.g., text, images, sound)

Standards Organizations

ISO – International Standards OrganizationCSA – Canadian Standards AssociationANSI – American National Standards

InstituteIEEE – Institute for Electrical and Electronics

EngineersEtc.

Examples of Standards

Type of Data Standards

Alphanumeric ASCII, EBCDIC, Unicode

Image JPEG, GIF, PCX, TIFF

Motion picture MPEG-2, Quick Time

Sound Sound Blaster, WAV, AU

Outline graphics/fonts PostScript, TrueType, PDF

Why Standards?

Standard are “arbitrary”They exist because they are

Convenient Efficient Flexible Appropriate Etc.

Alphanumeric Data

Problem: Distinguishing between the number 123 (one hundred and twenty-three) and the characters “123” (one, two, three)

Four standards for representing letters (alpha) and numbers BCD – Binary-coded decimal ASCII – American standard code for information

interchange EBCDIC – Extended binary-coded decimal

interchange code Unicode

Next 2 slides

Standard Alphanumeric Formats

BCDASCIIEBCDICUnicode

Binary-Coded Decimal (BCD)

Four bits per digit Digit Bit pattern

0 0000

1 0001

2 0010

3 0011

4 0100

5 0101

6 0110

7 0111

8 1000

9 1001

Note: the following bit patterns are not used:

101010111100110111101111

Example

709310 = ? (in BCD)

7 0 9 3

0111 0000 1001 0011

Next 22 slides

Standard Alphanumeric Formats

BCDASCIIEBCDICUnicode

The Problem

Representing text strings, such as “Hello, world”, in a computer

Codes and Characters

Each character is coded as a byteMost common coding system is ASCII

(Pronounced ass-key)ASCII = American National Standard Code

for Information InterchangeDefined in ANSI document X3.4-1977

ASCII Features

7-bit code8th bit is unused (or used for a parity bit)27 = 128 codesTwo general types of codes:

95 are “Graphic” codes (displayable on a console) 33 are “Control” codes (control features of the console

or communications channel)

ASCII Chart

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

Most significant bit

Least significant bit

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

e.g., ‘a’ = 1100001

95 Graphic codes

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

33 Control codes

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

Alphabetic codes

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

Numeric codes

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

Punctuation, etc.

“Hello, world” Example

============

Binary010010000110010101101100011011000110111100101100001000000111011101100111011100100110110001100100

Hexadecimal48656C6C6F2C207767726C64

Decimal72

1011081081114432

119103114108100

Hello, world

============

============

Common Control Codes

CR 0D carriage returnLF 0A line feedHT 09 horizontal tabDEL 7F deleteNULL 00 null

Hexadecimal code

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

Terminology

Learn the names of the special symbols [ ] brackets { } braces ( ) parentheses @ commercial ‘at’ sign & ampersand ~ tilde

000 001 010 011 100 101 110 1110000 NULL DLE 0 @ P ` p0001 SOH DC1 ! 1 A Q a q0010 STX DC2 " 2 B R b r0011 ETX DC3 # 3 C S c s0100 EDT DC4 $ 4 D T d t0101 ENQ NAK % 5 E U e u0110 ACK SYN & 6 F V f v0111 BEL ETB ' 7 G W g w1000 BS CAN ( 8 H X h x1001 HT EM ) 9 I Y i y1010 LF SUB * : J Z j z1011 VT ESC + ; K [ k {1100 FF FS , < L \ l |1101 CR GS - = M ] m }1110 SO RS . > N ^ n ~1111 SI US / ? O _ o DEL

Escape Sequences

Extend the capability of the ASCII code setFor controlling terminals and formatting

outputDefined by ANSI in documents X3.41-1974

and X3.64-1977The escape code is ESC = 1B16

An escape sequence begins with two codes:

ESC [ 1B1

6

5B1

6

Next 1 slides

Standard Alphanumeric Formats

BCDASCIIEBCDICUnicode

EBCDIC

Extended BCD Interchange Code (pronounced ebb’-se-dick)

8-bit codeDeveloped by IBMRarely used todayIBM mainframes only

Next 2 slides

Standard Alphanumeric Formats

BCDASCIIEBCDICUnicode

Unicode

16-bit standardDeveloped by a consortiaIntended to supercede older 7- and 8-bit

codes

Unicode provides a unique number for every character,

no matter what the platform,no matter what the program,no matter what the language.

Unicode Version 2.1

1998Improves on version 2.0 Includes the Euro sign (20AC16 = ) From the standard:

…contains 38,887 distinct coded characters derived from the supported scripts. These characters cover the principal written languages of the Americas, Europe, the Middle East, Africa, India, Asia, and Pacifica.

http://www.unicode.org

Keyboard Input

Key (“scan”) codes are converted to ASCIIASCII code sent to host computerReceived by the host as a “stream” of dataStored in bufferProcessedEtc.

Shift Key

inhibits bit 5 in the ASCII code

Key(s)ASCII code

6 5 4 3 2 1 0 Character

1 1 0 0 0 0 1

1 0 0 0 0 0 1

a

A

a

aShift

Control Key

inhibits bits 5 & 6 in the ASCII code

Key(s)ASCII code

6 5 4 3 2 1 0 Character

1 1 0 0 0 1 1

0 0 0 0 0 1 1

c

ETX

c

cCtrl

Controlcode

Thank you

Tomado de Universidad de Nueva York

http://www.cse.yorku.ca/~mack/1011/