1.4.1 Data Types Flashcards
What is a character set?
- A defined list of characters recognised by the computer hardware and software, with each character being represented by a single number
- Character sets are agreed standards for referring to all characters a computer uses
- Includes upper/lower case symbols and punctuation
How many unique binary numbers does 7 bits give?
128
What is ASCII?
- American Standard Code Information Interchange became the accepted standard.
- It was then extended from 7 bit to 8 bit - Extended ASCII
How many unique binary numbers with 8 bits?
256
An international, multilingual language character set needs to include:
- Characters from every written language
- Historical scripts
- Emojis
What is UNICODE?
- Was originally 16 bit but is now 24 bit character set providing over 16 million characters
- Writing 24 bits is slow, so hexadecimal is used instead
Why don’t we use UNICODE all the time?
- The ASCII Character set is an 8 bit character set, meaning each unique character in a file is represented by 8 1s or 0s
- The Unicode Character set is 8, 16 or 32 bit character set depending on version, therefore each character is either 8, 16 or 32 1s or 0s
- Text file stored using UNICODE can take up more space than ASCII
Exam Question: What is meant by the character set of a computer?
- Normally equates to the symbols on a keyboard/ digits/ letters
- That can be represented/ interpreted/ understood by a computer
- May include control characters
Exam Question: Explain how codes are used to represent a character set?
- Each symbol has a (binary) code / number
- Which is unique
- Number of bits used for 1 character = 1 byte
- Example code: ASCII / UNICODE
- Uses 8 bits/ 16 bits per character
- Use of more bits for extended character set
Exam Question: The character A in the ASCII character set is represented by the denary value 65. Write the binary representation for the ASCII character “H”. Show your working. (2)
- If A is 65, H is 72
- 72 in binary is 01001000
Describe what is meant by the term ASCII ?(2)
- American Standard Code for Information Interchange
- A character set
- Maps values to characters
- Uses 7 bits/8bits per character
Exam Question: Explain what is meant by the term UNICODE? (3)
- Unicode is a character set
- Mapping different binary values to characters
- Each character is represented by 1-4 bytes
- It supports a very large number of characters
- It is backward compatible with ASCII
What are the 5 primitive data types?
- Integer
- Real/floating point
- Character
- String
- Boolean
What is an integer and give an example?
- A whole number
- 23
What is a real/floating point and give an example?
- A number with an integer and a fractional part
- 12.65
What is a character and give an example?
- A single alpha-numeric character
- D