Data Representation 2 Flashcards
Order of Memory
bits
bytes
kilobytes
megabytes
mebibytes
How to Calculate the number of bits required for a given number of permeations?
Log2(permiations)
HEXADECIMAL
A - 1010 - 10
F - 1111 - 15
What’s the difference between a kilobyte and a kibibyte?
kilobyte is base 10 - 1000 bytes
kibibytes is base 2 - 1024 bytes
What is AND-ing?
To go from lower to uppercase in ASCII
Difference between lower and upper is 32.
Use the mask 1011111.
e.g. t=116
1110100
1011111
1010100
What is XOR-ing?
Still converting lower to upper (but also vice versa).
Only outputs true when inputs differ.
Which is better: ANDing or XORing and why?
XOR-ing is better because it can go both ways as opposed to AND-ing which only goes from lower to upper.
What is ASCII?
Stands for American Standard Code for Information Interchange.
Numerical representation of characters so computers can understand and use.
All characters are represented with a 7-bit binary
therefore: 2^7 = 128 characters
What are the flaws of ASCII?
128 characters is not enough to represent all possible characters, numbers and symbols.
Initially developed in English, and therefore does not represent all the other languages and scripts.
Widespread use of the web makes it more important to have a universal coding system.
Range of platforms and programs has increased with more developers around the world using a wide range
What is Unicode?
Follows the same basic principles as ASCII but uses more bits: can be 16 or 32 bits.
Includes international characters for over 20 countries and even includes conversions of classical and ancient characters.
State one difference between Unicode and ASCII?
Unicode uses more bits than ASCII.
16 or 32 bit.
What is a Parity Bit?
Method of defecting errors in data during transmission.
Count the number of 1’s in each byte before sending to see whether it is odd or even. At the receiving end, the code can be checked to see whether it is still odd/even.
even parity: need even amount of 1’s
odd parity: need odd amount of 1’s
Can detect the error but not correct it.
What is Majority Voting?
Each bit is sent three times (or any odd amount so long as you can achieve a majority vote)
Fixes error by choosing majority bit.
What is a Checksum?
Checksum is a calculated value sent alongside a block of data for error detection.
Checksum recalculated when packet is received.
If checksum received in packet matches recalculated checksum, days received correctly. If not: data corrupted.
What’s the difference between Analogue and Digital signals?
Analogue data is data that is infinitely variable and represented in a wave.
Alternatively, digital data is often represented as discrete values on and offs shown as set peak and troughs.