ascii - Can You Compute?

advertisement
HOW DOES A COMPUTER KNOW
WHAT TEXT TO DISPLAY ON A
SCREEN?
HOW MIGHT THIS BE DONE?
YOU ARE LEARNING..
• EXPLAIN THE USE OF BINARY CODES TO REPRESENT
CHARACTERS
• KNOW THE TERM CHARACTER SET
• DESCRIBE WITH EXAMPLES (FOR EXAMPLE ASCII AND
UNICODE) THE RELATIONSHIP BETWEEN THE NUMBER
OF BITS
HOW MANY BITS WOULD YOU
NEED TO CODE AN ENTIRE
KEYBOARD?
• HOW MANY KEYS ARE THERE ON A NORMAL KEYBOARD?
THE CODE USED TO
TRANSLATE LANGUAGE
BETWEEN COMPUTERS AND
PEOPLE IS CALLED
ASCII:
• IT IS PRONOUNCED ‘ASKEE’
ASCII IS SHORT FOR:
AMERICAN STANDARD CODE
FOR INFORMATION
INTERCHANGE
ASCII:
IS THE STANDARD CODE USED BY COMPUTERS
EVERYWHERE TO REPRESENT THE THINGS YOU CAN
TYPE USING THE KEYBOARD
ASCII CONVERSION TABLE:
IN ASCII THE WORD "CAT"
WOULD BE:
• 1000011
1100001 1110100
YOU TRY
ON A BLANK SHEET OF PAPER, WRITE YOUR NAME
USING THE ASCII CHART, LOOKUP THE BINARY VALUES
FOR EACH LETTER AND WRITE IT DOWN IN A SERIES
DON’T FORGET THE SPACES BETWEEN YOUR LETTERS
GIVE YOUR ENCODED NAME TO A FRIEND
HAVE THEM DECODE THE CODE
HOW MANY BITS ARE
REQUIRED TO STORE ASCII
CODES?
• 8 BITS CAN STORE 256 CHARACTERS
• ENGLISH KEYBOARD USES 128 CHARACTERS WHAT ARE
THE OTHERS CODES USED FOR?
EXTENDED ASCII:
LANGUAGES SUCH AS
GERMAN, FRENCH, FINNISH, IRISH, ICELANDIC,
TAKE ADVANTAGE OF THE OTHER 128 SPACES TO INCLUDE THEIR
OWN SPECIAL CHARACTERS.
E.G. THE GERMAN UMLAUT Ü IS 11011100
THE TERM CHARACTER
SET IS USED TO DESCRIBE A
DIGITAL REPRESENTATION OF
TEXT:
• ASCII IS THE MOST WIDELY USED CHARACTER SET
• THE ENTIRE COLLECTION OF CHARACTERS AVAILABLE IN A
SYSTEM SUCH AS ASCII IS CALLED A CHARACTER SET.
OTHER CHARACTER SETS IN
COMMON USE ARE:
EXTENDED ASCII (8 BITS – 256 CHARACTERS)
UTF-8 (8 BITS – 256 CHARACTERS)
UNICODE (16 BITS – 65536 CHARACTERS)
ASCII
• ASCII (AMERICAN STANDARD CODE FOR INFORMATION
INTERCHANGE) IS THE MOST COMMON FORMAT FOR TEXT FILES
IN COMPUTERS AND ON THE INTERNET.
• IN AN ASCII FILE, EACH ALPHABETIC, NUMERIC, OR SPECIAL
CHARACTER IS REPRESENTED WITH A BINARY NUMBER (A
STRING OF 0S OR 1S).
• 128 CHARACTERS ARE DEFINED.
CREATE AN ALTERNATIVE XMAS
CARD
• USE YOUR KNOWLEDGE OF BINARY AND ASCII TO CONVERT AND
WRITE A CHRISTMAS MESSAGE ON AN ALTERNATIVE
CHRISTMAS CARD
• USE THE ‘ASCII’ CONVERTOR FOR THE TEXT
• USE THE HEXADECIMAL COLOUR PALLETE TO CODE A 16 X 16
GRAPHIC FOR THE FRONT OF THE CARD
THE COLOUR PALETTE
Palette
Code
Colour
Name
R
G
B
Hex
0000
Black
0
0
0
000000
0001
Maroon
128
0
0
800000
0010
Green
0
128
0
008000
0011
Olive
128
128
0
808000
0100
Navy
0
0
128
000080
0101
Purple
128
0
128
800080
0110
Teal
0
128
128
008080
0111
Silver
192
192
192
C0C0C0
1000
Gray
128
128
128
808080
1001
Red
255
0
0
FF0000
1010
Lime
0
255
0
00FF00
1011
Yellow
255
255
0
FFFF00
1100
Blue
0
0
255
0000FF
1101
Fuchsia
255
0
255
FF00FF
1110
Aqua
0
255
255
00FFFF
1111
White
255
255
255
FFFFFF
Download