1.4 Data Representation and Data Types Flashcards
What is a bit? (2)
- A single “1” or “0”
- Is the smallest unit of data.
What is a byte?
A sequence of 8 bits.
What is a word? (2)
- The number of bits that can be simultaneously processed or stored in a single register.
- Different for different computers
How many bits are there in a word?
It is usually 32 or 64 bit.
What is the binary number system?
- It stores data via an arrangement of 1 and 0.
- It is a base 2 system.
What is hexadecimal? (2)
- A way of writing binary using letters and numbers.
- It is a base 16 system.
How can hexadecimal be used as shorthand?
The binary number can be split into groups containing 4 digits/bits and represented by a number.
What are the advantages of using
hexadecimal?
Fewer errors will occur as it is easy to read a large binary number.
What are character sets?
A list of characters alongside corresponding binary codes.
How do character sets work?
When a computer stores text, it stores a sequence of binary codes, and two computers that use the same character set can communicate with one another.
Give 2 character sets.
- ASCII
- Unicode
How does ASCII store characters?
It stores characters that can be found on standard UK keyboards using 7bits per character.
How does Unicode store characters?
It stores a huge range of characters from many languages, as well as emoticons and other symbols, using 16 bits per character.
Give an advantage for ASCII.
Very little storage space required per character.
Give a disadvantage for ASCII.
Limited to using western characters only.
Give 2 advantages for Unicode.
- Many more characters can be used.
- Possibility to store more in the future.
Give a disadvantage for Unicode.
Requires more than double the storage space per character of ASCII.
What is a primitive data type? (2)
- A primitive data type is a data type that cannot be broken down into smaller data types.
- A variables data type determines what can be stored in that variable.
What is a variable?
A named space in memory that can contain one piece of data of a specified data type.
State 5 data types.
- Boolean
- Character
- String
- Integer
- Real
What is a Boolean?
Can only be True or False.