5. Fundamentals of Data Representation Flashcards
Define the following types of number, giving examples: Natural, Integer, Rational, Irrational, Real
Natural - the set of positive whole numbers starting at zero, {0, 1, 2, 3, 4…}
Integer - the set of positive and negative whole numbers, {… -3, -2, -1, 0, 1, 2, 3…}
Rational - the set of numbers which can be expressed as a fraction, {1/2, 1/3, 2/3…}
Irrational - the set of numbers which cannot be expressed as a fraction, e.g. π = 3.14159265359…
Real - the set of all non-Complex numbers including the Naturals/Integers/Rationals/Irrationals.
What is an Ordinal Number?
An Ordinal Number identifies a position. Ordinal Numbers are used as indexes into Arrays and Lists.
What is Binary?
Binary is the representation of data using 0’s and 1’s. If a number is being represented this is called Base-2.
What is Hexadecimal?
Hexadecimal is the representation of numbers using Base-16. Hexadecimal is commonly used as a compact representation of large numbers. For example Hexadecimal is used to represent colours, and memory addresses.
Define the following data units: bit, byte, Kilobyte (Kb), Kibibyte (Kib), Megabyte (Mb), Mebibyte (Mib), Gigabyte (Gb), Gibibyte (Gib), Terabyte (Tb), Tebibyte (Tib).
bit - a single 0 or 1
byte - 8 bits
Kilobyte (Kb) - 1000 (10^3) bytes
Kibibyte (Kib) - 1024 (2^10) bytes
Megabyte (Mb) - 1,000,000 (10^6) bytes
Mebibyte (Mib) - 1,048,576 (2^20) bytes
Gigabyte (Gb) - 1,000,000,000 (10^9) bytes
Gibibyte (Gib) - 1,073,741,824 (2^30) bytes
Terabyte (Tb) - 1,000,000,000,000 (10^12) bytes
Tebibyte (Tib) - 1,099,511,627,776 (2^40) bytes
What is the difference between a Signed and Unsigned number?
A Signed number can store both positive and negative values, an Unsigned number can only store positive values.
What is ASCII?
ASCII is the American Standard Code for Information Interchange. It is an encoding of American English characters using a 7-bit Binary encoding. The last bit is used as a Parity Bit. Extended-ASCII uses all 8-bits for encoding a character, doubling the number of available characters.
What is Unicode?
Unicode is a character encoding which builds on ASCII by supporting non-American text by using more bits per character. There are 8-bit (UTF-8), 16-bit (UTF-16) and 32-bit (UTF-32) versions.
What is Error Detection/Checking?
Error Detection/Checking is a family of techniques which are used to identify whether transmitted data has become corrupted in transmission. Examples include Parity Bits and Checksums.
What is Error Correction?
Error Correction is a family of techniques which are used to correct detected errors in transmission. An example is Majority Voting.
How are Parity Bits used?
Parity Bits are a form of Error Detection.
Before transmission of data the sender and receiver will agree on whether to use Odd Parity or Even Parity. The Parity Bit is set so that the number of 1’s in the transmitted data are odd (Odd Parity) or even (Even Parity). When the data is received the number of 1’s is counted and if they don’t match the agreed Parity then an error must have occurred in transmission.
Parity Bits can only be used to detect an odd number of bits flipping, if an even number of bits flip then the Parity will be unaffected.
How does Majority Voting work?
Majority Voting is a form of Error Detection and Correction.
The sender will send an odd number of repetitions of the same message to the receiver. For each bit in the message there will be several received bits, if they are not all the same then an error must have occurred in transmission and the majority in the received bits will be used (1 if more received 1’s, 0 if more 0’s).
How are Checksums used?
Checksums are used for Error Detection.
A Checksum is a value (number) calculated using a mathematical function (a Hash Function) from the data to be transmitted. The Checksum is sent to the receiver along with the data. The receiver then applies the same mathematical function to the received data, and if the calculated Checksum matches the received Checksum then no error has occurred in transmission.
What is a Check Digit?
A Check Digit is a similar technology to a Checksum. It is a number calculated from the numbers in a Barcode used to determine whether or not the Barcode has been read correctly by the Scanner.
Define the following terms related to Bitmap Images: Pixel, Resolution, Colour Depth.
Pixel (Picture Element) - the colour at a grid location in an image.
Resolution - the number of Pixels in an image (width x height).
Colour Depth - the number of bits used to represent the colour of a Pixel.